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
SignalK to MQTT reporting [object object] for postion
#1
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]

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.
Reply


Messages In This Thread
SignalK to MQTT reporting [object object] for postion - by craig - 2019-11-22, 06:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)