matthewwall / weewx-sdr

weewx driver for software-defined radio
GNU General Public License v3.0
114 stars 74 forks source link

Support for new sensors WH31L #133

Closed MksRasp closed 3 years ago

MksRasp commented 3 years ago

can you help me in writing parser for this device (WH31L), it is lightning detector ,below is the output from running driver directly

out:['{"time" : "2021-06-30 20:37:11", "model" : "FineOffset-WH31L", "id" : 67016, "battery_ok" : 0, "state" : 8, "flags" : 56, "storm_dist_km" : 10, "strike_count" : 2, "mic" : "CRC"}\n']

andylittle commented 3 years ago

try this one here.(untested) What are state and flags?

MksRasp commented 3 years ago

try this one here.(untested) What are state and flags?

thank you for your support recently got this device and found it is not supported by rtl_433 so I raised issue to get it supported. I wrote all information I got and this device is only for lightning not like Acurite lightning detector which include temperature and humidity. they figured out "lightning count, distance and battery", and was told there are some additional information within the code could not be figured out.

MksRasp commented 3 years ago

did test but failed for some reason

Traceback (most recent call last): File "/usr/share/weewx/user/sdr.py", line 2940, in main() File "/usr/share/weewx/user/sdr.py", line 2927, in main for p in PacketFactory.create(lines): File "/usr/share/weewx/user/sdr.py", line 2637, in create pkt = PacketFactory.parse_json(lines) File "/usr/share/weewx/user/sdr.py", line 2653, in parse_json return parser.parse_json(obj) File "/usr/share/weewx/user/sdr.py", line 1502, in parse_json return FOWH31LPacket.insert_ids(pkt) AttributeError: type object 'FOWH31LPacket' has no attribute 'insert_ids'

andylittle commented 3 years ago

I left out part of the section, grab this

MksRasp commented 3 years ago

I left out part of the section, grab [this]

it worked this time, I truly appreciate your help on this issue