OpenMarine

Full Version: MQTT String payloads to Integers for use in KIP gauge
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Is there a way to alter the incoming MQTT datatype (defaults to string) to integer? This is needed because I'm building an interface for the engine in my boat. I would like to publish RPM, coolant temperature and oil pressure to MQTT en display them using the fancy gauges in KIP. These do not accept the string data that was received and linked to SK.

Kind regards,

Koen
Have you tried to do something in Node-Red?
(2019-05-12, 07:51 PM)abarrow Wrote: [ -> ]Have you tried to do something in Node-Red?

Yes I did ... But i found a fix to my problem after fiddling around a bit. I selected the propulsion.* and typed in the revolutions in the wildcard placeholder. That worked like a charm but the data was interpreted as String.

Next I selected propulsion in the group drop-down box in the "Select Signal K key" window and instead of typing propulsion for the wildcard I selected "propulsion.*.revolutions" in the Keys drop-down box. I entered engine for the wildcard. This yields propulsion.engine.revolutions as Signal K topic and OPnotifications.MQTT.myTopic as source. Data is received as string and interpreted as a numeric value. 

Looks like my problem is solved doesn't it? No it isn't. Now I can't find my "propulsion.engine.revolutions" in KIP when I configure my page. Actually the only keys available are the navigation keys. What am I missing out on here?

Kind regards,

Koen