Code:
[
{
"id": "67b79641.1fad68",
"type": "websocket in",
"z": "749e8283.293f4c",
"name": "SignalK input",
"server": "fc1b2b62.0b63a8",
"client": "",
"x": 90,
"y": 80,
"wires": [
[
"20af45d9.7fe30a"
]
]
},
{
"id": "20af45d9.7fe30a",
"type": "json",
"z": "749e8283.293f4c",
"name": "",
"pretty": false,
"x": 90,
"y": 240,
"wires": [
[
"8b385a5c.b0c248",
"2c398bd9.039814",
"10608140.97117f",
"a828164d.3005a8"
]
]
},
{
"id": "10608140.97117f",
"type": "switch",
"z": "749e8283.293f4c",
"name": "",
"property": "payload.updates.values.path",
"propertyType": "jsonata",
"rules": [
{
"t": "eq",
"v": "propulsion.engine.temperature",
"vt": "str"
},
{
"t": "eq",
"v": "propulsion.alt.temperature",
"vt": "str"
},
{
"t": "eq",
"v": "propulsion.exh.temperature",
"vt": "str"
},
{
"t": "eq",
"v": "environment.outside.pressure",
"vt": "str"
},
{
"t": "eq",
"v": "electrical.batteries.MainBank.voltage",
"vt": "str"
}
],
"checkall": "true",
"outputs": 5,
"x": 250,
"y": 140,
"wires": [
[
"f9de7f8e.d11f9"
],
[
"ac6fa817.c672c8"
],
[
"7f2db92c.1b0ad8"
],
[
"a1aa7569.769a28"
],
[
"9d158a2f.8b5da8"
]
]
},
{
"id": "f9de7f8e.d11f9",
"type": "change",
"z": "749e8283.293f4c",
"name": "Set Global.eng",
"rules": [
{
"t": "set",
"p": "eng",
"pt": "global",
"to": "$round($number(payload.updates.values.value) - 273.15,2)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 60,
"wires": [
[]
]
},
{
"id": "ac6fa817.c672c8",
"type": "change",
"z": "749e8283.293f4c",
"name": "Set Global.alt",
"rules": [
{
"t": "set",
"p": "alt",
"pt": "global",
"to": "$round($number(payload.updates.values.value) - 273.15,2)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 80,
"wires": [
[]
]
},
{
"id": "7f2db92c.1b0ad8",
"type": "change",
"z": "749e8283.293f4c",
"name": "Set Global.exh",
"rules": [
{
"t": "set",
"p": "exh",
"pt": "global",
"to": "$round($number(payload.updates.values.value) - 273.15,2)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 100,
"wires": [
[]
]
},
{
"id": "a1aa7569.769a28",
"type": "change",
"z": "749e8283.293f4c",
"name": "Set Global.pres",
"rules": [
{
"t": "set",
"p": "pressure",
"pt": "global",
"to": "\t$number(payload.updates.values.value) ? $number(payload.updates.values.value) : \"\"",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 120,
"wires": [
[]
]
},
{
"id": "9d158a2f.8b5da8",
"type": "change",
"z": "749e8283.293f4c",
"name": "Set Global.battVolts",
"rules": [
{
"t": "set",
"p": "battVolts",
"pt": "global",
"to": "$number(payload.updates.values.value) ? $number(payload.updates.values.value) : \"\"",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 140,
"wires": [
[]
]
},
{
"id": "9bc5cb83.05d3f8",
"type": "inject",
"z": "749e8283.293f4c",
"name": "",
"topic": "",
"payload": "eng",
"payloadType": "global",
"repeat": "1",
"crontab": "",
"once": false,
"x": 830,
"y": 80,
"wires": [
[
"d652486c.7ed398",
"f66f5fb8.176a1"
]
]
},
{
"id": "f66f5fb8.176a1",
"type": "ui_gauge",
"z": "749e8283.293f4c",
"name": "EngTempGauge",
"group": "3bc70d31.720c02",
"order": 1,
"width": "3",
"height": "4",
"gtype": "gage",
"title": "Engine temperature",
"label": "Deg C",
"format": "{{value}}",
"min": 0,
"max": "120",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 1240,
"y": 125,
"wires": []
},
{
"id": "fc1b2b62.0b63a8",
"type": "websocket-listener",
"z": "",
"path": "ws://localhost:3000/signalk/v1/stream",
"wholemsg": "false"
},
{
"id": "3bc70d31.720c02",
"type": "ui_group",
"z": "",
"name": "Gauges",
"tab": "de6fba2.670c748",
"order": 1,
"disp": true,
"width": "10"
},
{
"id": "de6fba2.670c748",
"type": "ui_tab",
"z": "",
"name": "Gauges",
"icon": "dashboard",
"order": 2
}
]
I have tried your method putting in global variable, but i was not able to make it work, even what was working in my previous method.