Gary,

thank you for your post.  It has been helpful.  I have made some progress 
now.

First I think I might be confused about how to set up my config file as to 
whether I am using the SDR option or the Acurite Option when configuring my 
station.  I have come to the conclusion that choosing SDR is correct (I am 
using an SDR to read the data from my weather station as opposed to having 
the station directly connected to my Pi).

Using you suggestion and configuring for the Acurite option I was able to 
get the parser to show the total rain (rain_in) when I ran the sdr.py 
code.  However, when I ran the weewx in direct mode, it said it could not 
find the device on USB.  So I went back to choosing the SDR option.  I then 
went to the SDR class and found where the sensor_map section was and added 
a line for my rain_in fully qualified name.  Then when I re-ran the sdr.py 
code I was still getting the rain_in/rain_total values showing in my parsed 
data and when I reun weewx in direct mode it is working again, although no 
rain data in the loops or in the records.  So that is some progress at 
least.

Also, I am still not getting any rain data when I look at my generated web 
page.

 

On Wednesday, May 20, 2020 at 11:55:38 PM UTC-4, gjr80 wrote:
>
> Hi,
>
> Not a sdr driver or Acurite user but looking at the sdr driver as far as I 
> can tell the sdr driver expects Acurite5n1PacketV2 rain data to be in 
> field rain_mm whereas you appear to have rain_in. You could try adding 
> the following two highlighted lines to /usr/share/weewx/user/sdr.py: 
>
>         if 'wind_dir_deg' in obj:
>             pkt['wind_dir'] = Packet.get_float(obj, 'wind_dir_deg')
>         if 'rain_mm' in obj:
>             pkt['rain_total'] = Packet.get_float(obj, 'rain_mm') / 25.4
>         if 'rain_in' in obj:
>             pkt['rain_total'] = Packet.get_float(obj, 'rain_in')
>         if 'temperature_F' in obj:
>             pkt['temperature'] = Packet.get_float(obj, 'temperature_F')
>
> Save sdr.py then try running sdr.py directly again.
>
> Oh, and of course, make sure you keep a back of sdr.py before making any 
> changes.
>
> Gary
>
> On Thursday, 21 May 2020 12:54:38 UTC+10, Andrew Mackey wrote:
>>
>> After installing the rtl software and the weewx software on my Pi 4 and 
>> getting everything configured I am getting things to work as expected.  
>>  Just no rain data.   I was expecting to have this problem because the 
>> output from running the command sudo PYTHONPATH=/usr/share/weewx python 
>> /usr/share/weewx/user/sdr.py --cmd="rtl_433 -M utc -F json" is missing the 
>> rain data in the parsed section.  Notice in the output below that there is 
>> a value in the 'rain_in' for the out section, but that rain data is not in 
>> the parsed section.
>>
>>
>> out:[u'{"time" : "2020-05-21 02:27:42", "model" : "Acurite-5n1", 
>> "subtype" : 49, "id" : 1066, "channel" : "B", "sequence_num" : 0, 
>> "battery_ok" : 1, "wind_avg_km_h" : 14.245, "wind_dir_deg" : 112.500, 
>> "rain_in" : 28.500, "mic" : "CHECKSUM"}\n', u'{"time" : "2020-05-21 
>> 02:27:42", "model" : "Acurite-5n1", "subtype" : 49, "id" : 1066, "channel" 
>> : "B", "sequence_num" : 1, "battery_ok" : 1, "wind_avg_km_h" : 14.245, 
>> "wind_dir_deg" : 112.500, "rain_in" : 28.500, "mic" : "CHECKSUM"}\n', 
>> u'{"time" : "2020-05-21 02:27:42", "model" : "Acurite-5n1", "subtype" : 49, 
>> "id" : 1066, "channel" : "B", "sequence_num" : 2, "battery_ok" : 1, 
>> "wind_avg_km_h" : 14.245, "wind_dir_deg" : 112.500, "rain_in" : 28.500, 
>> "mic" : "CHECKSUM"}\n']
>>
>>
>> parsed: {'wind_speed.042A.Acurite5n1PacketV2': 14.245, 
>> 'model.042A.Acurite5n1PacketV2': u'Acurite-5n1', 
>> 'channel.042A.Acurite5n1PacketV2': u'B', 
>> 'wind_dir.042A.Acurite5n1PacketV2': 112.5, 
>> 'battery.042A.Acurite5n1PacketV2': 1, 'dateTime': 1590028062, 
>> 'freq.042A.Acurite5n1PacketV2': None, 'mod.042A.Acurite5n1PacketV2': None, 
>> 'snr.042A.Acurite5n1PacketV2': None, 
>> 'sequence_num.042A.Acurite5n1PacketV2': 0, 'noise.042A.Acurite5n1PacketV2': 
>> None, 'protocol.042A.Acurite5n1PacketV2': None, 
>> 'rssi.042A.Acurite5n1PacketV2': None, 'msg_type.042A.Acurite5n1PacketV2': 
>> 49, 'usUnits': 1}
>>
>>
>> I have done a lot of searching on this forum and the web and I understand 
>> that there have been many changes to the labeling of rain data on the 
>> Acurite 5n1 system.  Howerver I just can't figure out where in the code I 
>> can make a change that will accept label that my version of the weather 
>> station uses for rain.
>>
>>
>> I have done a fair share of programming and I have the help of my son who 
>> is a computer science graduate.  I feel quite comfortable messing around in 
>> the code
>>
>>
>> So far the only change in code that I have tried was to change the line 
>> in sdr.py
>>
>>
>> I am running rtl_433 version 20.02-55-gc1d1f9f branch master at 
>> 202005162227
>>
>>
>> thanks for your help
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7e8f87c1-fdfd-499e-ad88-8fc1e6ede109%40googlegroups.com.

Reply via email to