This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Signal K: Adding Keys / new sensor
#2
(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"
  }
]
Reply


Messages In This Thread
Signal K: Adding Keys / new sensor - by SirReal - 2024-03-17, 01:32 PM
RE: Signal K: Adding Keys / new sensor - by PaddyB - 2024-03-17, 01:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)