cpainchaud / RFLink32

RFLink for ESP, with MQTT client
Other
137 stars 46 forks source link

Convert temperature readings from HEX to value #94

Open OrYaYo opened 1 year ago

OrYaYo commented 1 year ago

Hello,

It seems like the readings from temperature sensor devices (RF) are in hexadecimal value. For instance, my Alecto V4 device returns the following:

20;0A;Alecto V4;ID=58d0;TEMP=0080;HUM=66;BAT=OK;

The current temperature is expressed in hexadecimal, being 0x0080 in hex 128 in decimal, which is the current temperature (12.8 degrees). Temperature return by these devices is xx.x (2 digits + 1 decimal reading).

This is the way other MQTT bridges return it, specially the espRFLinkMQTT.

Would it be possible to convert the hex reading into a human readeable format?

cpainchaud commented 1 year ago

Hello,

I do believe that the MQTT integration requires a rework to follow the new HA MQTT standards. You are more than welcome to submit a patch for that. Myself I don't have the time to work on it right now.

Thank you