Push Acurite 5n1 weather station data to Weather Underground with the PWS API.
490
This container is intended to process the data broadcasted from an Acurite 5n1 weather station and upload it to Weather Underground using the PWS API.
This has been developed for Acurite models 06014M and 01512M. Acurite models 06008M and 06059M are potentially supported as well.
Known issues:
If you are in an area devoid of other Acurite 5n1's or don't care that your neighbour has one and mounted it facing the wrong direction then you can use the wildcard value of SENSORID=-1
Next you will need to register your Personal Weather Station on wunderground. Once that has been registered you will be provided an 'ID' and 'Key', these are needed to upload data to the servcice.
Due to the way I created va7eex/rtl433 you will first need to create the mqtt-broker and rtl433 containers as shown in the example docker-compose.yaml (or further down this page). Once that is setup you should create a temporary alpine container using docker run --rm -it --network wxbridge alpine. Inside this container run apk add --no-cache mosquitto-clients and mosquitto_sub -v -t sensors/rtl_433/# -h mqtt-broker. You will (almost, up to 38s from when you run it) start to see data coming off your weather station in the format of (repeated 3 times):
sensors/rtl_433/Acurite-5n1/####/time
sensors/rtl_433/Acurite-5n1/####/id
sensors/rtl_433/Acurite-5n1/####/channel
sensors/rtl_433/Acurite-5n1/####/sequence_num
sensors/rtl_433/Acurite-5n1/####/battery_ok
sensors/rtl_433/Acurite-5n1/####/wind_avg_mi_h
sensors/rtl_433/Acurite-5n1/####/temperature_F
sensors/rtl_433/Acurite-5n1/####/humidity
You will need to determine the field represented by ####, this is the SENSORID environmental var required for the container. If you are in an area devoid of other Acurite 5n1's then you can use the wildcard value of SENSORID=-1
Next you will need to register your Personal Weather Station on wunderground. Once that has been registered you will be provided an 'ID' and 'Key', these are needed to upload data to the servcice.
Note: It is my understanding that your sensor ID will change every time the batteries are replaced, be wary.
| ENV | Default Value | Description |
|---|---|---|
| TZ* | Etc/UTC | This should be your local timezone |
| STATIONID* | example | Your PWS ID, if unchanged docker runtime will fail |
| STATIONPASS* | example | Your PWS Key, if unchanged docker runtime will fail |
| INTERVAL | 600 | How often this pushes data to weather underground in seconds, min value 60 |
| SENSORID | -1 | Your weatherstation's sensor ID, -1 for wildcard |
| REDIS_IP | redis | The IP or FQDN of your MQTT broker, or the service name of the container in docker-compose |
| REDIS_PORT | 6379 | Your redis instance's port |
| MQTT_IP | mqtt-broker | The IP or FQDN of your MQTT broker, or the service name of the container in docker-compose |
| MQTT_PORT | 1883 | The port of your MQTT broker |
| MAGNETIC_DEC | 0 | Magnetic declination, you can often find this value by typing "magnetic declination $city" into google, but if not don't worry about it, also don't worry about it if you adjusted for this when you were aligning your station |
| * Are required. |
version: "3"
networks:
wxbridge
services:
#these two containers are needed for Initial Setup, check that section for further details
mqtt-broker:
image: eclipse-mosquitto:latest
container_name: mqtt-broker
restart: always
networks:
- wxbridge
rtl433:
image: va7eex/rtl433:latest-mqtt
container_name: rtl433-mqtt
privileged: true
environment:
- MQTT_IP=mqtt-broker
- UNITS=customary
restart: always
networks:
- wxbridge
depends_on:
- mqtt-broker
#these containers are post-initial setup.
redis:
image: redis:alpine
container_name: redis
restart: always
networks:
- wxbridge
wunderground:
image: va7eex/wunderground-updater:latest
container_name: wunderground
environment:
- MQTT_IP=mqtt-broker
- STATIONID=example #this is the 'ID' field found at https://www.wunderground.com/member/devices
- STATIONPASS=example #this is the 'Key' field found at https://www.wunderground.com/member/devices
- INTERVAL=600 #number of seconds between weather updates
- TZ=Etc/UTC #timezone, this affects the daily rainfall numbers
- SENSORID=-1 #This needs to be changed to your specific sensor, if not -1 represents 'wildcard'
restart: always
networks:
- wxbridge
depends_on:
- rtl433
- redis
- mqtt-broker
dns: #this section isn't strictly necessary but sometimes routers cache an old IP
- 1.1.1.1
- 8.8.8.8
Content type
Image
Digest
Size
20.1 MB
Last updated
over 6 years ago
docker pull va7eex/wunderground-updater