Adding to this quest to handle MQTT data streams, I (sort of) succeeded using my Android phone as GPS receiver through MQTT, I'm still struggling with converting the data which went from MQTT message to object, to array and to (unwantedly) string, I'm not a dev...
Here below my flow and debug output, it shows my attempt to inject the lat/lon into my dashboard, it works but not as I wish, both strings are still to be stripped/converted.
Code:
[{"id":"f01686b2.94c638","type":"mqtt in","z":"217cab7.d842f54","name":"","topic":"owntracks","qos":"2","broker":"47dee4e1.57a214","x":100,"y":600,"wires":[["2069343.0d680cc"]]},{"id":"2069343.0d680cc","type":"function","z":"217cab7.d842f54","name":"splitting","func":"msg.payload = msg.payload.split(\",\");\nreturn msg;","outputs":1,"noerr":0,"x":240,"y":600,"wires":[["c3926ea9.6954d","be4ea282.527cb"]]},{"id":"e8c15157.66d0c","type":"debug","z":"217cab7.d842f54","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":680,"wires":[]},{"id":"be4ea282.527cb","type":"function","z":"217cab7.d842f54","name":"routing","func":"var msg8 = msg.payload.map(function (p) {\n return {payload: p};\n});\nreturn msg8;","outputs":8,"noerr":0,"x":230,"y":680,"wires":[[],[],[],["e8c15157.66d0c","50dd8c03.a0fde8"],["5390235e.c9248c","620f9130.009e9"],[],[],[]]},{"id":"5390235e.c9248c","type":"debug","z":"217cab7.d842f54","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":700,"wires":[]},{"id":"c3926ea9.6954d","type":"debug","z":"217cab7.d842f54","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":510,"y":620,"wires":[]},{"id":"47dee4e1.57a214","type":"mqtt-broker","z":"","name":"MQQT","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":""}]
So when OpenPlotter receives GPS coordinates in NMEA0183 through the multiplexer, all works.
This is my attempt with my Android phone as a backup. We're talking about the dashboard, even not SignalK yet, the latter does receive the MQTT message in good order.
On the phone I installed Owntracks and on OpenPlotter I configured MQTT as described elsewhere on this forum.