merbanan / rtl_433

Program to decode radio transmissions from devices on the ISM bands (and other frequencies)
GNU General Public License v2.0
6.14k stars 1.33k forks source link

Acurite 899 Rain Gauge Fails #972

Closed K2AAE closed 4 years ago

K2AAE commented 5 years ago

Just tried testing a new Acurite 0899 Rain Gauage, fails with: Acurite 5n1 sensor 0X0426 Ch C, Status 0, Unknown message type 0x30 This message repeats three times.

I can add -R 10 and only run 0896 which still detects nothing. I ran every Acurite device and only 40 responds, my 5n1 and a 'tower' device with the 0899 rain gauge above message mixed in.

rct commented 5 years ago

This sounds like the 899 rain gauge is a new/different device than the older 896.

The error message is essentially saying it's sending the same type of message as the 5-n-1, 592TXR Tower, 6045 lightning, etc. but the message type 0x30 is one we haven't seen yet. So it's a new device that support is needed for.

The normal thing to do is submit some sample messages to the rtl_433_tests repo.

Do you have some sort of display for that rain gauge? It would help to be able to figure out the encoding.

K2AAE commented 5 years ago

I purchased the device while I was waiting on my 5n1 to arrive, after I played with it I realized the rain gauge wouldn't work with the 5n1, nor would any extra temperature probes hence the reason I'm here. I cloned the git but when I try to make it: sudo make test python bin/run_test.py -I time --first-line Traceback (most recent call last): File "bin/run_test.py", line 13, in from deepdiff import DeepDiff ImportError: No module named deepdiff makefile:5: recipe for target 'test' failed make: *** [test] Error 1

zuckschwerdt commented 5 years ago

For reference this was also mentioned in #799

zuckschwerdt commented 5 years ago

Run rtl_433 with -S all. Check the recorded samples with e.g. `rtl_433 g001.cu8, then post them here or better PR to rtl_433_tests, along with a short text what value you expect to see (temperature, humidity, …). Thanks!

tonious commented 5 years ago

So I do not have a rain gauge of any kind, but rtl_433 compatibility is one of my requirements. I dug into this a little and found a post from 2014 that describes message type 0x30.

It looks like bytes 3-7 are a straight count of tipping bucket... tips, I guess. 7 significant bits per byte, with the high bit out of each byte acting as a parity bit. Most significant byte first.

Each tip should correspond to 1mm of rainfall.

walthowd commented 5 years ago

Not sure if this is the right track, but it looks like someone figured it out here:

https://groups.google.com/forum/#!topic/rtl_433/7ImutJT-dKY

I was going to buy a 899, but switched to a different model.

walthowd commented 5 years ago

Ehh, bought one anyway -- Trying to figure out how to add support.

Here is the signal with a few bucket tips back and forth: https://www.dropbox.com/s/0e7d9u664afg8zf/g001_433.92M_250k.cu8?dl=0

And then here is the signal with the next reading of a single bucket tip: https://www.dropbox.com/s/b35i176argdvaiy/g002_433.92M_250k.cu8?dl=0

And finally the last signal save with two more bucket tips: https://www.dropbox.com/s/ep5xbma8nh4yhu0/g003_433.92M_250k.cu8?dl=0

zuckschwerdt commented 5 years ago

I'll have a look. Will take a few days.

walthowd commented 5 years ago

I took a stab at adding support here, but my C is pretty rusty -- so far I don' think I'm matching the message type so this new code is not being evaluated:

https://github.com/walthowd/rtl_433/commit/cae3ccfcf0001453e8808e03c4f78db21113ee25

zuckschwerdt commented 5 years ago

@walthowd did you get any results with that modification? The samples you provided have different timing (PWM 500/1000) than the Acurite TXR (PWM 200/400) this code hooks into.

zuckschwerdt commented 5 years ago

There is a test branch in feat-acurite899 now. Please collect some bitbuffer outputs for different e.g. channels and id (replace battery to reset).

walthowd commented 5 years ago

@zuckschwerdt No, I didn't get any results from that modification and after I started digging into the signalling, I saw my differences were pretty large. Perhaps Acurite changed the hardware at some point in the last two years?

Thanks for looking into this! I'll pull the the test branch and collect some data.

walthowd commented 5 years ago

@zuckschwerdt So I'm an idiot. I bought what was listed as a 899 on eBay but they actually sent me a Acurite 875 (00875TX).

I didn't realize it until I wasn't able to get the channel and IDs to change and was looking at the 899 manual and realized I didn't have the jumper/switch to change channels. Then I looked right there on the bottom of the device and it has 00875TX printed on it.

So sorry for muddying the waters. I tested the branch tonight and here is the output: https://pastebin.com/TQCjqAvb

I wasn't able to get the channels or ID to change with resetting the batteries.

zuckschwerdt commented 5 years ago

:) No worries. From your data:

{48} 06 9a 18 00 6a 0e : 00000110 10011010 00011000 00000000 01101010 00001110
{48} 06 9a 18 00 6b 0f : 00000110 10011010 00011000 00000000 01101011 00001111
--
{48} 06 95 b8 00 00 db : 00000110 10010101 10111000 00000000 00000000 11011011
{48} 06 95 b8 00 02 d9 : 00000110 10010101 10111000 00000000 00000010 11011001
{48} 06 95 b8 00 03 d8 : 00000110 10010101 10111000 00000000 00000011 11011000
--
{48} 06 9f c8 00 01 40 : 00000110 10011111 11001000 00000000 00000001 01000000
{48} 06 9f c8 00 09 48 : 00000110 10011111 11001000 00000000 00001001 01001000
{48} 06 9f c8 00 0e 4f : 00000110 10011111 11001000 00000000 00001110 01001111
{48} 06 9f c8 00 0f 4e : 00000110 10011111 11001000 00000000 00001111 01001110

Should help to figure out the checksum. Some devices indeed buffer the ID even without power. It's very rare though. The channel setting should be something like a DIP switch? What other readings does this sensor have? Maybe the a1, 5b, fc above are the ID? Or 9a, 95, 9f could be something too, not an ID though.

walthowd commented 5 years ago

No dip switches present that I can see.

Here is some more output:

code note
{48} 06 97 b8 00 00 b9 1) Right after pulling batteries
{48} 06 97 b8 00 03 ba 2) Three bucket tips, batteries still inserted
{48} 06 91 e8 00 00 4f 3) Pulled batteries again
{48} 06 91 e8 00 02 4d 4) Two bucket tips, batteries still inserted
{48} 06 95 f8 00 00 9b 5) Pulled batteries again
{48} 06 95 f8 00 01 9a 6) One bucket tip, batteries still inserted
zuckschwerdt commented 5 years ago

(One good code per transmission is enough, shortened your table for brevity.) Looks like the 069 is constant, the next two nibbles are the ID, then maybe a nibble of flags? The checksum is something like XOR, but it doesn't fit exactly. I'll update the code to reflect the current understanding of the data.

walthowd commented 5 years ago

@zuckschwerdt Thank you! I also disassembled the unit to check for hidden dip switches but didn't find anything:

https://imgur.com/a/779lM5d

zuckschwerdt commented 5 years ago

Ultra-cheap chip-on-board blob ;) The channel could reasonably be hardcoded. Notice the link at R3 and then R8, R9 unpopulated. Those could be settings. Looks like the trace goes form VCC through the link then the cap to GND though? J3 (jumper) is obviously some setting. And the contacts near "Reset" could be test points to trigger a reset. But don't bridge anything without checking the traces before.

zuckschwerdt commented 5 years ago

If you want to try the (force push) updated branch: git reset --hard HEAD^ ; git pull

walthowd commented 5 years ago

Got it up and running, seems to be working perfectly so far! Sorry again on the confusion about the 875 vs the 899.

zuckschwerdt commented 5 years ago

We can leave the channel and battery flag aside, but we need to figure out the checksum before enabling this code -- there are false positives with other decoders otherwise. Maybe you can collect a long list of codes? Just redirect to a log, then grep for the code lines and condense with uniq -c so we know the codes are good.

walthowd commented 5 years ago

Sure, I can do that -- when you are referring to the codes you mean the bitbuffer output?

Like this: {48} 06 9a 18 00 6b 0f : 00000110 10011010 00011000 00000000 01101011 00001111

zuckschwerdt commented 5 years ago

Yes!

walthowd commented 5 years ago

Here you go. The line with 1440 entries was the unit sitting idle overnight. Then about three hours ago I started a slow drip into the unit to start incrementing values.

Full raw file is here: https://pastebin.com/eK3qqFhp

docker logs rtl_433 2>&1 | grep {  | sed -e 's/^.....//' | sort | uniq -c
    379 { 0}                   : 
      7 {11} 06 80             : 00000110 100
      1 { 3} 00                : 000
      1 {37} 2f c0 28 db a8    : 00101111 11000000 00101000 11011011 10101
      1 {37} 2f c0 29 aa d8    : 00101111 11000000 00101001 10101010 11011
      1 {37} 2f c0 2f ec 98    : 00101111 11000000 00101111 11101100 10011
      1 {37} 2f c0 31 40 a8    : 00101111 11000000 00110001 01000000 10101
      1 {37} 2f c0 32 13 f8    : 00101111 11000000 00110010 00010011 11111
      1 {37} 2f c0 32 93 78    : 00101111 11000000 00110010 10010011 01111
      1 {37} 2f c0 39 31 50    : 00101111 11000000 00111001 00110001 01010
      1 {45} 34 af c0 30 39 d0 : 00110100 10101111 11000000 00110000 00111001 11010
   1440 {48} 06 95 f8 04 05 5a : 00000110 10010101 11111000 00000100 00000101 01011010 
      6 {48} 06 95 f8 04 0d 52 : 00000110 10010101 11111000 00000100 00001101 01010010 
      6 {48} 06 95 f8 04 15 4a : 00000110 10010101 11111000 00000100 00010101 01001010 
      6 {48} 06 95 f8 04 1e 41 : 00000110 10010101 11111000 00000100 00011110 01000001 
      6 {48} 06 95 f8 04 26 79 : 00000110 10010101 11111000 00000100 00100110 01111001 
      6 {48} 06 95 f8 04 2e 71 : 00000110 10010101 11111000 00000100 00101110 01110001 
      6 {48} 06 95 f8 04 36 69 : 00000110 10010101 11111000 00000100 00110110 01101001 
      6 {48} 06 95 f8 04 3e 61 : 00000110 10010101 11111000 00000100 00111110 01100001 
      6 {48} 06 95 f8 04 45 1a : 00000110 10010101 11111000 00000100 01000101 00011010 
      6 {48} 06 95 f8 04 4d 12 : 00000110 10010101 11111000 00000100 01001101 00010010 
      6 {48} 06 95 f8 04 55 0a : 00000110 10010101 11111000 00000100 01010101 00001010 
      6 {48} 06 95 f8 04 5d 02 : 00000110 10010101 11111000 00000100 01011101 00000010 
      6 {48} 06 95 f8 04 64 3b : 00000110 10010101 11111000 00000100 01100100 00111011 
      6 {48} 06 95 f8 04 6b 34 : 00000110 10010101 11111000 00000100 01101011 00110100 
      6 {48} 06 95 f8 04 73 2c : 00000110 10010101 11111000 00000100 01110011 00101100 
      6 {48} 06 95 f8 04 7a 25 : 00000110 10010101 11111000 00000100 01111010 00100101 
      6 {48} 06 95 f8 04 82 dd : 00000110 10010101 11111000 00000100 10000010 11011101 
      6 {48} 06 95 f8 04 8a d5 : 00000110 10010101 11111000 00000100 10001010 11010101 
      6 {48} 06 95 f8 04 91 ce : 00000110 10010101 11111000 00000100 10010001 11001110 
      6 {48} 06 95 f8 04 98 c7 : 00000110 10010101 11111000 00000100 10011000 11000111 
      6 {48} 06 95 f8 04 9f c0 : 00000110 10010101 11111000 00000100 10011111 11000000 
      6 {48} 06 95 f8 04 a7 f8 : 00000110 10010101 11111000 00000100 10100111 11111000 
      6 {48} 06 95 f8 04 ae f1 : 00000110 10010101 11111000 00000100 10101110 11110001 
      6 {48} 06 95 f8 04 b5 ea : 00000110 10010101 11111000 00000100 10110101 11101010 
      6 {48} 06 95 f8 04 bc e3 : 00000110 10010101 11111000 00000100 10111100 11100011 
      6 {48} 06 95 f8 04 c3 9c : 00000110 10010101 11111000 00000100 11000011 10011100 
      6 {48} 06 95 f8 04 ca 95 : 00000110 10010101 11111000 00000100 11001010 10010101 
      6 {48} 06 95 f8 04 d1 8e : 00000110 10010101 11111000 00000100 11010001 10001110 
      6 {48} 06 95 f8 04 d8 87 : 00000110 10010101 11111000 00000100 11011000 10000111 
      6 {48} 06 95 f8 04 df 80 : 00000110 10010101 11111000 00000100 11011111 10000000 
      6 {48} 06 95 f8 04 e5 ba : 00000110 10010101 11111000 00000100 11100101 10111010 
      6 {48} 06 95 f8 04 ec b3 : 00000110 10010101 11111000 00000100 11101100 10110011 
      6 {48} 06 95 f8 04 f2 ad : 00000110 10010101 11111000 00000100 11110010 10101101 
      6 {48} 06 95 f8 04 f9 a6 : 00000110 10010101 11111000 00000100 11111001 10100110 
      6 {48} 06 95 f8 05 00 6e : 00000110 10010101 11111000 00000101 00000000 01101110 
      6 {48} 06 95 f8 05 07 69 : 00000110 10010101 11111000 00000101 00000111 01101001 
      6 {48} 06 95 f8 05 0d 63 : 00000110 10010101 11111000 00000101 00001101 01100011 
      6 {48} 06 95 f8 05 14 7a : 00000110 10010101 11111000 00000101 00010100 01111010 
      5 {48} 06 95 f8 05 1b 75 : 00000110 10010101 11111000 00000101 00011011 01110101 
      6 {48} 06 95 f8 05 22 4c : 00000110 10010101 11111000 00000101 00100010 01001100 
      6 {48} 06 95 f8 05 28 46 : 00000110 10010101 11111000 00000101 00101000 01000110 
      6 {48} 06 95 f8 05 2e 40 : 00000110 10010101 11111000 00000101 00101110 01000000 
      5 {48} 06 95 f8 05 35 5b : 00000110 10010101 11111000 00000101 00110101 01011011 
      6 {48} 06 95 f8 05 3b 55 : 00000110 10010101 11111000 00000101 00111011 01010101 
      6 {48} 06 95 f8 05 41 2f : 00000110 10010101 11111000 00000101 01000001 00101111 
      6 {48} 06 95 f8 05 47 29 : 00000110 10010101 11111000 00000101 01000111 00101001 
      6 {48} 06 95 f8 05 4e 20 : 00000110 10010101 11111000 00000101 01001110 00100000 
      6 {48} 06 95 f8 05 54 3a : 00000110 10010101 11111000 00000101 01010100 00111010 
      6 {48} 06 95 f8 05 5a 34 : 00000110 10010101 11111000 00000101 01011010 00110100 
      6 {48} 06 95 f8 05 60 0e : 00000110 10010101 11111000 00000101 01100000 00001110 
      6 {48} 06 95 f8 05 66 08 : 00000110 10010101 11111000 00000101 01100110 00001000 
      6 {48} 06 95 f8 05 6d 03 : 00000110 10010101 11111000 00000101 01101101 00000011 
      6 {48} 06 95 f8 05 73 1d : 00000110 10010101 11111000 00000101 01110011 00011101 
      6 {48} 06 95 f8 05 79 17 : 00000110 10010101 11111000 00000101 01111001 00010111 
      6 {48} 06 95 f8 05 7f 11 : 00000110 10010101 11111000 00000101 01111111 00010001 
      6 {48} 06 95 f8 05 85 eb : 00000110 10010101 11111000 00000101 10000101 11101011 
      6 {48} 06 95 f8 05 8b e5 : 00000110 10010101 11111000 00000101 10001011 11100101 
      6 {48} 06 95 f8 05 91 ff : 00000110 10010101 11111000 00000101 10010001 11111111 
      6 {48} 06 95 f8 05 97 f9 : 00000110 10010101 11111000 00000101 10010111 11111001 
      6 {48} 06 95 f8 05 9d f3 : 00000110 10010101 11111000 00000101 10011101 11110011 
      6 {48} 06 95 f8 05 a3 cd : 00000110 10010101 11111000 00000101 10100011 11001101 
      6 {48} 06 95 f8 05 a9 c7 : 00000110 10010101 11111000 00000101 10101001 11000111 
      6 {48} 06 95 f8 05 af c1 : 00000110 10010101 11111000 00000101 10101111 11000001 
      6 {48} 06 95 f8 05 b5 db : 00000110 10010101 11111000 00000101 10110101 11011011 
      6 {48} 06 95 f8 05 ba d4 : 00000110 10010101 11111000 00000101 10111010 11010100 
      6 {48} 06 95 f8 05 c0 ae : 00000110 10010101 11111000 00000101 11000000 10101110 
      6 {48} 06 95 f8 05 c6 a8 : 00000110 10010101 11111000 00000101 11000110 10101000 
      6 {48} 06 95 f8 05 cb a5 : 00000110 10010101 11111000 00000101 11001011 10100101 
      6 {48} 06 95 f8 05 d1 bf : 00000110 10010101 11111000 00000101 11010001 10111111 
      6 {48} 06 95 f8 05 d6 b8 : 00000110 10010101 11111000 00000101 11010110 10111000 
      6 {48} 06 95 f8 05 dc b2 : 00000110 10010101 11111000 00000101 11011100 10110010 
      6 {48} 06 95 f8 05 e1 8f : 00000110 10010101 11111000 00000101 11100001 10001111 
      6 {48} 06 95 f8 05 e7 89 : 00000110 10010101 11111000 00000101 11100111 10001001 
      6 {48} 06 95 f8 05 ec 82 : 00000110 10010101 11111000 00000101 11101100 10000010 
      6 {48} 06 95 f8 05 f1 9f : 00000110 10010101 11111000 00000101 11110001 10011111 
      6 {48} 06 95 f8 05 f7 99 : 00000110 10010101 11111000 00000101 11110111 10011001 
      5 {48} 06 95 f8 05 fd 93 : 00000110 10010101 11111000 00000101 11111101 10010011 
      6 {48} 06 95 f8 06 02 3f : 00000110 10010101 11111000 00000110 00000010 00111111 
      5 {48} 06 95 f8 06 07 3a : 00000110 10010101 11111000 00000110 00000111 00111010 
      6 {48} 06 95 f8 06 0d 30 : 00000110 10010101 11111000 00000110 00001101 00110000 
      6 {48} 06 95 f8 06 12 2f : 00000110 10010101 11111000 00000110 00010010 00101111 
      6 {48} 06 95 f8 06 18 25 : 00000110 10010101 11111000 00000110 00011000 00100101 
      6 {48} 06 95 f8 06 1d 20 : 00000110 10010101 11111000 00000110 00011101 00100000 
      6 {48} 06 95 f8 06 22 1f : 00000110 10010101 11111000 00000110 00100010 00011111 
      5 {48} 06 95 f8 06 28 15 : 00000110 10010101 11111000 00000110 00101000 00010101 
      6 {48} 06 95 f8 06 2d 10 : 00000110 10010101 11111000 00000110 00101101 00010000 
      6 {48} 06 95 f8 06 32 0f : 00000110 10010101 11111000 00000110 00110010 00001111 
      6 {48} 06 95 f8 06 37 0a : 00000110 10010101 11111000 00000110 00110111 00001010 
      6 {48} 06 95 f8 06 3c 01 : 00000110 10010101 11111000 00000110 00111100 00000001 
      5 {48} 06 95 f8 06 42 7f : 00000110 10010101 11111000 00000110 01000010 01111111 
      6 {48} 06 95 f8 06 47 7a : 00000110 10010101 11111000 00000110 01000111 01111010 
      6 {48} 06 95 f8 06 4c 71 : 00000110 10010101 11111000 00000110 01001100 01110001 
      5 {48} 06 95 f8 06 52 6f : 00000110 10010101 11111000 00000110 01010010 01101111 
      6 {48} 06 95 f8 06 56 6b : 00000110 10010101 11111000 00000110 01010110 01101011 
      6 {48} 06 95 f8 06 5c 61 : 00000110 10010101 11111000 00000110 01011100 01100001 
      6 {48} 06 95 f8 06 61 5c : 00000110 10010101 11111000 00000110 01100001 01011100 
      6 {48} 06 95 f8 06 66 5b : 00000110 10010101 11111000 00000110 01100110 01011011 
      6 {48} 06 95 f8 06 6b 56 : 00000110 10010101 11111000 00000110 01101011 01010110 
      6 {48} 06 95 f8 06 70 4d : 00000110 10010101 11111000 00000110 01110000 01001101 
      6 {48} 06 95 f8 06 75 48 : 00000110 10010101 11111000 00000110 01110101 01001000 
      6 {48} 06 95 f8 06 7a 47 : 00000110 10010101 11111000 00000110 01111010 01000111 
      6 {48} 06 95 f8 06 7f 42 : 00000110 10010101 11111000 00000110 01111111 01000010 
      6 {48} 06 95 f8 06 84 b9 : 00000110 10010101 11111000 00000110 10000100 10111001 
      6 {48} 06 95 f8 06 8a b7 : 00000110 10010101 11111000 00000110 10001010 10110111 
      6 {48} 06 95 f8 06 8e b3 : 00000110 10010101 11111000 00000110 10001110 10110011 
      6 {48} 06 95 f8 06 93 ae : 00000110 10010101 11111000 00000110 10010011 10101110 
      6 {48} 06 95 f8 06 98 a5 : 00000110 10010101 11111000 00000110 10011000 10100101 
      6 {48} 06 95 f8 06 9d a0 : 00000110 10010101 11111000 00000110 10011101 10100000 
      6 {48} 06 95 f8 06 a2 9f : 00000110 10010101 11111000 00000110 10100010 10011111 
      6 {48} 06 95 f8 06 a7 9a : 00000110 10010101 11111000 00000110 10100111 10011010 
      6 {48} 06 95 f8 06 ac 91 : 00000110 10010101 11111000 00000110 10101100 10010001 
      6 {48} 06 95 f8 06 b1 8c : 00000110 10010101 11111000 00000110 10110001 10001100 
      6 {48} 06 95 f8 06 b6 8b : 00000110 10010101 11111000 00000110 10110110 10001011 
      6 {48} 06 95 f8 06 ba 87 : 00000110 10010101 11111000 00000110 10111010 10000111 
      6 {48} 06 95 f8 06 bf 82 : 00000110 10010101 11111000 00000110 10111111 10000010 
      6 {48} 06 95 f8 06 c3 fe : 00000110 10010101 11111000 00000110 11000011 11111110 
      6 {48} 06 95 f8 06 c8 f5 : 00000110 10010101 11111000 00000110 11001000 11110101 
      6 {48} 06 95 f8 06 cc f1 : 00000110 10010101 11111000 00000110 11001100 11110001 
      6 {48} 06 95 f8 06 d1 ec : 00000110 10010101 11111000 00000110 11010001 11101100 
      6 {48} 06 95 f8 06 d5 e8 : 00000110 10010101 11111000 00000110 11010101 11101000 
      6 {48} 06 95 f8 06 da e7 : 00000110 10010101 11111000 00000110 11011010 11100111 
      6 {48} 06 95 f8 06 de e3 : 00000110 10010101 11111000 00000110 11011110 11100011 
      6 {48} 06 95 f8 06 e2 df : 00000110 10010101 11111000 00000110 11100010 11011111 
      6 {48} 06 95 f8 06 e7 da : 00000110 10010101 11111000 00000110 11100111 11011010 
      6 {48} 06 95 f8 06 ec d1 : 00000110 10010101 11111000 00000110 11101100 11010001 
      6 {48} 06 95 f8 06 f0 cd : 00000110 10010101 11111000 00000110 11110000 11001101 
      6 {48} 06 95 f8 06 f5 c8 : 00000110 10010101 11111000 00000110 11110101 11001000 
      6 {48} 06 95 f8 06 f9 c4 : 00000110 10010101 11111000 00000110 11111001 11000100 
      6 {48} 06 95 f8 06 fe c3 : 00000110 10010101 11111000 00000110 11111110 11000011 
      6 {48} 06 95 f8 07 02 0e : 00000110 10010101 11111000 00000111 00000010 00001110 
      6 {48} 06 95 f8 07 07 0b : 00000110 10010101 11111000 00000111 00000111 00001011 
      6 {48} 06 95 f8 07 0c 00 : 00000110 10010101 11111000 00000111 00001100 00000000 
      6 {48} 06 95 f8 07 10 1c : 00000110 10010101 11111000 00000111 00010000 00011100 
      6 {48} 06 95 f8 07 14 18 : 00000110 10010101 11111000 00000111 00010100 00011000 
      6 {48} 06 95 f8 07 19 15 : 00000110 10010101 11111000 00000111 00011001 00010101 
      6 {48} 06 95 f8 07 1d 11 : 00000110 10010101 11111000 00000111 00011101 00010001 
      6 {48} 06 95 f8 07 21 2d : 00000110 10010101 11111000 00000111 00100001 00101101 
      5 {48} 06 95 f8 07 26 2a : 00000110 10010101 11111000 00000111 00100110 00101010 
      6 {48} 06 95 f8 07 2a 26 : 00000110 10010101 11111000 00000111 00101010 00100110 
      6 {48} 06 95 f8 07 2e 22 : 00000110 10010101 11111000 00000111 00101110 00100010
merbanan commented 5 years ago
06 95 f8 07 2e 22
  6^ 5^ 8^ 7^ e =2

Seems to match 4 of the bits.

zuckschwerdt commented 5 years ago

But the upper nibbles are trouble.

zuckschwerdt commented 5 years ago

@walthowd do you known what a bucket tip amounts to? It's usually some fraction of a mm.

walthowd commented 5 years ago

@zuckschwerdt its 0.2mm

iandees commented 5 years ago

Looks like a change was committed in to support the 899 rain gauge: https://github.com/merbanan/rtl_433/commit/4c4182e99f0d9fba513a16958e988b0211e6bf5c

Should that be considered complete? From the comments here it sounds like you're still working on it.

zuckschwerdt commented 5 years ago

@iandees yes, I merged some code to get us started, but the values still need to be verified. The E.g. rain_mm is a raw counter output and probably not a mm value. @walthowd noted that 5 counts should be one mm, can you check and confirm that?

iandees commented 5 years ago

I'm having a hard time getting my SDR to pick up the rain gauge's signal (rtl_433 sees it but only outputs the timestamp – no data), but it seems that one tip of the bucket (the magnet passing over the sensor once) shows up as 0.01 mm on the display.

zuckschwerdt commented 5 years ago

So 1/100 of a mm – 100 counts to a mm? That doesn't sound right.

walthowd commented 5 years ago

I bought the 899 on eBay but was sent the 875 which is what the current branch added support for. I can definitely verify each bucket tip is 0.2mm which is also reflected on the display.

This is documented as well in the manual: https://www.dropbox.com/s/9hnkv96rka4l9gi/Screenshot%202019-09-16%2008.32.44.png?dl=0

https://www.acurite.com/media/manuals/00875-instructions.pdf (Page 11)

zuckschwerdt commented 5 years ago

Thanks for the verification. The 899 then should be broadly in the same range, right? Maybe 0.1 but rather not 0.01?

walthowd commented 5 years ago

The 899 manual says it has the same increments (0.2mm):

https://www.dropbox.com/s/d8pdkto1c6iqr6m/Screenshot%202019-09-16%2008.42.06.png?dl=0

https://www.acurite.com/media/manuals/00899-02445-instructions.pdf (Page 12)

iandees commented 5 years ago

Looking closer at the screen I see that the 0.01 I mentioned above was displayed in inches, not millimeters. I must have pulled the batteries out and reset my desired units.

Mine is definitely an 899, but I'm still debugging connection problems. When I put the batteries in, rtl433 gets a couple data points and then stops seeing anything. The base station/screen doesn't see anything and blinks the antenna icon indicating no signal. I have fresh batteries in, checked the channel (both are A) and have them sitting right next to one another. I'll probably return it and try again...

iandees commented 5 years ago

After putting in fresh batteries and being patient (it seems to send messages every 1-5 minutes), I'm also able to confirm that one tip of the bucket shows up on the screen as 0.2mm.

rtl_433 is able to see the device, but it only outputs timestamps. I can see a timestamp-only message from rtl_433 that coincides with when the rain counter screen updates.

Anything I can do to help with parsing?

zuckschwerdt commented 5 years ago

That's really strange. There should never be only a timestamp. Is there more useful info with -v or -vv or -vvv? If you can grab a sample (-S all) that only shows a timestamp when read back in, put it here (as zip).

iandees commented 5 years ago

Here's a sample that contains the timestamp-only message: g001_433.92M_250k.cu8.zip

Here's what the console saw during this:

/usr/local # rtl_433 -S all
rtl_433 version unknown inputs file rtl_tcp RTL-SDR
Use -h for usage help and see https://triq.org/ for documentation.
Trying conf file at "rtl_433.conf"...
Trying conf file at "/root/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...

    Consider using "-M newmodel" to transition to new model keys. This will become the default someday.
    A table of changes and discussion is at https://github.com/merbanan/rtl_433/pull/986.

Registered 106 out of 136 device decoding protocols [ 1-4 8 11-12 15-17 19-21 23 25-26 29-36 38-60 63 67-71 73-100 102-103 108-116 119 121 124-128 131-136 ]
Found Rafael Micro R820T tuner
Exact sample rate is: 250000.000414 Hz
[R82XX] PLL not locked!
Sample rate set to 250000 S/s.
Tuner gain set to Auto.
Tuned to 433.920MHz.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : 2019-09-17 18:38:22
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : 2019-09-17 18:38:22
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : 2019-09-17 18:38:22
*** Saving signal to file g001_433.92M_250k.cu8 (68190 samples, 262144 bytes)

Note that for some reason I get three copies of the message output for everything, not just this.

iandees commented 5 years ago

Also: during this sample, the screen read "0.5 mm".

zuckschwerdt commented 5 years ago

Does it show timestamps only even when you read it back (rtl_433 g001_433.92M_250k.cu8)? Works fine here:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
model     : Acurite-Rain899                        id        : 2935
channel   : 0            Battery   : 0             Rainfall Accumulation: 717252128 mm
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
model     : Acurite-Rain899                        id        : 2935
channel   : 0            Battery   : 0             Rainfall Accumulation: 717251904 mm
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
model     : Acurite-Rain899                        id        : 2935
channel   : 0            Battery   : 0             Rainfall Accumulation: 717252016 mm
iandees commented 5 years ago

Yep:

Test mode active. Reading samples from file: /tmp/parenttmp/g001_433.92M_250k.cu8
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s

This is built from https://github.com/merbanan/rtl_433/commit/3d36258a92052e655b419a750894494c4706e967.

I'll try again with a newer rev.

iandees commented 5 years ago

Same thing with abb2a4dd (newer) and 6d75c7db (older, a tagged release). 🤔

zuckschwerdt commented 5 years ago

Strange. Something is broken on your setup. Try other outputs (-F json).

iandees commented 5 years ago

Other outputs also only show timestamp.

I'm running this on my Synology NAS via Docker (the SDR is connected to it via USB). I'll try directly from my laptop later.

iandees commented 5 years ago

Apologies for making this a bit off-topic. If there's an IRC channel or you'd like me to file a separate ticket, let me know.

To confirm, I'm using BUILDING.md and doing the following:

curl -Ls https://github.com/merbanan/rtl_433/archive/19.08.tar.gz | tar -zxf -
cd rtl_433-19.08/
mkdir build
cd build
cmake ..
make

and getting

# src/rtl_433 -V
rtl_433 version unknown inputs file rtl_tcp RTL-SDR
Use -h for usage help and see https://triq.org/ for documentation.
Trying conf file at "rtl_433.conf"...
Trying conf file at "/root/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...

Should the build process be inserting the version number in the -V output?

zuckschwerdt commented 5 years ago

You only get a build number when using git. (git clone https://github.com/merbanan/rtl_433.git ; cd rtl_433 ; mkdir build ; cd build ; cmake .. ; make)

iandees commented 5 years ago

Built it on my Mac and got the same timestamp-only results when reading the capture:

$ src/rtl_433 ~/Downloads/g001_433.92M_250k.cu8
rtl_433 version 19.08-13-gabb2a4d branch master at 201909172102 inputs file rtl_tcp RTL-SDR
Use -h for usage help and see https://triq.org/ for documentation.
Trying conf file at "rtl_433.conf"...
Trying conf file at "/Users/iandees/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...

    Consider using "-M newmodel" to transition to new model keys. This will become the default someday.
    A table of changes and discussion is at https://github.com/merbanan/rtl_433/pull/986.

Registered 108 out of 138 device decoding protocols [ 1-4 8 11-12 15-17 19-21 23 25-26 29-36 38-60 63 67-71 73-100 102-103 108-116 119 121 124-128 131-138 ]
Test mode active. Reading samples from file: /Users/iandees/Downloads/g001_433.92M_250k.cu8
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
iandees commented 5 years ago

@zuckschwerdt which version of librtlsdr are you compiling with? Might that cause a problem?

zuckschwerdt commented 5 years ago

I don't suspect that to be an issue. If RTL-SDR works it's supported. The problem here is that the output data is either truncated in the decoder or on print. Very strange... Does reading other tes files from the rtl_433_tests repo work? Is it limited to this particular protocol / decoder?