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.

iandees commented 5 years ago

I get data from my other sensors. It's all repeated three times, but it does come through correctly.

# rtl_433 -F json
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.
Allocating 15 zero-copy buffers
Failed to allocate zero-copy buffer for transfer 0
Falling back to buffers in userspace
{"time" : "2019-09-20 21:02:19", "model" : "Acurite tower sensor", "id" : 13142, "sensor_id" : 13142, "channel" : "B", "temperature_C" : 24.800, "humidity" : 46, "battery_low" : 1}
{"time" : "2019-09-20 21:02:19", "model" : "Acurite tower sensor", "id" : 13142, "sensor_id" : 13142, "channel" : "B", "temperature_C" : 24.800, "humidity" : 46, "battery_low" : 1}
{"time" : "2019-09-20 21:02:19", "model" : "Acurite tower sensor", "id" : 13142, "sensor_id" : 13142, "channel" : "B", "temperature_C" : 24.800, "humidity" : 46, "battery_low" : 1}
{"time" : "2019-09-20 21:02:25", "model" : "Acurite tower sensor", "id" : 2935, "sensor_id" : 2935, "channel" : "A", "temperature_C" : 20.600, "humidity" : 63, "battery_low" : 0}
{"time" : "2019-09-20 21:02:25", "model" : "Acurite tower sensor", "id" : 2935, "sensor_id" : 2935, "channel" : "A", "temperature_C" : 20.600, "humidity" : 63, "battery_low" : 0}
{"time" : "2019-09-20 21:02:25", "model" : "Acurite tower sensor", "id" : 2935, "sensor_id" : 2935, "channel" : "A", "temperature_C" : 20.600, "humidity" : 63, "battery_low" : 0}
{"time" : "2019-09-20 21:02:26", "model" : "Acurite tower sensor", "id" : 12824, "sensor_id" : 12824, "channel" : "A", "temperature_C" : 31.300, "humidity" : 58, "battery_low" : 0}
{"time" : "2019-09-20 21:02:26", "model" : "Acurite tower sensor", "id" : 12824, "sensor_id" : 12824, "channel" : "A", "temperature_C" : 31.300, "humidity" : 58, "battery_low" : 0}
{"time" : "2019-09-20 21:02:26", "model" : "Acurite tower sensor", "id" : 12824, "sensor_id" : 12824, "channel" : "A", "temperature_C" : 31.300, "humidity" : 58, "battery_low" : 0}

When running it with data from tests it seems to work (although maybe duplicating output?)

$ rtl_433 acurite/Acurite_986/Acurite_TX_51.cu8
rtl_433 version 19.08 branch  at 201908291429 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 ]
Test mode active. Reading samples from file: acurite/Acurite_986/Acurite_TX_51.cu8
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.123836s
model     : Acurite 986 Sensor                     id        : 17021
channel   : 1R           temperature: 51.000000 F  battery   : OK            status    : 0
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.123836s
model     : Acurite 986 Sensor                     id        : 17021
channel   : 1R           temperature: 51.000000 F  battery   : OK            status    : 0
zuckschwerdt commented 5 years ago

Can you confirm it's really that decoder returning the bad data? rtl_433 -R 40 filename.cu8

iandees commented 5 years ago

Yep, looks like it is:

# rtl_433 -R 40 /tmp/parenttmp/g001_433.92M_250k.cu8
rtl_433 version 19.08 branch  at 201908291429 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 1 out of 136 device decoding protocols [ 40 ]
Test mode active. Reading samples from file: /tmp/parenttmp/g001_433.92M_250k.cu8
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : @0.317064s
zuckschwerdt commented 5 years ago

Perhaps sprinkle the code with printf's to see where the data goes missing. Put e.g. printf("%s : %d = %p\n", __func__, __LINE__, data); in acurite.c after // Rain Fall Gauge 899, before data_make and decoder_output_data.

iandees commented 5 years ago

Found a fix to get data out of data_make() and filed a PR for it.

zuckschwerdt commented 5 years ago

Oh no, I'm so sorry. I have an uncommited change …raincounter * 0.2 there. That's why it was working for me. Thanks for seeing this through and fixing it!

iandees commented 5 years ago

No problem! Thanks for the debug pointers. Seems to be working.

merbanan commented 4 years ago

@zuckschwerdt can this be closed?

makeitworktech commented 2 years ago

I see this is closed, but why isn't the 899 listed in supported devices?

zuckschwerdt commented 2 years ago

"899 Rain" is now added to the list with 5c17e4e.