OpenMarine

Full Version: How do I get water temp into Node-red?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I go on Diagnostic on Signal K, I have MTW (environment.watertemp), but in node-red when I debug the websocket I can't find it.. Any easy way to get it there? Smile
set json path in node-red to $.updates..values[?(@.path=="environment.water.temperature")]..value this will output temp in K

[
{
"id": "fc84cccf.b90698",
"type": "jsonpath",
"z": "ad773e6c.c040d",
"expression": "$.updates..values[?(@.path==\"environment.water.temperature\")]..value",
"split": true,
"name": "watertemp",
"x": 350,
"y": 580,
"wires": [
[
"7d3d63e4.1727d4"
]
]
},
{
"id": "f991b1e7.ef9748",
"type": "function",
"z": "ad773e6c.c040d",
"name": "KelvintC2",
"func": "msg.payload=((msg.payload - 273.15).toFixed(1));\nreturn msg;",
"outputs": "1",
"noerr": 0,
"x": 520,
"y": 580,
"wires": [
[
"d6c718f7.0949e",
"ff26732b.c64298"
]
]
},
{
"id": "d6c718f7.0949e",
"type": "ui_text",
"z": "ad773e6c.c040d",
"group": "ce804676.cbb9e",
"order": 1,
"width": "4",
"height": "1",
"name": "",
"label": "outSide Temperature",
"format": "{{msg.payload}}C",
"layout": "row-left",
"x": 700,
"y": 600,
"wires": []
},
{
"id": "ce804676.cbb9e",
"type": "ui_group",
"z": "",
"name": "Weather",
"tab": "4c2b5852.80dfe",
"order": 1,
"disp": true,
"width": "16"
},
{
"id": "4c2b5852.80dfe",
"type": "ui_tab",
"z": "",
"name": "Weather",
"icon": "dashboard",
"order": 1
}
]
The problem is when I look in my "serial NMEA in" diagnostic in OP I can find the water.temp in the NMEA info.
But I dont have the "environment.water.temperature" when I debug the "ws://localhost:3000/signalk/v1/stream".

So I need to make a link between the NMEA info and the websocket...
What sensor do you have connected to the water temp I2C, 1-Wire. Or is this data coming from a NMEA source.
Coming from NMEA source.