Acurite 899 rain gauge almost working

331 views
Skip to first unread message

Jeff Johnson

unread,
Dec 10, 2017, 5:05:09 PM12/10/17
to rtl_433
I spent a couple of days trying to make rtl_433 work with the Acurite 899 rain gauge. I seem to have the data reported accurately but I think I'm going to need help getting the data to be posted in csv files (the file type I use for my home weather and solar monitoring system). I must admit, I'm totally lost on how to have the meters readings added to the csv entry generated. If anyone has a tip, please let me know. Once that's working I'd like to submit my update to the acurite source so that others with this sensor can incorporate it in their system.

Jeff

Robert Terzi

unread,
Dec 10, 2017, 5:29:09 PM12/10/17
to Jeff Johnson, rtl_433
Is the Acurite 899 the same as the 896 rain guage?    Are you using the same decoder?

Either way, Can you please submit some samples to the rtl_433_tests repo?    If I'm remembering correctly,  there are no 896 samples, and the current implementation generates a lot of false positives.

As far as writing CSV files,  it should be pretty straightforward with -F csv and a tiny bit of shell scripting depending on what you need.  You didn't provide any details.  What OS are you running rtl_433 on?

Jeff Johnson

unread,
Dec 11, 2017, 8:39:40 AM12/11/17
to rtl_433
Thanks for the response. As far as I can tell the two gauges (896 and 899) are slightly different. I had to establish a new channel decode, add the 0x30 message type selection, and slightly alter the data decryption for the rain counter. 
Digging a little deeper, the json output seems correct...

{"time" : "2017-12-11 08:29:20", "model" : "Acurite tower sensor", "id" : 14610, "channel" : "A", "temperature_C" : 3.500, "humidity" : 78, "battery" : 0, "status" : 68}
{"time" : "2017-12-11 08:29:24", "model" : "Acurite Rain 899", "id" : 2471, "channel" : "A", "sequence_num" : 2, "battery" : 1, "message_type" : 48, "raincounter_raw" : 1043, "rainfall_accumulation" : 10.430}

however the csv output is missing the sensor data...

2017-12-10 18:35:19,Acurite tower sensor,14610,A,0,10.600,,,,70,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,68,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2017-12-10 18:35:24,Acurite Rain 899,2471,A,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

I'll pull some samples to add to the repository as soon as I have time. It will be my first venture down that avenue.

As for my configuration, rtl dongle on a lenovo T510 laptop running Centos 7 (for testing and for home server).

Jeff

Christian Zuckschwerdt

unread,
Dec 11, 2017, 9:26:02 AM12/11/17
to rtl_433
acurite.c is broken. The enumeration of possible fields is missing (see `.fields` and `output_fields` in other decoders). CSV will skip undeclared fields.

Jeff Johnson

unread,
Dec 11, 2017, 9:38:17 AM12/11/17
to rtl_433
Thanks for the insight. Will take a look.

Jeff Johnson

unread,
Dec 30, 2017, 12:07:13 PM12/30/17
to rtl_433
For anyone interested, the changes needed for acurite.c  to support the 899 rain gauge are:

30d29
< #define ACURITE_MSGTYPE_RAINFALL     0x30
176,190d174
< // The high 2 bits of byte zero are the channel (bits 7,6)
< //  00 = A
< //  01 = B
< //  10 = C
< static char chAltLetter[4] = {'A','B','C','E'}; // 'E' stands for error
< static char acurite_getAltChannel(uint8_t byte){
<     int channel = (byte & 0xC0) >> 6;
<     return chAltLetter[channel];
< }
637,656d620
< } else  if (message_type == ACURITE_MSGTYPE_RAINFALL) {
< // Rain fall gauge 899
< //  needs fields and output_fields definitions to create CSV output (see Lacrosse)
< //
< channel = acurite_getAltChannel(bb[0]);
< sprintf(channel_str, "%c", channel);
<         raincounter = acurite_getRainfallCounter(bb[5], bb[6]);
<         data = data_make(
<         "time",          "", DATA_STRING, time_str,
<         "model",        "", DATA_STRING, "Acurite Rain 899",
< "id", "", DATA_INT, sensor_id,
<           "channel",      "", DATA_STRING, &channel_str,
<         "battery",      "Battery ",    DATA_INT, battery_low,
<                 "raincounter_raw", "raincount", DATA_INT,    raincounter,
<                 NULL);
<         data_acquired_handler(data);
< valid++;
1070c1034
<     .disabled       = 0,
---
>     .disabled       = 1,

Still learning git..
Reply all
Reply to author
Forward
0 new messages