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 water temp into Node-red?
#1
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
Reply
#2
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
}
]
Reply
#3
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...
Reply
#4
What sensor do you have connected to the water temp I2C, 1-Wire. Or is this data coming from a NMEA source.
Reply
#5
Coming from NMEA source.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)