Nice catch!  That indeed was it.  I added in that line with wind_speed_mph 
to sdr.py, then also changed the mapping to use wind_speed_mph in 
weewx.conf, and it is now reporting the speed.

Greg

On Sunday, December 31, 2017 at 10:32:09 PM UTC-6, Craig Thom wrote:
>
> I know enough just to screw things up, so I'm probably wrong, and I have 
> not updated sdr_433, but
>
> I just looked through sdr.py, and, for the 5n1 sensor, the parse_text 
> method has both "wind_speed" and "wind_speed_mph", but the parse_json 
> method, which is decoding msg_type 49, does not.
>
> I am not a programmer, but I bet adding it to this section of sdr.py would 
> do the trick.  It couldn't hurt much, anyway.
>
>         if msg_type == 49: # 0x31
>             pkt['wind_speed'] = Packet.get_float(obj, 'wind_speed') # mph?
>             pkt['wind_dir'] = Packet.get_float(obj, 'wind_dir_deg')
>             pkt['rain_counter'] = Packet.get_int(obj, 'raincounter_raw')
>   
>             pkt['wind_speed_mph'] = Packet.get_float(obj, 'wind_speed_mph')
>
> On Sunday, December 31, 2017 at 10:28:32 PM UTC-5, Greg Gowins wrote:
>>
>> Hello everyone,
>>
>> I recently made the update to 3.8.0 and everything seems to be working 
>> except wind speed.  It looks like maybe there was a name change in the 
>> rtl_sdr (the -R number did also change from 39 to 40) but I've changed it 
>> in the weewx.conf mapping, but it doesn't seem to make a difference.
>>
>> Here's the changed weewx.conf mapping area:
>>
>> [SDR]
>>     # This section is for the software-defined radio driver.
>>
>>     # The driver to use
>>     driver = user.sdr
>>
>>     log_unknown_sensors = True
>>     log_unmapped_sensors = True
>>
>>     cmd = /usr/local/bin/rtl_433 -q -U -f433923000 -Fjson -R40
>>
>>     [[sensor_map]]
>>         windDir = wind_dir.0832.Acurite5n1Packet
>>         windSpeed = wind_speed_mph.0832.Acurite5n1Packet
>>         outTemp = temperature.0832.Acurite5n1Packet
>>         outHumidity = humidity.0832.Acurite5n1Packet
>>         rain_total = rain_total.0832.Acurite5n1Packet
>>         strikes_total = strikes_total.56AF.AcuriteLightningPacket
>>         distance = distance.56AF.AcuriteLightningPacket
>>     #   extraTemp1 = temperature.566F.AcuriteLightningPacket
>>     #   extraHumid1 = humidity.566F.AcuriteLightningPacket
>>     [[deltas]]
>>         strikes = strikes_total
>>         rain = rain_total
>>
>> And here is what is in the log:
>>
>> Jan  1 03:21:35 raspberrypi weewx[18624]: sdr: MainThread: 
>> lines=['{"time" : "2018-01-01 03:21:34", "model" : "Acurite 5n1 sensor", 
>> "sensor_id" : 2098, "channel" : "A", "sequence_num" : 0, "battery" : "OK", 
>> "message_type" : 49, "wind_speed_mph" : 5.765, "wind_dir_deg" : 337.500, 
>> "wind_dir" : "NNW", "rainfall_accumulation_inch" : 0.000, "raincounter_raw" 
>> : 16}\n', '{"time" : "2018-01-01 03:21:34", "model" : "Acurite 5n1 sensor", 
>> "sensor_id" : 2098, "channel" : "A", "sequence_num" : 1, "battery" : "OK", 
>> "message_type" : 49, "wind_speed_mph" : 5.765, "wind_dir_deg" : 337.500, 
>> "wind_dir" : "NNW", "rainfall_accumulation_inch" : 0.000, "raincounter_raw" 
>> : 16}\n', '{"time" : "2018-01-01 03:21:34", "model" : "Acurite 5n1 sensor", 
>> "sensor_id" : 2098, "channel" : "A", "sequence_num" : 2, "battery" : "OK", 
>> "message_type" : 49, "wind_speed_mph" : 5.765, "wind_dir_deg" : 337.500, 
>> "wind_dir" : "NNW", "rainfall_accumulation_inch" : 0.000, "raincounter_raw" 
>> : 16}\n']
>> Jan  1 03:21:35 raspberrypi weewx[18624]: sdr: MainThread: 
>> packet={'windDir': 337.5, 'rain_total': 0.16, 'usUnits': 1, 'dateTime': 
>> 1514776894}
>> Jan  1 03:21:35 raspberrypi weewx[18624]: sdr: MainThread: 
>> packet={'windDir': 337.5, 'rain_total': 0.16, 'usUnits': 1, 'dateTime': 
>> 1514776894}
>> Jan  1 03:21:35 raspberrypi weewx[18624]: sdr: MainThread: 
>> packet={'windDir': 337.5, 'rain_total': 0.16, 'usUnits': 1, 'dateTime': 
>> 1514776894}
>>
>> If I change the weewx.conf mappings to use just the 
>> wind_speed.0832.Acurite5n1Packet, then this is what I see in the logs:
>>
>> Jan  1 03:25:56 raspberrypi weewx[19036]: sdr: MainThread: 
>> lines=['2018-01-01 03:25:51 Acurite lightning 0x56AF Ch A Msg Type 0x02: 
>> 24.8 F 91 % RH Strikes 31 Distance 22 L_status 0x00 - c0  56  af  db  4d  
>> d4  9f  96  f6 \n', '{"time" : "2018-01-01 03:25:53", "model" : "Acurite 
>> 5n1 sensor", "sensor_id" : 2098, "channel" : "A", "sequence_num" : 0, 
>> "battery" : "OK", "message_type" : 49, "wind_speed_mph" : 7.823, 
>> "wind_dir_deg" : 337.500, "wind_dir" : "NNW", "rainfall_accumulation_inch" 
>> : 0.000, "raincounter_raw" : 16}\n', '{"time" : "2018-01-01 03:25:53", 
>> "model" : "Acurite 5n1 sensor", "sensor_id" : 2098, "channel" : "A", 
>> "sequence_num" : 1, "battery" : "OK", "message_type" : 49, "wind_speed_mph" 
>> : 7.823, "wind_dir_deg" : 337.500, "wind_dir" : "NNW", 
>> "rainfall_accumulation_inch" : 0.000, "raincounter_raw" : 16}\n', '{"time" 
>> : "2018-01-01 03:25:53", "model" : "Acurite 5n1 sensor", "sensor_id" : 
>> 2098, "channel" : "A", "sequence_num" : 2, "battery" : "OK", "message_type" 
>> : 49, "wind_speed_mph" : 7.823, "wind_dir_deg" : 337.500, "wind_dir" : 
>> "NNW", "rainfall_accumulation_inch" : 0.000, "raincounter_raw" : 16}\n']
>> Jan  1 03:25:56 raspberrypi weewx[19036]: sdr: MainThread: 
>> packet={'distance': 22.0, 'dateTime': 1514777151, 'usUnits': 1, 
>> 'strikes_total': 31.0}
>> Jan  1 03:25:56 raspberrypi weewx[19036]: sdr: MainThread: 
>> packet={'windDir': 337.5, 'windSpeed': None, 'rain_total': 0.16, 'usUnits': 
>> 1, 'dateTime': 1514777153}
>> Jan  1 03:25:56 raspberrypi weewx[19036]: sdr: MainThread: 
>> packet={'windDir': 337.5, 'windSpeed': None, 'rain_total': 0.16, 'usUnits': 
>> 1, 'dateTime': 1514777153}
>> Jan  1 03:25:56 raspberrypi weewx[19036]: sdr: MainThread: 
>> packet={'windDir': 337.5, 'windSpeed': None, 'rain_total': 0.16, 'usUnits': 
>> 1, 'dateTime': 1514777153}
>>
>>
>> This time it puts the windSpeed in the packet, but has the speed as 
>> 'None', but I see the speed listed in the raw data as 7.823.    Any ideas?
>>
>> Greg Gowins
>> Driftwood, TX
>>
>>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to