sensor data wind and rain hideki (tfa Sinus-bresser ...)

157 views
Skip to first unread message

giuseppe saia

unread,
Nov 25, 2019, 12:24:44 PM11/25/19
to weewx-user

Good evening to all
I'm a beginner and it's the first time j write here
Someone could help me solve a problem with rain and wind hideki sensors
my weewx through nesdr can take all the hideki sensors
example giving the command
sudo tail -f /var/log/syslog

Nov 24 19:42:18 raspberrypi weewx[919]: sdr: MainThread: lines=[]
Nov 24 19:42:24 raspberrypi weewx[919]: sdr: MainThread: lines=['{"time" : "2019-11-24 18:42:18", "model" : "HIDEKI TS04 sensor", "rc" : 1, "channel" : 5, "battery" : "OK", "temperature_C" : 11.300, "humidity" : 84, "mic" : "CRC"}\n', '{"time" : "2019-11-24 18:42:18", "model" : "HIDEKI TS04 sensor", "rc" : 1, "channel" : 5, "battery" : "OK", "temperature_C" : 11.300, "humidity" : 84, "mic" : "CRC"}\n', '{"time" : "2019-11-24 18:42:18", "model" : "HIDEKI TS04 sensor", "rc" : 1, "channel" : 5, "battery" : "OK", "temperature_C" : 11.300, "humidity" : 84, "mic" : "CRC"}\n', '{"time" : "2019-11-24 18:42:20", "model" : "HIDEKI Wind sensor", "rc" : 3, "channel" : 4, "battery" : "OK", "temperature_C" : 11.200, "wind_speed_mph" : 0.800, "gust_speed_mph" : 0.000, "wind_approach" : -1, "wind_direction" : 225.000, "mic" : "CRC"}\n', '{"time" : "2019-11-24 18:42:20", "model" : "HIDEKI Wind sensor", "rc" : 3, "channel" : 4, "battery" : "OK", "temperature_C" : 11.200, "wind_speed_mph" : 0.800, "gust_speed_mph" : 0.000, "wind_approach" : -1, "wind_direction" : 225.000, "mic" : "CRC"}\n', '{"time" : "2019-11-24 18:42:20", "model" : "HIDEKI Wind sensor", "rc" : 3, "channel" : 4, "battery" : "OK", "temperature_C" : 11.200, "wind_speed_mph" : 0.800, "gust_speed_mph" : 0.000, "wind_approach" : -1, "wind_direction" : 225.000, "mic" : "CRC"}\n']

but the data of the two wind and rain sensors at the start of the weeewx command are

REC: 2019-11-24 19:45:00 CET (1574621100) altimeter: 29.6391463737, appTemp: None, barometer: 29.6550231288, cloudbase: 1485.29012332, dateTime: 1574621100.0, dewpoint: 50.7616999571, ET: None, heatindex: 53.024, humidex: 55.6811825747, inDewpoint: 47.6495854633, inHumidity: 84.0, inTemp: 52.34, inTempBatteryStatus: 0.0, interval: 5, maxSolarRad: 0.0, outHumidity: 92.0, outTemp: 53.024, outTempBatteryStatus: 0.0, pressure: 28.6202807991, rain: 0.0, rain_total: None, rainRate: 0.0, usUnits: 1, windBatteryStatus: 0.0, windchill: None, windDir: None, windGust: None, windGustDir: None, windrun: None, windSpeed: None
LOOP: 2019-11-24 19:45:42 CET (1574621142) altimeter: 29.6387270474, dateTime: 1574621142, inDewpoint: 47.6495854633, inHumidity: 84.0, inTemp: 52.34, inTempBatteryStatus: 0, maxSolarRad: 0.0, pressure: 28.6198732852, rainRate: 0, usUnits: 1
purtroppo non ho dati vento e dai pioggia

my sensor map is right
[SDR]

This section is for the software-defined radio driver.
The driver to use
driver = user.sdr
cmd = rtl_433 -M utc -F json -R 42
[[sensor_map]]
outTempBatteryStatus = battery.1:5.HidekiTS04Packet
outHumidity = humidity.1:5.HidekiTS04Packet
outTemp = temperature.1:5.HidekiTS04Packet
inTempBatteryStatus = battery.5:1.HidekiTS04Packet
inHumidity = humidity.5:1.HidekiTS04Packet
inTemp = temperature.5:1.HidekiTS04Packet
windDir = wind_dir.4:3.HidekiWindPacket
windSpeed = wind_speed.4:3.HidekiWindPacket
windGust = wind_gust.4:3.HidekiWindPacket
windBatteryStatus = battery.4:3.HidekiWindPacket
rainBatteryStatus = battery.4.HidekiRainPacket
rain_total = rain_total.4:0.HidekiRainPacket

giving the direct command
rtl_433 -M utc -F json -R 42
"time" : "2019-11-24 19:13:41", "model" : "HIDEKI Wind sensor", "rc" : 3, "channel" : 4, "battery" : "OK", "temperature_C" : 11.000, "wind_speed_mph" : 1.300, "gust_speed_mph" : 0.100, "wind_approach" : 1, "wind_direction" : 270.000, "mic" : "CRC"}
{"time" : "2019-11-24 19:13:41", "model" : "HIDEKI Wind sensor", "rc" : 3, "channel" : 4, "battery" : "OK", "temperature_C" : 11.000, "wind_speed_mph" : 1.300, "gust_speed_mph" : 0.100, "wind_approach" : 1, "wind_direction" : 270.000, "mic" : "CRC"}
{"time" : "2019-11-24 19:13:41", "model" : "HIDEKI Wind sensor", "rc" : 3, "channel" : 4, "battery" : "OK", "temperature_C" : 11.000, "wind_speed_mph" : 1.300, "gust_speed_mph" : 0.100, "wind_approach" : 1, "wind_direction" : 270.000, "mic" : "CRC"}
{"time" : "2019-11-24 19:13:45", "model" : "HIDEKI TS04 sensor", "rc" : 1, "channel" : 5, "battery" : "OK", "temperature_C" : 11.100, "humidity" : 84, "mic" : "CRC"}
{"time" : "2019-11-24 19:13:45", "model" : "HIDEKI TS04 sensor", "rc" : 1, "channel" : 5, "battery" : "OK", "temperature_C" : 11.100, "humidity" : 84, "mic" : "CRC"}
{"time" : "2019-11-24 19:13:45", "model" : "HIDEKI TS04 sensor", "rc" : 1, "channel" : 5, "battery" : "OK", "temperature_C" : 11.100, "humidity" : 84, "mic" : "CRC"}
{"time" : "2019-11-24 19:13:52", "model" : "HIDEKI Rain sensor", "rc" : 0, "channel" : 4, "battery" : "OK", "rain_mm" : 274.400, "mic" : "CRC"}
{"time" : "2019-11-24 19:13:52", "model" : "HIDEKI Rain sensor", "rc" : 0, "channel" : 4, "battery" : "OK", "rain_mm" : 274.400, "mic" : "CRC"}
{"time" : "2019-11-24 19:13:52", "model" : "HIDEKI Rain sensor", "rc" : 0, "channel" : 4, "battery" : "OK", "rain_mm" : 274.400, "mic" : "CRC"}

giuseppe saia

unread,
Nov 25, 2019, 12:25:41 PM11/25/19
to weewx-user
what's the problem?
where am I wrong?


giuseppe saia

unread,
Nov 25, 2019, 12:28:19 PM11/25/19
to weewx-user


unfortunately I have no wind data and no rain data

Andy

unread,
Nov 26, 2019, 8:51:39 AM11/26/19
to weewx-user

The indentation of your sensor map looks off, may be just the cut/paste into the forum. Use the { } button to paste code and preserve the formatting.

 Please add log_unknown_sensors = True and log_unmapped_sensors = True to your weewx config and restart weewx.  Then post some of your syslog.

Andy

[SDR]
    # This section is for the software-defined radio driver.
    
    # The driver to use
    driver = user.sdr
    
    log_unknown_sensors = True
    log_unmapped_sensors = True
    [[sensor_map]]




Andy

unread,
Nov 26, 2019, 10:11:44 AM11/26/19
to weewx-user

Please try the updated sdr driver. Replace your existing sdr.py with the attached. In your weewx install directory the sdr driver is located in bin/user/.

My install dir is /home/weewx so:
root@weewx-01:~# ls /home/weewx/bin/user/sdr.py
/home/weewx/bin/user/sdr.py


Your install directory may be different. 


Andy


sdr.py

giuseppe saia

unread,
Nov 26, 2019, 1:25:33 PM11/26/19
to weewx-user
thank you I try and let you know

giuseppe saia

unread,
Nov 27, 2019, 2:28:52 PM11/27/19
to weewx-user

it works perfectly
how did you do?
What can I do to thank you?
Il giorno martedì 26 novembre 2019 16:11:44 UTC+1, Andy ha scritto:

Andy

unread,
Nov 27, 2019, 5:55:05 PM11/27/19
to weewx-user
I am glad it worked. The sdr.py driver as not reading the wind and rain sensor. The output from rtl_433 has changed due to a different sensor or rtl_433 change. You can see the changes here.

Old vs new message, yours is on the bottom.

Old

    # {"time" : "2017-01-16 04:38:39", "model" : "HIDEKI Wind sensor", "rc" : 0, "channel" : 4, "battery" : "OK", "temperature_C" : -4.400, "windstrength" : 2.897, "winddirection" : 292.500}

New

    # {"time" : "2019-11-24 19:13:41", "model" : "HIDEKI Wind sensor", "rc" : 3, "channel" : 4, "battery" : "OK", "temperature_C" : 11.000, "wind_speed_mph" : 1.300, "gust_speed_mph" : 0.100, "wind_approach" : 1, "wind_direction" : 270.000, "mic" : "CRC"}


Just added some if/else statements to parse the old and new versions:

        if 'windstrength' in obj:             
            pkt['wind_speed'] = Packet.get_float(obj, 'windstrength')
        else:
            pkt['wind_speed'] = Packet.get_float(obj, 'wind_speed_mph')
        if 'winddirection' in obj:
            pkt['wind_dir'] = Packet.get_float(obj, 'winddirection')
        else:
            pkt['wind_dir'] = Packet.get_float(obj, 'wind_direction')
        if 'gust_speed_mph' in obj:
            pkt['wind_gust'] = Packet.get_float(obj, 'gust_speed_mph')   

Did the same for the rain.


mwall

unread,
Dec 1, 2019, 1:34:27 PM12/1/19
to weewx-user
thank you andy.  had to do a units conversion, but the fix is in at commit c37ba53 
Reply all
Reply to author
Forward
0 new messages