Thx E-sailing !
This helped me, it is working now I attached my Node-red flow. I decided to create an USB/serial input in node-red for my sensor. Because i needed to do some calculations, before putting them on screen. Output is going to Node red-dashboard and to Signal-K. I assume it can be done with phyton code, but I'm not a programmer.
A related questions, i don't know if you have an answer on that;
- Is it also possible to create a websocket input on signal_k ?
Open the browser on your open-pi. There you see the Node-red tab. (or localhost:1880) open and you get a example code which read Signal-k data based on navigation data and output this to node-red dashboard
You should modify this code to make it suitable for your temp
This helped me, it is working now I attached my Node-red flow. I decided to create an USB/serial input in node-red for my sensor. Because i needed to do some calculations, before putting them on screen. Output is going to Node red-dashboard and to Signal-K. I assume it can be done with phyton code, but I'm not a programmer.
A related questions, i don't know if you have an answer on that;
- Is it also possible to create a websocket input on signal_k ?
Code:
[
{
"id": "415562e4.2dfcac",
"type": "serial in",
"z": "aa01f3b2.e669b",
"name": "usb/serieel to keel sensor",
"serial": "2f409b78.9c8354",
"x": 184,
"y": 195,
"wires": [
[
"4acab7b5.8f0c78"
]
]
},
{
"id": "98efb80a.2575a8",
"type": "debug",
"z": "aa01f3b2.e669b",
"name": "",
"active": false,
"console": "false",
"complete": "false",
"x": 953,
"y": 109,
"wires": []
},
{
"id": "a5e270f4.cff88",
"type": "ui_gauge",
"z": "aa01f3b2.e669b",
"name": "keel sensor",
"group": "30a1bf4e.9a766",
"order": 0,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Hefkiel %",
"label": "units",
"format": "{{value | number:0}}%",
"min": 0,
"max": "100",
"colors": [
"#00b500",
"#e6e600",
"#01b500"
],
"x": 548,
"y": 300,
"wires": []
},
{
"id": "4acab7b5.8f0c78",
"type": "json",
"z": "aa01f3b2.e669b",
"name": "",
"x": 205,
"y": 302,
"wires": [
[
"a63710c0.72f29",
"b8e4e78.1b0e018"
]
]
},
{
"id": "a63710c0.72f29",
"type": "range",
"z": "aa01f3b2.e669b",
"minin": "0",
"maxin": "150",
"minout": "0",
"maxout": "100",
"action": "scale",
"round": true,
"name": "",
"x": 365,
"y": 302,
"wires": [
[
"a5e270f4.cff88",
"e76e582d.8d7a68"
]
]
},
{
"id": "b8e4e78.1b0e018",
"type": "function",
"z": "aa01f3b2.e669b",
"name": "Calc draft",
"func": "msg.payload = msg.payload + 140;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 365,
"y": 383,
"wires": [
[
"c8c5854c.d0e478"
]
]
},
{
"id": "c8c5854c.d0e478",
"type": "ui_text",
"z": "aa01f3b2.e669b",
"group": "30a1bf4e.9a766",
"order": 0,
"width": 0,
"height": 0,
"name": "Disp Cal draft",
"label": "Draft (cm)",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 557,
"y": 381,
"wires": []
},
{
"id": "97056651.6e98a8",
"type": "function",
"z": "aa01f3b2.e669b",
"name": "msg.payload",
"func": "lift_ratio = msg.payload\nmsg.payload = '{\\\"updates\\\": [{\\\"source\\\": {\\\"type\\\": \\\"ArduinoSensor\\\",\\\"src\\\" : \\\"GNISENSE\\\"},\\\"values\\\":[{\\\"path\\\": \\\"design.keel.lift\\\",\\\"value\\\":'+lift_ratio+'}]}]}\\n';\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 802,
"y": 185,
"wires": [
[
"98efb80a.2575a8",
"6068a22a.ebd23c"
]
]
},
{
"id": "e76e582d.8d7a68",
"type": "delay",
"z": "aa01f3b2.e669b",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "30",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"x": 546,
"y": 202,
"wires": [
[
"97056651.6e98a8"
]
]
},
{
"id": "6068a22a.ebd23c",
"type": "udp out",
"z": "aa01f3b2.e669b",
"name": "sendSK",
"addr": "localhost",
"iface": "",
"port": "55559",
"ipv": "udp4",
"outport": "",
"base64": false,
"multicast": "false",
"x": 979,
"y": 234,
"wires": []
},
{
"id": "2f409b78.9c8354",
"type": "serial-port",
"z": "",
"serialport": "/dev/ttyACM0",
"serialbaud": "115200",
"databits": "8",
"parity": "none",
"stopbits": "1",
"newline": "\\n",
"bin": "false",
"out": "char",
"addchar": false
},
{
"id": "30a1bf4e.9a766",
"type": "ui_group",
"z": "",
"name": "Keel information",
"tab": "e01159e6.0f0f28",
"order": 2,
"disp": true,
"width": "6"
},
{
"id": "e01159e6.0f0f28",
"type": "ui_tab",
"z": "",
"name": "Magic Machine",
"icon": "dashboard"
}
]
(2016-12-15, 03:02 PM)dione Wrote: Hi, good work and good Christmas gift.
I downloaded the new version and it looks very interesting, and with great news.
I'm at home, and I only have to test four DS18B20 temperature sensors, connected to the resistor.
I set the 1w sensors as:
Environment.inside.engineRoom.temperature
Environment.inside.freezer.temperature
Environment.inside.heating.temperature
Environment.inside.mainCabin.temperature
I can view the temperatures on signalK
I have problems from here . I do not know node-red. How to configure it? To see the signalk data in nose-red.
sorry for my English
Saludos,
Open the browser on your open-pi. There you see the Node-red tab. (or localhost:1880) open and you get a example code which read Signal-k data based on navigation data and output this to node-red dashboard
You should modify this code to make it suitable for your temp