Closed RaSTuS26 closed 3 years ago
I noticed these lines in sdr.py 0.79 (which I'm using).
Packets I'm using:
class FOWHx080Packet(Packet):
......
pkt['wind_dir'] = Packet.get_float(obj, 'win_dir_deg')
But this doesn't seem to be doing the conversion at all.
For 1080P it's (not using):
class FOWH1080Packet(Packet):
......
pkt['wind_dir'] = Packet.get_float(obj, 'direction_deg')
Is there any chance of confusion between classes?
I'm using the correct packets (FOWHx080Packet), but the conversion isn't happening at all.
EDIT: noticed rtl_433 is reporting this as an integer, yet the packet conversion of sdr.py is expecting a float.
Found it, a simple typo. Tries to convert "win_dir_deg" rather than "wind_dir_deg".
So this line:
pkt['wind_dir'] = Packet.get_float(obj, 'win_dir_deg')
Should be"
pkt['wind_dir'] = Packet.get_float(obj, 'wind_dir_deg')
@andylittle the FOWHx080Packet class has an error.
This line: (missing the 'd' from 'win_dir_deg') pkt['wind_dir'] = Packet.get_float(obj, 'win_dir_deg')
So should be: pkt['wind_dir'] = Packet.get_float(obj, 'wind_dir_deg')
Any help greatly appreciated.
Thanks @andylittle , commit b299bb6 Merge pull request #1 from simcop2387/patch-1, thanks also simcop2387 for the patch.
Closing
Using a WH1081.
In rtl_433 wind_dir has now become wind_dir_deg, it is not being reported in weewx-sdr which reports None for wind_dir. I need this to display my wind rose properly, is it possible to get wind direction again?