Acurite 5-in-1 reading too high

202 views
Skip to first unread message

Sean Jahnig

unread,
Jun 4, 2020, 7:53:36 AM6/4/20
to weewx-user
Hi guys,

I have an acurite 5-in-1 that is working but appears to be reading too high. It says 22 knots but it’s more like 15. Is there possibly weewx setting i should check before checking the hardware?

I know it is not reading accurately because we use it for kite surfing and it has always been accurate but about 2 weeks ago I had to reinstall software and I’m wondering if there is an incorrect setting now. Because when we’re on the beach it is definitely less than is being shown.

https://www.windguru.cz/station/2146

Thanks,
Sean

Greg Troxel

unread,
Jun 4, 2020, 8:32:35 AM6/4/20
to Sean Jahnig, weewx-user
Note that 22 vs 15 is suspiciously like km/hr instead of mi/hr; if it
were 12 knots then 22 km/hr would match.

I would suggest:

read the 5-n-1 manual to see how it deals with units, and if this is configurable.

if you have an acurite console, compare what it displays to what you
see in weewx

use rtl_433 to receive the 5n1 signals (rtl-sdr dongle required) and
compare that

run weewx so that you see the debug messages of LOOP packets and look
at those

look at your archive database directly with "sqlite3 weewx.sdb
.dump" and find the wind columns and look at the values *

read your config file and double check units and any stdcalibrate
statements


* This script plots temperature into xplot format. I am not telling you
to use xplot, but it's an example of getting data out directly, which
you should be able to adapt. Keep in mind that this will show the
values in the units of your database.

echo "timeval double"
sqlite3 weewx.sdb "select dateTime, outTemp, dewpoint from archive order by dateTime;" | \
awk -F\| '{print ". " $1 " " $2 " 1"} {print ". " $1 " " $3 " 2"}'

or do

sqlite3 weewx.sdb "select dateTime, usUnits, windSpeed, windGust from archive order by dateTime;"

Also this is helpful:

sqlite3 weewx.sdb .schema




Sean Jahnig

unread,
Jun 4, 2020, 9:54:15 AM6/4/20
to Greg Troxel, weewx-user
Hi Greg,

Thanks for that reply and the suggestions, i think you are right. When i was fiddling with the software 2 weeks ago i must've somehow enabled kph instead of knots. Somehow...

When i run rtl directly from the console it tells me the following from the acurite 5-in-1 sensor: "wind_avg_km_h" : 10.106

I have changed the default for group_speed and group_speed2 to knots (it was previously meter_per_second) under .. [StdReport] / [[Defaults]] / [[[Units]]] / [[[[Groups]]]]
I got the hint to do that from: http://weewx.com/docs/customizing.htm

I will monitor it and see if it has fixed the problem.

Do you happen to know if rtl itself has any settings that need to be set to knots? or does rtl simply parse whatever it reads directly to weewx?

Thanks again.
Sean.

Greg Troxel

unread,
Jun 4, 2020, 10:00:03 AM6/4/20
to Sean Jahnig, weewx-user
Sean Jahnig <seano...@gmail.com> writes:

> Do you happen to know if rtl itself has any settings that need to be set to
> knots? or does rtl simply parse whatever it reads directly to weewx?

I was referrring to rtl_433, which is not about weewx, and simply
receives and decodes data. It does have command-line options to set
units; I always set them to SI.

WHen you say "rtl" I am not sure exactly what you mean; I understand
that there is code to take the output of rtl_433 and use it in weewx as
well as a way to do this via MQTT. (Injecting extra sensors via mqtt
is on my todo list.)

Sean Jahnig

unread,
Jun 4, 2020, 10:10:49 AM6/4/20
to Greg Troxel, weewx-user
Thanks Greg.

I'm trying to sound smart but honestly, this command line stuff overwhelms me a bit.

This is the code that i run from the pi's console: sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -M utc -F json"

When i run that, it gives me a lot of data, of which "wind_avg_km_h" : 10.106 is one part. This tells me that the sensor is working, data is being received and it is in km/h format. Now i'm just wondering what weewx is doing with that number? If it thinks it is knots, then it will update windguru with 10 knots when it is infact only 5 knots.

Ideally i need to see what rtl_43 is reading and what weewx is publishing at the same time. But i cannot run them both at the same time.

Greg Troxel

unread,
Jun 4, 2020, 10:24:40 AM6/4/20
to Sean Jahnig, weewx-user

Sean Jahnig <seano...@gmail.com> writes:

> Thanks Greg.
>
> I'm trying to sound smart but honestly, this command line stuff overwhelms
> me a bit.
>
> This is the code that i run from the pi's console: sudo
> PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/sdr.py
> --cmd="rtl_433 -M utc -F json"

See the documentation about rtl_433 at
https://github.com/merbanan/rtl_433

> When i run that, it gives me a lot of data, of which "wind_avg_km_h" :
> 10.106 is one part. This tells me that the sensor is working, data is being
> received and it is in km/h format.

I was trying to say to run "rtl_433 -F json" directly, to see what you
get from that before it goes into weewx. Basically to look at data at
every stage of the pipeline that you easily can.

> Now i'm just wondering what weewx is
> doing with that number? If it thinks it is knots, then it will update
> windguru with 10 knots when it is infact only 5 knots.
>
> Ideally i need to see what rtl_43 is reading and what weewx is publishing
> at the same time. But i cannot run them both at the same time.

No, but you can run one and then the other rapidly, or you can turn on
debugging in sdr.py to log the rtl_433 output.

But it sounds like you have units confusion and that if you fix that you
will be ok and no longer need to debug.

Sean Jahnig

unread,
Jun 5, 2020, 9:34:14 AM6/5/20
to Greg Troxel, weewx-user
Hi guys,

I have identified that the acurite 5-in-1 and the SDR are working but the information coming form the sensor is km/h. This is what it looks like when i run rtl_433 from the console: https://www.dropbox.com/s/trnj0sype60w6m1/picture.png?dl=0

The problem is, weewx is broadcasting the 'km/h' reading to windguru as if it were a 'knots' reading https://www.windguru.cz/station/2146. I have proven this by disabling the rtl_433 command in weewx.conf and then running directly from the console. I see the wind_speed is 10km/h and then i re-enable rtl_433 in weewx.conf and reboot... and 5 minutes later with the same wind conditions it is reporting 10 knots to windGuru.

I have tried changing the below settings in weewx.conf to 'knots' but it did not fix the problem. Any ideas?

group_speed = knot    # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'

group_speed2 = knot2    # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'


Thanks,
Sean.



Tom Keffer

unread,
Jun 5, 2020, 9:49:48 AM6/5/20
to weewx-user
A few notes on how units work in weewx.

1. I don't know where your screenshot came from, but the units it shows are not consistent. Some are in inches (unit system US), some are in km/h (unit system METRIC). This may be OK, but once the SDR driver has consumed them, it is essential that it emit LOOP packets with a consistent unit system. It can be US, METRIC, or METRICWX, but, within a packet, it cannot be a mix. So, what you really need to check are the LOOP packets, not what's coming out of rtl_433. You can do this by running weewxd directly. It will print out the packets to the console. Make sure each packet has the values and units you expect.

2. The windguru website demands wind in knots. The windguru uploader does this conversion for you. So long as your database uses a consistent unit system, the conversion will be done automatically.

3. The weewx.conf setting you showed (group_speed and group_speed2) are for your reports. They have no effect on uploaders. A well-designed uploader knows what units its target wants, and does the conversion for you. 

-tk

-tk

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CALeSoZnbWtvBaac7yPNRTA26XfcfGoA5SomBtKHaN%2BDbLZTCJQ%40mail.gmail.com.

John Pierce

unread,
Jun 6, 2020, 1:22:49 AM6/6/20
to weewx-user
FWIW, my Accurite wind readings are always way low.   but I've got many very tall trees around me, so my winds are all chaotic gusts anyways.

Sean Jahnig

unread,
Jun 6, 2020, 9:01:58 AM6/6/20
to weewx-user
Ok, so i discovered that the Acurite 5n1 was reporting in km/h (for example, 10km/h) and it was uploading to windGuru the same number of 10 - but windGuru was displaying that as knots, which is incorrect. I tried whatever i could but nothing changed this behaviour. So i went to the station, unplugged it and brought home the pi and the acurite. I did a fresh install of everything and now i can't get it working.

To confirm:
  • I have a fresh install of the latest Raspberry Pi OS on my Pi 4.
  • I have installed rtl_433, rtl-sdr and weewx and weewx-sdr driver
  • I have installed weewx windguru
  • When i set station type to "Simulator" - weewx runs, the reports work via a web browser and windGuru gets updated with a value of 0.
  • When i directly run (rtl_433) and (sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -M utc -F json") both of those commands work and return an output of the data received from the sensor. Image here: https://www.dropbox.com/s/snlakmjitoqbzqh/weewx_01.png?dl=0
  • Based on the reading i have received from the above, i have created a sensor map. You can see the weewx.conf here: https://www.dropbox.com/s/28b7a3nqr6559ax/weewx.conf.txt?dl=0
  • I change the station type to SDR and i reboot - weewx starts and gives this output in the log file: https://www.dropbox.com/s/td34j078u0u8kr4/weewx_02.png?dl=0 - interesting that if i add log_unknown_sensors = True and log_unmapped_sensors = True to the SDR section of weewx.conf i notice that the readings which are matching the sensor map are classified under 'unmapped' and 'unidentified' sensors. I find that very odd because when i run the driver directly (point 4 above) that exact line of code is returning values that match the sensor map while the same code when run via weewx (via weewx.conf) is ignoring that data because it doesn't understand it.
  • I leave it to run for an hour but nothing is every published to windGuru. And no reports are visible via browser when i open [the pi's IP address]/weewx - here is the log: https://www.dropbox.com/s/my6xu6wraba9u7c/weewx.log?dl=0
  • I had a spare SDR dongle which tried, incase the SDR dongle is tripping. No difference.
  • When i change station type from SDR back to Simulator - it publishes an amount of 0 to windGuru - this tells me that the SDR driver, whilst being able to see the data transmitted by the acurite5n1, it is not understanding it. I have removed the batteries and tried to force change the channels on the acurite hoping that a cycling of the power may fix a bad transmission.
I have officially tried everything and can't think of any reason why this is not working. Any ideas?

Much appreciated,

Thanks,
Sean.

Tom Keffer

unread,
Jun 6, 2020, 6:49:21 PM6/6/20
to weewx-user
A few comments:
  1. Your log is hard to read, because it does not include time stamps, nor does it include entries generated by the operating system. Custom logging also misses the very initial startup until the configuration file is read. Can you use regular syslog logging?
  2. Your version of weewx.conf has DEBUG=0, yet we are seeing debug messages. Are you sure you're using the version of weewx.conf you think you are?
  3. Again, I'm not an SDR expert, but I don't see any evidence that the driver is emitting LOOP packets. What happens if you run weewxd from the command line? Does it print out LOOP packets?
-tk

--
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 weewx-user+...@googlegroups.com.

Sean Jahnig

unread,
Jun 7, 2020, 5:07:45 AM6/7/20
to weewx-user
Thanks for the reply Tom,

I think i have fixed the logging now - time stamps are there. I must've just changed DEBUG = 0 before i sent you the weewx.conf file because i have been doing a lot of fiddling. I have set it to 1 again. I have also enabled logging of the unmapped and unknown sensors under the SDR section. As you can see in the latest weewx.log file, the correct SDR readouts are appearing under 'unmapped' (when i say correct, i mean the wind_speed.0A0A.Acurite5n1PacketV2 item)


As you will see in the log, at the beginning i had Simulator enabled and it was broadcasting. Then at 12:54pm i changed back to SDR and then broadcasting stops. So we do know weewx is working.

Lastly, i have an old acurite display which i plugged in and it immediately picks up the wind speed and temp etc. so we know the station is behaving correctly.

Any ideas?

Tom Keffer

unread,
Jun 7, 2020, 8:28:50 AM6/7/20
to weewx-user
In the log:

Jun  7 12:54:23 raspberrypi weewx[1028] INFO weewx.engine: Loading station type SDR (user.sdr)
Jun  7 12:54:24 raspberrypi weewx[1028] INFO user.sdr: driver version is 0.77
Jun  7 12:54:24 raspberrypi weewx[1028] INFO user.sdr: sensor map is {}
Jun  7 12:54:24 raspberrypi weewx[1028] INFO user.sdr: deltas is {'strikes': 'strikes_total', 'rain': 'rain_total'}
Jun  7 12:54:24 raspberrypi weewx[1028] INFO user.sdr: startup process 'sudo rtl_433 -M utc -F json'
Jun  7 12:54:24 raspberrypi weewx[1028] DEBUG user.sdr: start async reader for stdout-thread

This tells us that no sensor map is configured. I know I've seen one before, but it's either getting lost or is in the wrong spot.

-tk

--
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 weewx-user+...@googlegroups.com.

Tom Keffer

unread,
Jun 7, 2020, 10:01:43 AM6/7/20
to weewx-user
I've noticed an error in the SDR driver for wind speed as measured by the AcuRite 5n1. Wind speed is measured by the sensor in km/hr, but is recorded by the driver as mi/hr. That would make the winds 60% high. 

Matthew has a bunch of fixes like this in the queue. Expect a new version of sdr.py some time later this week.

But, you still need a sensor map!

Sean Jahnig

unread,
Jun 7, 2020, 10:15:31 AM6/7/20
to weewx-user
Hi Tom,

Thanks a lot for the reply and for the update.

If that is the case then i will be very happy to at least understand why that was happening! The question is, how was it working accurately for the past 4 months? Perhaps an update caused things to change when i was fiddling 2 weeks ago.

This is my sensor map section which i've tried above and below the 'Simulator' section. Weewx is still showing sensor map is { - So i'm not sure what else i can do?

Any suggestions?

##############################################################################

[SDR]
    # This section is for the software-defined radio driver.

    # The driver to use
    driver = user.sdr
    cmd = sudo rtl_433 -M utc -F json
    path = /usr/local/bin
    # ld_library_path = /usr/local
    # log_unknown_sensors = True
    # log_unmapped_sensors = True

    [[sensor map]]
    # sensor_map section:
    windDir = wind_dir.0A0A.Acurite5n1PacketV2
    windSpeed = wind_speed.0A0A.Acurite5n1PacketV2
    #outTemp = temperature.0A0A.Acurite5n1PacketV2
    #outHumidity = humidity.0A0A.Acurite5n1PacketV2
    #rain_total = rain_total.0A0A.Acurite5n1PacketV2
    #txBatteryStatus = battery.0A0A.Acurite5n1PacketV2
    #outTempBatteryStatus = battery.0A0A.Acurite5n1PacketV2
    #rxCheckPercent = status.0A0A.Acurite5n1PacketV2

##############################################################################



Tom Keffer

unread,
Jun 7, 2020, 10:38:01 AM6/7/20
to weewx-user
You've got a typo. It should be "sensor_map", not "sensor map".

-tk

--
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 weewx-user+...@googlegroups.com.

Sean Jahnig

unread,
Jun 7, 2020, 2:05:55 PM6/7/20
to weewx...@googlegroups.com
Hey Tom,

You have made my night. Thank you for all the support. After changing it to ‘sensor_map’ it immediately started reporting to windguru.

I’m curious to know when this km/h m/h SDR issue arose? Because a month ago this station was reporting correctly and now it isn’t. What changed?

Thanks again,

Sean


--
Thanks,
Sean Jahnig

m. +97150 475 4234
e. seano...@gmail.com

Tom Keffer

unread,
Jun 7, 2020, 2:23:25 PM6/7/20
to weewx-user
I don't know. The rtl_433 driver is changing constantly. could have been there.

--
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 weewx-user+...@googlegroups.com.

Sean Jahnig

unread,
Jun 9, 2020, 5:55:59 AM6/9/20
to weewx-user
Hi Tom,

Please let me know which page i should watch in order to stay tuned with any updated to sdr.py ?

Much appreciated, thanks!
Sean.

Helmut Bachmann

unread,
Jul 2, 2020, 3:55:29 PM7/2/20
to weewx-user
Hi Tom, I´ve got the same issue with my AcuRite 5n1 regarding wind speed coming out 60% higher than normal. Did you already solve the issue? In such case, would you kindly share the solution?

Otherwise I can so some tests as I have an older version (sdr driver version 0.64), running in an outdated Laptop with no issues.

The one with the issue runs on a raspberry Pi 3+ and has driver version 0.77

Thanks in advance!
Helmut

Gazza

unread,
Jul 3, 2020, 1:21:34 AM7/3/20
to weewx-user

As mentioned in a couple of threads there have been a lot of recent changes to naming in rtl_433 which has broken sdr.py. These changes are listed in a couple of places on the rtl_433 github and were first introduced over a year ago and now seem to be the default withe current version of rtl_433.

https://github.com/merbanan/rtl_433/pull/1019
https://github.com/merbanan/rtl_433/pull/986

There is a -M switch to use the old style naming conventions but now that new names are default that may not remain for long and probably best to wait till Matt updates sdr.py.


The other Gary

Troy Roberts

unread,
Jul 17, 2020, 9:49:47 AM7/17/20
to weewx-user
Can't we just modify the class Acurite5n1PacketV2(Packet) in the sdr.py to reflect the correct units? Adding the conversion of 1 kph is equal to 0.6214 mph. So the following should work:

if 'wind_avg_km_h' in obj:
            pkt['wind_speed'] = Packet.get_float(obj, 'wind_avg_km_h') * 0.6214
elif 'wind_avg_mi_h' in obj:
            pkt['wind_speed'] = Packet.get_float(obj, 'wind_avg_mi_h')



If this isn't the right approach let me know. I've had to modify quite a bit in the sdr.py already. Namely the rain packet. I had to change it from "rain_mm" to "rain_in".
Reply all
Reply to author
Forward
0 new messages