Phileep / rflink-to-mqtt

Bridge from RFLink to an mqtt broker using ESP8266 programmed with arduino IDE
38 stars 12 forks source link

Negative temperature figures not being translated correctly #4

Open matt2005 opened 7 years ago

matt2005 commented 7 years ago

As per the rflink protocol reference. TEMP=9999 => Temperature (hexadecimal), high bit contains negative sign, needs division by 10 (0xC0 = 192 decimal = 19.2 degrees)

Currently negative temperatures are getting throw out as they exceed the high temp limit

matt2005 commented 7 years ago

Here is the data for a negative temperature. {"raw":"20;6B;DKW2012;ID=0004;TEMP=800d;HUM=99;WINSP=0000;WINGS=0000;RAIN=0060;WINDIR=0002;\r","WINSP":0.00,"WINGS":0.00,"RAIN":9.60,"WINDIR":"NE"}

matt2005 commented 7 years ago

I'm guessing the 8 is the negative sign as the actual temperature is -1.3

matt2005 commented 7 years ago

fixed in #2