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?
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 >>
okay, thanks again, PaddyB. My try with a simple Insomnia API call didn't let me add something but I tried a specific path, maybe I need to create a complete new one. Thanks!
PS: I found the full and delta model explanation - okay, now I got it...
The node is much bigger than I thought before and a simple put on an address won't work, you need to put a delta action on the node. Cool that this is existing in Node-RED but I will first try this directly
(2024-03-17, 06:51 PM)SirReal Wrote: PS: I found the full and delta model explanation - okay, now I got it...
The node is much bigger than I thought before and a simple put on an address won't work, you need to put a delta action on the node. Cool that this is existing in Node-RED but I will first try this directly
Heres another handy way to get at sigK deltas in a function node, set up lodash then it can read the values >
Just if someone else is reading this: What was confusing me is that HTTP rest calls (PUT) can only change node-paths which are made for that and will do an action afterwards.
If you just want to send a sensor's data in, you need a websocket connection to make delta calls. I was not aware of that...
(2024-03-17, 06:51 PM)SirReal Wrote: PS: I found the full and delta model explanation - okay, now I got it...
The node is much bigger than I thought before and a simple put on an address won't work, you need to put a delta action on the node. Cool that this is existing in Node-RED but I will first try this directly
Hi
can you give the URL where you found the full model explanation ?
(2024-03-17, 06:51 PM)SirReal Wrote: PS: I found the full and delta model explanation - okay, now I got it...
The node is much bigger than I thought before and a simple put on an address won't work, you need to put a delta action on the node. Cool that this is existing in Node-RED but I will first try this directly
Hi
can you give the URL where you found the full model explanation ?