Configuring Acurite Weather Station with Weewx

Screenshot of my Weewx weather page

NOTE: I have replaced this weather station and the home hosting is suspended for now – see new page

As many Acurite weather station users know, Acurite decided to discontinue their cloud service for weather stations bought in the last two or more years effective end February 2019. So this left users like myself with Acurite 5-in-1 Weather Stations and its Smarthub no longer able to upload weather data to the Acurite cloud dashboard or Weather Underground.

But necessity is the mother of invention, and maybe you will be even better off with Acurite’s cloud if you use an alternative like Weewx. Weewx is an alternative free and open source weather service will either read weather data as-is via a USB link from these weather stations, or if yours is like mine without a USB connector, and it only has the Smarthub, it can be configured with an alternative driver to read data from the Smarthub across your local network. The big pluses though are:

  • Numerous different skins to try out
  • Installs on a basic Raspberry Pi which will also act as a Weewx server
  • Displaying to a local web server or even a remote one.
  • Exporting weather data not only to Weather Underground but also to Weewx server at http://weewx.com/stations.html, Automatisches Wetterkarten System (AWEKAS), Citizen Weather Observer Program (CWOP), PWSweather.com,  British Weather Observations Website (WOW)
  • Provides an RSS feed for your station
  • Connects to various other weather station brands too
  • Weewx is heavily customisable down to a low level if you wish, and also has 3rd party skins and extensions – see https://github.com/weewx/weewx/wiki

WeeWX is a free, open source, software program, written in Python, which interacts with your weather station to produce graphs, reports, and HTML pages. It can optionally publish to weather sites or web servers. It uses modern software concepts, making it simple, robust, and easy to extend. It includes extensive documentation. WeeWX runs under most versions of Linux, as well as macOS, *BSD, and Solaris. Many users are running on the Raspberry Pi.

But my two-day journey to get this right was fraught with some challenges, so I will briefly list what instructions I followed and what the challenges were:

Main Instructions

I followed the instructions from the Gitbub project site for Weewx-Interceptor at https://github.com/matthewwall/weewx-interceptor. This is the extra driver that reads the data from the Acurite Smarthub. I had to choose the DEB install for Weewx as I found the Python tool setup was not creating the Apache server, and it was anyway creating everything as root permissions. Note, if your Acurite station has a USB connection, you won’t need this interceptor extension.

Not capturing data from the Smarthub

The first thing here is you need to redirect the Smarthub’s attempts to send its reports out to hubapi.myacurite.com and direct it to the IP address of your Raspberry Pi (or Weewx computer). I have an Asus router and followed the instructions at https://github.com/RMerl/asuswrt-merlin.ng/wiki/Custom-domains-with-dnsmasq to use dnsmasq to achieve this. I tested it by pinging hubapi.myacurite.com and noted it now returned my Weewx computer’s IP address instead.

The second thing to note is that in the Weewx.conf file you must set the IP address to listen to as the Weewx computer IP and not the Smarthub.

But still I was getting errors on starting Weewx itself like this and the app was exiting:

Mar 2 10:10:52 raspberrypi weewx[1211]: interceptor: MainThread: listen on 192.168.1.223:80
Mar 2 10:10:52 raspberrypi weewx[1211]: import of driver failed: [Errno 99] Cannot assign requested address (<class 'socket.error'>)
Mar 2 10:10:52 raspberrypi weewx[1211]: engine: Unable to load driver: [Errno 99] Cannot assign requested address
Mar 2 10:10:52 raspberrypi weewx[1211]: **** Exiting...

The key to this in the end was that there was a clash on the listener socket so Weewx could not catch port 80 to listen on. The clash was with the Apache web browser which was already listening on port 80. So I did the following to change the web server to use port 8080 instead:

  1. Edit your port by running this command
    sudo nano /etc/apache2/ports.conf
  2. Change Listen 80 to 8080
  3. To exit nano editor, press ctrl + x then y to save
  4. Then restart apache
    sudo service apache2 restart

And it all started working. You can view my live web server running off my Raspberry Pi at https://weather.gadgeteerza.co.za/. Note where the port 8080 comes in the address. You may also have to open the incoming port 8080 on your router and direct traffic for it to your Weewx computer’s IP address. There is also an RSS feed at https://weather.gadgeteerza.co.za/rss.xml for my weather station. The port 8080 is now out of my address as I set up a Nginx Reverse Proxy which directs to the port 8080 inside my home network.

Screenshot of my Weewx weather page