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
How do I get signalk data into node red
#7
(2016-12-14, 04:33 PM)gniersma Wrote: My question now is is it also possible to write to the Signal-K on openplotter ? 
I see that there are several Input UDP ports defined in openplotter. But not specifically for node Red.
Somebody knows this and has an example ?
Yes. There is no special port for this. For notifications you should use 55558. For other sensor use 55559.
Here is an example to send RPI cpu temperature to SignalK as 'environment.inside.heating.temperature' [Image: biggrin.png]
Code:
[{
        "id": "f5fa759f.be894",
        "type": "inject",
        "z": "4deb498f.fbcfd8",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "5",
        "crontab": "",
        "once": true,
        "x": 134,
        "y": 120,
        "wires": [["adb4b4a8.9c10c8"]]
    }, {
        "id": "adb4b4a8.9c10c8",
        "type": "exec",
        "z": "4deb498f.fbcfd8",
        "command": "vcgencmd",
        "addpay": false,
        "append": "measure_temp",
        "useSpawn": "",
        "timer": "",
        "name": "getCPUtemp",
        "x": 323,
        "y": 161.5,
        "wires": [["2705f134.792f86"], [], []]
    }, {
        "id": "7b5088a.c5f0af8",
        "type": "debug",
        "z": "4deb498f.fbcfd8",
        "name": "",
        "active": false,
        "console": "false",
        "complete": "payload",
        "x": 740,
        "y": 147.5,
        "wires": []
    }, {
        "id": "2705f134.792f86",
        "type": "function",
        "z": "4deb498f.fbcfd8",
        "name": "msg.payload",
        "func": "cpu_temp = parseFloat(msg.payload.replace(\"temp=\",\"\").replace(\"'C\\n\",\"\"));\ncpu_temp = cpu_temp + 273.15\nmsg.payload = '{\\\"updates\\\": [{\\\"source\\\": {\\\"type\\\": \\\"ARMTEMP\\\",\\\"src\\\" : \\\"RPIMCU\\\"},\\\"values\\\":[{\\\"path\\\": \\\"environment.inside.heating.temperature\\\",\\\"value\\\":'+cpu_temp+'}]}]}\\n';\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 533,
        "y": 210,
        "wires": [["7b5088a.c5f0af8", "c17f4c75.737088"]]
    }, {
        "id": "c17f4c75.737088",
        "type": "udp out",
        "z": "4deb498f.fbcfd8",
        "name": "sendSK",
        "addr": "localhost",
        "iface": "",
        "port": "55559",
        "ipv": "udp4",
        "outport": "",
        "base64": false,
        "multicast": "false",
        "x": 742,
        "y": 221,
        "wires": []
    }
]
Reply


Messages In This Thread
RE: How do I get signalk data into node red - by e-sailing - 2016-12-14, 11:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)