Hello !
Thanks Michael!
Added this to sdr.py
Got in log
Sep 26 20:15:52 andy-ThinkCentre-M57p weewx[31498]: sdr: MainThread:
lines=[]
Sep 26 20:16:19 andy-ThinkCentre-M57p weewx[31498]: message repeated 9
times: [ sdr: MainThread: lines=[]]
Sep 26 20:16:23 andy-ThinkCentre-M57p weewx[31498]: sdr: MainThread:
lines=['{"time" : "2019-09-26 17:16:19", "model" : "TFA-Twin-Plus-30.3049",
"id" : 15, "channel" : 1, "battery" : "OK", "temperature_C" : 5.600,
"humidity" : 97, "mic" : "CHECKSUM"}\n']
Sep 26 20:16:23 andy-ThinkCentre-M57p weewx[31498]: sdr: MainThread:
unmapped: [] ({'battery.1:None.TFATwinPlus303049Packet': 0,
'humidity.1:None.TFATwinPlus303049Packet': 97.0,
'temperature.1:None.TFATwinPlus303049Packet': 5.6, 'usUnits': 16,
'dateTime': 1569518179})
Sep 26 20:16:26 andy-ThinkCentre-M57p weewx[31498]: sdr: MainThread:
lines=[]
So had to change SDR section of weewx.conf to
[SDR]
# This section is for the software-defined radio driver.
# The driver to use
driver = user.sdr
cmd = rtl_433 -g 19.7 -p -100 -f 433920000 -M utc -F json
path = /usr/local/bin
ld_library_path = /usr/share/weewx/lib:/home/andy/rtl-sdr/build/src
log_unknown_sensors = True
log_unmapped_sensors = True
[[sensor_map]]
outTemp = temperature.1:None.TFATwinPlus303049Packet
outHumidity = humidity.1:None.TFATwinPlus303049Packet
outBatteryStatus = battery.1:None.TFATwinPlus303049Packet
Log now shows
Sep 26 20:38:47 andy-ThinkCentre-M57p weewx[5604]: sdr: MainThread:
lines=['{"time" : "2019-09-26 17:38:43", "model" : "TFA-Twin-Plus-30.3049",
"id" : 15, "channel" : 1, "battery" : "OK", "temperature_C" : 4.900,
"humidity" : 98, "mic" : "CHECKSUM"}\n']
Sep 26 20:38:47 andy-ThinkCentre-M57p weewx[5604]: sdr: MainThread:
packet={'outHumidity': 98.0, 'outTemp': 4.9, 'dateTime': 1569519523,
'usUnits': 16, 'outBatteryStatus': 0}
Sep 26 20:38:50 andy-ThinkCentre-M57p weewx[5604]: sdr: MainThread: lines=[]
And works like a charm - webpage started showing temp and humidity!
Thanks very much again!
Best wishes!
Andy
среда, 25 сентября 2019 г., 20:29:10 UTC+3 пользователь Andrei Volkov
написал:
>
> Hello!
> After long work with setting weewx with sdr I had to add to configuration
> path for rtl_433(running ubuntu 14.04). It started working and I discovered
> that weewx doesnt support my outside temp/humidity sensor.
> Json format output from it
> {"time" : "2019-09-25 17:15:12", "model" : "TFA-Twin-Plus-30.3049", "id" :
> 13, "channel" : 1, "battery" : "OK", "temperature_C" : 8.400, "humidity" :
> 91, "mic" : "CHECKSUM"}
> For somebody tring to tune weewx
> my addons for weewx.conf(/etc/weewx/weewx.conf)
> [SDR]
> # This section is for the software-defined radio driver.
>
> # The driver to use
> driver = user.sdr
> cmd = rtl_433 -g 19.7 -p -100 -f 433920000 -M utc -F json
> path = /usr/local/bin
> ld_library_path = /usr/share/weewx/lib:/home/andy/rtl-sdr/build/src
> log_unknown_sensors = True
> log_unmapped_sensors = True
>
>
>
> and path settings running sdr.py with python wich finally worked
>
> sudo PYTHONPATH=/usr/share/weewx python /etc/weewx/bin/user/sdr.py
> --cmd="rtl_433 -g 19.7 -p -100 -f 433920000 -M utc -F json -R 31"
>
> Best Wishes!
> Andy
>
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/af824902-c364-43fb-978f-a456612a46b4%40googlegroups.com.