acurite weather station to aprs with raspberry pi

Having not found the information to do this easily, or in one location, this took half a day. Here are my notes for getting an Acurite Weatherstation to report APRS data to CWOP over the radio only.

Software used is WeeWx, an unmaintained plugin cwxn, and a few tweeks.
The short version is you need to use the archive method of the data to be pulled from the Accurite as the Accurite doesn’t send complete data in each RF packet from the sensor to display panel. If you don’t use the archive method (and use loop) it will pull the most recent data sent which is partial, so you’ll have only temp and humidity, not wind speed (or something like that). Using archive pulls what Weewx stores. Secondly the code in cwxn needs to be modified to have humidty written in APRS as a two digit integer.

First challenge – data out of weather station. You must have a receiver display with USB out. Mine was plug and play with the Raspberry Pi. I just needed to locate what port it was on for it to work.

Install WeeWx. This pulls the data from the station and can manipulate it for multiple services, unfortunately not directly into anything I can use for APRS. Here I’ll need to use an extension to write a 2-line text file that my APRS software can read. WeeWx is pretty straight forward per their Debian instructions. Once installed configure and make sure its working with your station locally. I installed Apache2 so I could also use the service to monitor the station locally in a HTML page. The notes for Weewx are good and presented little issues. Make sure this works before proceeding. The extension we are looking for is https://github.com/weewx/weewx/wiki/cwxn

I had some issues with the integration and had to modify the source code.

My issue was that my Acurite gives different telemetry at different intervals. Weewx and this extension writes a text file for my APRS software, but it does it at a different interval. Because of this, missing data (thats not reported in each update from the weather station) gets recorded as null by CWXN. The workaround is to use a cwxy option to poll the data as an archive (default is loop).

Change line 127 from:

binding = d.get(‘binding’, ‘loop’).lower()

to:

binding = d.get(‘binding’, ‘archive’).lower()

This pulls the data from cumulative archive (database) rather than the last entry which often is blank. I suppose you could try to play around with interval timings, but this seemed problematic and much more work. Unfortunately the plugin option wouldn’t work, so rather than fix it I modified the source file /usr/share/weewx/user/cwxn.py so it forces the plugin to pull archived data. Then it writes the correct (last) value in the text file, wxnow.txt

Well, almost there. The code in cwxn needs to be modified to have humidty written in APRS as a two digit integer. In the python script (above) change the line with:
fields.append(“h%03d” % int(data[‘outHumidity’]))
to
fields.append(“h%02d” % int(data[‘outHumidity’]))

YAAC – make sure you have YAAC working correctly. Then enable a second port for Wxnow. I tested into a dummy load before ensuring it was all working

https://www.ka2ddo.org/ka2ddo/YAACdocs/config_wxnow.html

Once online, you will need to ensure you have proper weather telemetry. I used either Aprs.fi or www.findu.com/cgi-bin/find.cgi?call=N1LJK-13

Then check out http://www.wxqa.com/faq.html for help and signup for CWOP service. Once you have consistent data you should be up and running.