Closed aanban closed 1 year ago
Hi,
thank you for reporting. The decoder function was taken from the rtl_433 project, i.e. rtl_433/blob/master/src/devices/bresser_5in1.c. I always wondered why the rain counter has such a small range, but I failed to compare it to the manual. Considering this and the fact that the upper nibble of msg[24] is currently considered as unused, I'd say you are right! The following example also gives a hint in the same direction: https://github.com/merbanan/rtl_433/blob/7d5129786b35287f503a0af1d6243fd59e0db0da/src/devices/bresser_5in1.c#L33
BTW: Which device/manual are you referring to? 2022-04-Manual_7002510_Weather-Center-5in1_de-en_BRESSER_v042022a.pdf states "Rainfall measuring range: 0...9999 mm". So, the rain counter value could in fact extend into msg[25], which also contains the battery state (bit 7) and the temperature sign (bit 3). That would mean that the rain counter MSB would be somewhere in bits 6:4 and 2:0. That seems a little strange... See https://github.com/merbanan/rtl_433/blob/7d5129786b35287f503a0af1d6243fd59e0db0da/src/devices/bresser_5in1.c#L42
Regards Matthias
Let's see what happens if the rain continues and your sensor crosses the 999.9 mm mark.
Hi,
thank you for reporting. The decoder function was taken from the rtl_433 project, i.e. rtl_433/blob/master/src/devices/bresser_5in1.c. I always wondered why the rain counter has such a small range, but I failed to compare it to the manual. Considering this and the fact that the upper nibble of msg[24] is currently considered as unused, I'd say you are right! The following example also gives a hint in the same direction: https://github.com/merbanan/rtl_433/blob/7d5129786b35287f503a0af1d6243fd59e0db0da/src/devices/bresser_5in1.c#L33
BTW: Which device/manual are you referring to? 2022-04-Manual_7002510_Weather-Center-5in1_de-en_BRESSER_v042022a.pdf states "Rainfall measuring range: 0...9999 mm". So, the rain counter value could in fact extend into msg[25], which also contains the battery state (bit 7) and the temperature sign (bit 3). That would mean that the rain counter MSB would be somewhere in bits 6:4 and 2:0. That seems a little strange... See https://github.com/merbanan/rtl_433/blob/7d5129786b35287f503a0af1d6243fd59e0db0da/src/devices/bresser_5in1.c#L42
Regards Matthias
OOps, your are right the manual states 9999mm (page 9 in German folder) as max value.
Wert | Bereich |
---|---|
Temperatur - Einheit | °C / °F |
Temperatur-Messbereich | -40 °C ... 60 °C |
Luftfeuchtigkeits_Messbereich | 1% ... 99 % |
Niederschlags-Einheit | mm, inch |
Niederschlags-Messbreich | 0 ... 9999 mm ( 0 ... 397.7 inch) |
Windgeschwindigkeit Einheit | mph, ms/s , km/h , knot |
Windgeschwindigkeit Messbereich | 0...112 mph, 0...50 m/s , 0...180 km/h, 0...97knots |
Windrichtungs-Anzeigen | 16 |
Let's see what happens if the rain continues and your sensor crosses the 999.9 mm mark.
I don't need a flood. Well I think it will take years for the counter to jump to 9999.9mm. Before that surly the battery is low, and then I will see if the counter then starts again at 0.
Cheers Andreas
p.s. But I am wondering about something else. It is unbelievable how many bytes are wasted for this simple XOR check. Wouldn't it have made more sense to use an error correction like Reed-Solomon instead? As far as I have observed, mostly just single bytes within the frame are broken, which could be easily rescued with an error correction.
OK, actually we have to be glad that the frame was defined super-simple. Only then it was possible to guess the unknown format.
@aanban I created a pull request in the rtl_433 project according to your finding. Hope this is o.k. for you...
@aanban I created a pull request in the rtl_433 project according to your finding. Hope this is o.k. for you...
Everything is perfect, thanks for doing this for me.
I also have a small addendum. Meanwhile, the battery of my 5in1 outdoor station was empty, so I had to replace it some days ago. Doing so, the rainfall counter jumps to 0. Probably we will not get out so easily what happens when the counter jumps from 999.9 mm to 1000.0mm, i.e. where to find it within the frame.
O.k., thank you for your message. My rain gauge is currently at 410mm - let's see if the batteries last until an overflow occurs...
I use this setup:
The received readings from the 5-in-1 sensor are confirmed by the base station. The SW worked right away, Respect!
This year white Christmas could be forgotten anyway, it's raining instead. But at least the rain counter is incrementing. Coincidentally, at my station there was just a change from 8980 (898.0mm) to 9112 (911.2mm) .
The 5-in-1 manual states rain-value range as [0 ... 999.9mm].
I wonder if there is a special reason why only three digits are used for the extraction of the rain value and the existing fourth digit of msg[24] is ignored. Or it this a bug?
I made a change in decodeBresser5In1Payload() line 542 from:
to this:
Example of an received frame, the rain-value is found in msg[23] and msg[24]
Maybe someone with an 5-in-1 station can confirm?