weewx-sdr hangs with prologue sensor
Closed this issue · 1 comments
olpayras commented
Here's is the issue :
root@albi1:/etc/weewx # PYTHONPATH=/usr/share/weewx python3 /usr/share/weewx/user/sdr.py --cmd="rtl_433 -M utc -F json"
out: ['{"time" : "2022-03-03 12:55:33", "model" : "Oregon-THGR810", "id" : 82, "channel" : 1, "battery_ok" : 1, "temperature_C" : 19.300, "humidity" : 49}\n']
parsed: {'dateTime': 1646312133, 'usUnits': 16, 'battery.1:82.OSTHGR810Packet': 0, 'temperature.1:82.OSTHGR810Packet': 19.3, 'humidity.1:82.OSTHGR810Packet': 49.0}
out: ['{"time" : "2022-03-03 12:55:45", "model" : "Oregon-WGR800", "id" : 44, "channel" : 0, "battery_ok" : 1, "wind_max_m_s" : 2.000, "wind_avg_m_s" : 1.300, "wind_dir_deg" : 0.000}\n']
parsed: {'dateTime': 1646312145, 'usUnits': 17, 'battery.0:44.OSWGR800Packet': 0, 'wind_gust.0:44.OSWGR800Packet': 2.0, 'wind_speed.0:44.OSWGR800Packet': 1.3, 'wind_dir.0:44.OSWGR800Packet': 0.0}
out: ['{"time" : "2022-03-03 12:55:52", "model" : "Oregon-THGR810", "id" : 184, "channel" : 3, "battery_ok" : 1, "temperature_C" : 17.200, "humidity" : 50}\n']
parsed: {'dateTime': 1646312152, 'usUnits': 16, 'battery.3:184.OSTHGR810Packet': 0, 'temperature.3:184.OSTHGR810Packet': 17.2, 'humidity.3:184.OSTHGR810Packet': 50.0}
out: ['{"time" : "2022-03-03 12:55:56", "model" : "Oregon-THGR810", "id" : 212, "channel" : 2, "battery_ok" : 1, "temperature_C" : 17.000, "humidity" : 48}\n']
parsed: {'dateTime': 1646312156, 'usUnits': 16, 'battery.2:212.OSTHGR810Packet': 0, 'temperature.2:212.OSTHGR810Packet': 17.0, 'humidity.2:212.OSTHGR810Packet': 48.0}
out: ['{"time" : "2022-03-03 12:55:59", "model" : "Oregon-WGR800", "id" : 44, "channel" : 0, "battery_ok" : 1, "wind_max_m_s" : 1.700, "wind_avg_m_s" : 1.500, "wind_dir_deg" : 0.000}\n']
parsed: {'dateTime': 1646312159, 'usUnits': 17, 'battery.0:44.OSWGR800Packet': 0, 'wind_gust.0:44.OSWGR800Packet': 1.7, 'wind_speed.0:44.OSWGR800Packet': 1.5, 'wind_dir.0:44.OSWGR800Packet': 0.0}
out: ['{"time" : "2022-03-03 12:56:07", "model" : "Prologue-TH", "subtype" : 9, "id" : 6, "channel" : 1, "battery_ok" : 1, "temperature_C" : 8.700, "humidity" : 0, "button" : 0}\n']
Traceback (most recent call last):
File "/usr/share/weewx/user/sdr.py", line 3512, in <module>
main()
File "/usr/share/weewx/user/sdr.py", line 3490, in main
for p in PacketFactory.create(lines):
File "/usr/share/weewx/user/sdr.py", line 3154, in create
pkt = PacketFactory.parse_json(lines)
File "/usr/share/weewx/user/sdr.py", line 3170, in parse_json
return parser.parse_json(obj)
File "/usr/share/weewx/user/sdr.py", line 2819, in parse_json
pkt = Packet.add_identifiers(pkt, sensor_id, PrologueTHPacket.name)
AttributeError: type object 'PrologueTHPacket' has no attribute 'name'
root@albi1:/etc/weewx #
I think that the field subtype is not present with the other sensors.
I think I use the last rtl_433 revision :
rtl_433 version 21.12-70-gdd1c970f branch master at 202203030943 inputs file rtl_tcp RTL-SDR SoapySDR with TLS
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"...
Registered 183 out of 214 device decoding protocols [ 1-4 8 11-12 15-17 19-23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119 121 124-128 130-149 151-161 163-168 170-175 177-197 199 201-214 ]
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
baseband_demod_FM: low pass filter for 250000 Hz at cutoff 25000 Hz, 40.0 us
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time : 2022-03-03 14:10:55
model : Oregon-WGR800 House Code: 44
Channel : 0 Battery : 1 Gust : 0.0 m/s Average : 0.1 m/s Direction : 270.0 degrees
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time : 2022-03-03 14:11:07
model : Oregon-THGR810 House Code: 184
Channel : 3 Battery : 1 Celsius : 18.00 C Humidity : 50 %
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time : 2022-03-03 14:11:07
model : Prologue-TH subtype : 9 id : 6
Channel : 1 Battery : 1 Temperature: 8.80 C Humidity : 0 % Button : 0
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Thanks for your help.
Bests regards.
Olivier.