2019-11-22, 06:22 PM
Hi,
I am using the SignalK to MQTT gateway and want to expose the position to other systems on the ship over MQTT, however it reports [object object] in the MQTT topic for "vessels/self/navigation/position"
Debug output from local MQTT broker on Openplotter where the payload is [object object]
There are no "vessels/self/navigation/position/longitude" or "vessels/self/navigation/position/latitude" topics showing the local MQTT server either to individually pull the data from.
I know if I use Node red SignalK subscribe node, I can flatten the object to make some data show and create a node red flow to pull signalk data from the local host, process it and push it into MQTT with the data. However, I have SignalK MQTT publishing all deltas, but the I can only get the subscribe node working with one path at a time into MQTT and there are other paths pushing [object object] into MQTT
I want to expose all SignalK paths and deltas to MQTT to then use them via a home automation system to control some switches.
How can I get SignalK to expose the correct values into MQTT without putting the string [object object] into the MQTT topic?
Any help really appreciated.
I am using the SignalK to MQTT gateway and want to expose the position to other systems on the ship over MQTT, however it reports [object object] in the MQTT topic for "vessels/self/navigation/position"
Debug output from local MQTT broker on Openplotter where the payload is [object object]
Code:
vessels/self/navigation/position : msg : Object
object
topic: "vessels/self/navigation/position"
payload: "[object Object]"
qos: 1
retain: false
_topic: "vessels/self/navigation/position"
_msgid: "9896dd41.672da"
There are no "vessels/self/navigation/position/longitude" or "vessels/self/navigation/position/latitude" topics showing the local MQTT server either to individually pull the data from.
I know if I use Node red SignalK subscribe node, I can flatten the object to make some data show and create a node red flow to pull signalk data from the local host, process it and push it into MQTT with the data. However, I have SignalK MQTT publishing all deltas, but the I can only get the subscribe node working with one path at a time into MQTT and there are other paths pushing [object object] into MQTT
I want to expose all SignalK paths and deltas to MQTT to then use them via a home automation system to control some switches.
How can I get SignalK to expose the correct values into MQTT without putting the string [object object] into the MQTT topic?
Any help really appreciated.