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
Humidity Sensor -> MQTT -> SignalK (data conversion)
#1
I have a sensor collecting humidity data and using the following to send to MQTT.

      pubString = String(dht.getHumidity()/100); 
      memset(msg, 0, sizeof(msg));
      pubString.toCharArray(msg, pubString.length()+1); 
      client.publish("SensorHumidity",msg);

I am trying to display the humidity data in Wilhelm but it is being recognized, correctly as a string in Wilhelm rather than a float. How do I send the data so it ends up as being float in SignalK and hence Wilhelm as well? I have data getting on to Wilhelm, I suspect I am just not doing it the right way. I am NOT familiar with a whole JSON structure but do I need to go to that extent to accomplish what I am trying?  A shove in right direction would be appreciated. Signed Newbie, but learning
Reply


Messages In This Thread
Humidity Sensor -> MQTT -> SignalK (data conversion) - by awwbaker@yahoo.com - 2018-09-29, 03:15 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)