Have you ever thought about turning your NAS into a weather station?

In fact, it is very easy. You only need to build a professional weather station at home by using Docker (or Container Station) built-in NAS.

First, you need to prepare:

  1. Weather Station WH2080+ Display Panel + USB
  2. NAS (requires support for docker)
  3. Weather Station image for docker
  4. MQTT Server

# docker run -t -i –cap-add=SYS_ADMIN –privileged –security-opt seccomp:unconfined -v /dev/bus/usb:/dev/bus/usb jarvischung/weather-station node /root/weather.js your-mqtt-server

As depicting in the figure , the display panel of the WH2080 is inserted into the NAS via USB, the weather station information is pushed to the MQTT through the NAS, and finally the data of the weather station can be presented after processing the relevant data through the Node-Red; Go to the database or cloud service, then process the data through Node-Red and upload or save it to the cloud or database.

After linking the weather station display panel to the NAS, create a new docker image directly, remember to replace “your-mqtt-server” with your own MQTT Server!

# docker run -t -i –cap-add=SYS_ADMIN –privileged –security-opt seccomp:unconfined -v /dev/bus/usb:/dev/bus/usb jarvischung/weather-station node /root/weather.js your -mqtt-server

This docker image has basically set up the USB and weather station information automatically. Every minute, the weather station data is obtained through USB, and the “jarvis-weather-station” is registered to be sent to the MQTT Server. After registering “jarvis-weather-station” with the Node-Red MQTT node, you can get the weather station data.

The current JSON format of the weather station:

‘rf.delay’: 27,
‘rf.hum_in’: 43,
‘rf.temp_in’: 28.1,
‘rf.hum_out’: 51,
‘rf.temp_out’: 24.1,
‘rf.abs_pressure’: 1017.5,
‘rf.wind_ave’: 0,
‘rf.wind_gust’: 0,
‘rf.wind_dir’: 2880,
‘rf.rain’: 1687.2,
‘rf.status’: {
b1: false,
b2: false,
b3: false,
b4: false,
b5: false,
lost_sensor_contact: false,
rain_overflow: false,
b8: false

The following figure shows how Node-Red is currently processed. The process is:

MQTT –> Parsing JSON –> Node-Red Dashboard

If you need the Node-Red Flow file, you can download it here (excluding the relevant Flow of MQTT Server and DB).

The graphics rendered by Node-Red Dashboard (when the data density is too small, Node-Red Dashboard is not recommended, it will be very slow)

Do you think it is easy to connect a weather station to a NAS? !

I will then show you how to upload the data to WU Weather, and do the best for open data!

The following is to share the current weather station information to WU Weather under the name IMIAOLI3

Synchronized at: I’m RD.

Related posts

Leave a Reply