2024-03-17, 01:48 PM
(2024-03-17, 01:32 PM)SirReal Wrote: Hi folks!
I'm currently playing with Signal K the first time on a more serious level and I am starting to really enjoy it.
I also tried the API to read some values, also to change some values after authentication.
As I have a serial protocol which is not supported by OpenPlotter, I need to run Node-RED to grab some UART data and create some jsons based on the information. In this case: My solar charger's information, current, power etc.
Long story short: I would like to add this data into Signal K and as I am able to modify keys using the API, I could do it. However, I asked myself if I can create own keys and a new type of data.
The API can't create new keys - is there any way to do this with Signal K directly?
Thanks!
Node red will do that for you, send the value as msg.payload and the key as msg.topic to a signalk-send-pathvalue node. You can try using an inject node which lets you set those.
Or send a signalk delta json with the new keys in it & signalk will create them. siggK does it all for you
Copy & paste this into the data fiddler & click send to server then have a look in the data browser >>
[
{
"updates": [
{
"source": {
},
"values": [
{
"path": "testing.testing",
"value": "Hello world"
}
]
}
],
"context": "vessels.self"
}
]