If you name the key according to the spec then in the diagnostic window it will have the correct suffix -
http://signalk.org/specification/1.0.4/d...expvoltage
/electrical/solar/<RegExp>/voltage
But that doesn't help that much, sending with MQTT the value will still be a string which can be limiting if using the KIP app to view the data and most likely elsewhere.
One workaround would be to use signalk NodeRed app to grab the data coming in and change it to a float then send it on to signalk >
http://signalk.org/specification/1.0.4/d...expvoltage
/electrical/solar/<RegExp>/voltage
But that doesn't help that much, sending with MQTT the value will still be a string which can be limiting if using the KIP app to view the data and most likely elsewhere.
One workaround would be to use signalk NodeRed app to grab the data coming in and change it to a float then send it on to signalk >
Code:
[
{
"id": "c0a37a24.2adf68",
"type": "mqtt in",
"z": "f792bbef.555918",
"name": "MQTT topic",
"topic": "test",
"qos": "2",
"broker": "bda9193b.205c18",
"x": 200,
"y": 240,
"wires": [
[
"eaba93f9.b07d3"
]
]
},
{
"id": "eaba93f9.b07d3",
"type": "function",
"z": "f792bbef.555918",
"name": "change Str to float",
"func": "msg.topic = \"electrical.solar.SensorSource.voltage\";\n//msg.payload = parseFloat(msg.payload);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 370,
"y": 220,
"wires": [
[
"aa8a5862.f22138",
"a9e94ec.7d774b"
]
]
},
{
"id": "aa8a5862.f22138",
"type": "debug",
"z": "f792bbef.555918",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 550,
"y": 200,
"wires": []
},
{
"id": "a9e94ec.7d774b",
"type": "signalk-send-pathvalue",
"z": "f792bbef.555918",
"name": "",
"source": "",
"x": 590,
"y": 260,
"wires": []
},
{
"id": "bda9193b.205c18",
"type": "mqtt-broker",
"z": "",
"name": "openplotter",
"broker": "10.10.10.1",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]