Hi Gazza,
The 'if' statement is on the right hand side of the '=' sign is actually a
ternary operator. Read the expression as :
if obj.get('battery_ok') == 'OK':
pkt['battery'] = 1
else:
pkt['battery']=0
(In python Numeric zero, None or False all evaluate to
Thanks. In the end I kept the sensor name the same and mimiced the code for
parse_json() from another posting so its compatible with both versions of
rtl_433.
NB original version of sdr.py parses battery status the wrong way round (0
is False, 1 is True). Seems to be a common problem in lots
I suspect the parsing problem is caused by update to RTL_433 in August
2019. See my post of 20 May below.
Rob Series
On Thursday, 21 May 2020 16:08:46 UTC+1, Andrew Mackey wrote:
>
> Gary,
>
> thank you for your post. It has been helpful. I have made some progress
> now.
>
> First I think I
Hi,
I have done some more research and it looks like there was a change in
RTL_433 at tag 19.08 (August 2019) that changed the naming convention for a
significant number of wind related fields for lots of sensors. I guess
sdr.py needs to be updated to take this into account. I would offer but
Hi,
Please could anyone help. I'm having problems using an Oregon wind speed
sensor using instructions on /weewx/weewx/wiki/sdr-rpi-recipe.
This was working, but following an upgrade from an old WGR800 to the newer
WGR800X it seems to have broken.
Output from sdr.py shows its getting the