Fine Offset WH25 clone - Temperature too high

565 views
Skip to first unread message

John Voss

unread,
Mar 23, 2017, 6:52:38 PM3/23/17
to rtl_433
Hello

I recently purchased a temperature/humidity/pressure sensor which is WH25 clone - see ebay

After downloading the latest version of RTL_433 which includes support for FineOffset WH25, the temperature reading was over 1000 for 25.6 C reading. The humidity and pressure are correct.

2017-03-22 12:39:20 :   Fine Offset Electronics, WH25

        ID:      239

        Temperature:     1663.5 C

        Humidity:        84 %

        Pressure:        1011.0 hPa


I made the following change to fineoffset.c and it's now returning the correct temperature. All good!


pi@homewx:~/rtl_433-master/src/devices $ diff fineoffset.c fineoffset.c.orig

167c167

<     float   temperature = (float)((uint16_t)(buffer[4] & 0xF) << 8 | buffer[5]) / 10.0 - 40.0;

---

>     float   temperature = (float)((uint16_t)buffer[4] << 8 | buffer[5]) / 10.0 - 40.0;


I hope this helps, if someone else has this problem.


John

Tommy Vestermark

unread,
Mar 27, 2017, 2:49:24 PM3/27/17
to rtl_433
Hi John,

Thank you for your feedback. I am the one who added code for the WH25. My own sensor only ever returned 0 in the upper nibble of buffer[4], so I assumed it was part of the temperature. According to specifications for the WH25 sensor (google "wh2600 manual") the temperature range should be -40C to +60C. When adding 40 and multiplying by 10 that means a maximum value of 1000. That is 10 bits and the mask value could probably safely be changed from 0xF to 0x3.

However the big question is then: what is the meaning of the upper nibble? ID? Low battery? Could you please upload one or two sample recordings to https://github.com/merbanan/rtl_433_tests?

If you are not comfortable by using Github, I will push your fix soon.

Thanks,
Tommy

Tommy Vestermark

unread,
Mar 30, 2017, 3:48:05 PM3/30/17
to rtl_433
The fix should be in now along with the two sample recordings you sent me. Thank you very much for your input!
Beware that I have changed the ID decoding as well, based on the difference between the two known sensors. So your ID will change...
I also figured out the missing extra checksum byte, so the decoding should be marginally more robust for bit errors.
There is now only the single unknown nibble, which is 0xE across the two known sensors. It might be 4 extra ID bits (unlikely) or just some header/sensor type. Time will tell if we figure it out :-)

Thank,
Tommy

John Voss

unread,
Mar 31, 2017, 11:01:05 PM3/31/17
to rtl_433
Thanks Tommy, I appreciate your work on this.

Best regards,
John

Tomasz End

unread,
Sep 24, 2018, 12:49:07 PM9/24/18
to rtl_433
Hi Tommy,

I'm still seeing too high temperature values with the WH25 and rtl_433 18.05: 
 
2018-09-24 18:46:17 :   Fine Offset Electronics, WH25
        ID:      72
        Temperature:     226.7 C
        Humidity:        40 %
        Pressure:        1022.2 hPa
        Integrity:       CHECKSUM

Real temperature on the display: 21,9°C

J Dow

unread,
Sep 24, 2018, 5:10:46 PM9/24/18
to rtl_433
Since I was just mucking around in that area locally I looked into it.

Perhaps change:
    float   temperature = (float)((uint16_t)(buffer[4] & 0xF) << 8 | buffer[5]) / 10.0f - 40.0f;
to:
    float   temperature = (float)((uint16_t)(buffer[4] & 0x7) << 8 | buffer[5]) / 10.0f - 40.0f;

Check if your battery is low. It MAY be that buffers[4] & 0x08 is a battery status bit.

{^_^}   Joanne
Message has been deleted

Tomasz End

unread,
Sep 25, 2018, 4:59:15 PM9/25/18
to rtl_433
Hi Joanne,

thanks for your proposal. Although it didn't work out of the box, it gave the right hint.


Original:     float temperature = ((b[1] & 0xF) << 8 | b[2]) * 0.1 - 40.0;

Modified:     float temperature = ((b[1] & 0x7) << 8 | b[2]) * 0.1 - 40.0;

-> Success, received temperature is the same as the displayed temperature.

J Dow

unread,
Sep 25, 2018, 5:26:47 PM9/25/18
to rtl_433
Hm, I see the current version of WH25 is very different from what I picked up with a date of 20180809 00:04. Anyway, I am glad you're fixed. I notice that the problem may exist in the WH2 callback for at least the Wh5 sensor. That should be investigated.

{^_^}

Christian Zuckschwerdt

unread,
Sep 26, 2018, 3:52:48 AM9/26/18
to rtl_433
The official docs to similar sensors suggest there is a battery_low bit and 11 instead of 12 bits for temperature seem sensible. I'll patch this.

Christian Zuckschwerdt

unread,
Sep 26, 2018, 3:59:58 AM9/26/18
to rtl_433

J Dow

unread,
Sep 29, 2018, 9:28:01 PM9/29/18
to rtl_433
On Wednesday, September 26, 2018 at 12:52:48 AM UTC-7, Christian Zuckschwerdt wrote:
The official docs to similar sensors suggest there is a battery_low bit and 11 instead of 12 bits for temperature seem sensible. I'll patch this.

Out of curiosity where did you get the official docs? If you have them could you please build in the time transport that is present (sometimes) and checksums that might be present?

{^_^}

J Dow

unread,
Sep 30, 2018, 7:03:12 AM9/30/18
to rtl_433
(clarification is good. I am referring to the chance you have WH31 official docs and can fill in those blanks,) 
{o.o}

Christian Zuckschwerdt

unread,
Sep 30, 2018, 11:49:08 AM9/30/18
to rtl_433

J Dow

unread,
Sep 30, 2018, 7:22:44 PM9/30/18
to rtl_433
On Sunday, September 30, 2018 at 8:49:08 AM UTC-7, Christian Zuckschwerdt wrote:
Which raises the question - can you find the WH31 docs the same place you found WH24? Or are the WH24 docs "educated guesses?"

{^_-} 

Christian Zuckschwerdt

unread,
Oct 1, 2018, 4:05:08 AM10/1/18
to rtl_433
Someone requested those docs from Fine Offset and sent them in.Those are official specs from FO and from what I see other FO devices follow roughly the same design decisions.

J Dow

unread,
Oct 1, 2018, 4:46:01 AM10/1/18
to rtl_433


On Monday, October 1, 2018 at 1:05:08 AM UTC-7, Christian Zuckschwerdt wrote:
Someone requested those docs from Fine Offset and sent them in.Those are official specs from FO and from what I see other FO devices follow roughly the same design decisions.

Hm, if they are forthcoming that's good. I'll have to give that a try. Thanks for the info.
{^_^}   Joanne (I keep forgetting that {^_^} or variants has been my online sig since 1985 but is not known to be me by most of the world.)
Reply all
Reply to author
Forward
0 new messages