Introduction
Hardware Pieces
Full disclosure
Linux, etc.
Editing
Introduction
Installation
dietpi
WeeWX
Retrieve, Install WeeWX
Installation Notes
Status
Install WeatherFlow Tempest module
Retrieve weatherflow UDP code
Install
[[Station]]
Replace [Simulator] section with [WeatherFlowUDP] content
[[sensor_map]]
Get Your Station Identification
Insert your Serial number into weewx.conf
View web pages
Turn off Station Identification
Further Configuration
Measurement Units
Seeing Results
WeatherFlow Tempest Website
WeeWX Output using FTP
WeeWX Map
Weather Underground
AWEKAS
PWS Weather
Weathercloud
WOW
Implementation Notes
Transfer from a Raspberry Pi 4 2GB to a Raspberry Pi Zero 2
Network Connection: Wireless > Ethernet
This document describes setting up WeeWX to process the results from a WeatherFlow Tempest and is derived from:
There is no single cookbook approach to setting up WeeWX with a WeatherFlow Tempest; hence this document. I hope it helps someone.
This document assumes basic knowledge of Linux and a Raspberry Pi if you're using one. If this does not describe you and you want a more detailed approach let me know. I (may, will) add more details in relevant places.
Also, there are introductory notes to show how to publish weather results to:
July 2022
I have the following equipment:
WeatherFlow Tempest | Raspberry Pi Zero 2 W |
---|---|
I have had the WeatherFlow Tempest running with WeeWX software on a Raspberry Pi 4 2 GB platform since July 2021. Now, I think that a better $ value is to have weewx running on a Pi Zero 2. This document is/was written as I complete(d) the transfer.
See further comments in Transfer from a Raspberry Pi 4.
When editing the configuration and other files, any text editor will do:
- vim
- geany
- thonny
- ....
If you're using Ubuntu, Linux Mint, or other Linux, skip this section and jump to WeeWX below.
I am using:
Raspberry Pi OS Lite
Release Date: April 4th, 2022
System: 64-bit
Size: 270MB
- Install onto an SD card as usual (I use rpi_imager)
- Install SD card into the Pi Zero and start up as usual.
- Configure ssh to run for remote access.
I tried to install weewx with the dietpi distro. weewx found all sorts of modules missing and it just wasn't worth the effort to continue.
From the WeeWx Documentation, follow the topics:
- Configure apt - shows the specifics of retrieving WeeWX with apt.
- Install WeeWX
The WeeWX installation will ask for the following:
Value | Note |
---|---|
Location of Weather Station | Enter the name/location of the station. Use the Tempest name, but any name will do (example: Cherry Beach) |
latitude, Longitude | Enter the decimal values of the site co-ordinates. (Note: installation allows any input here and doesn't check. However, hidden system errors occur at runtime when you supply badly formed values.) |
Altitude | Enter site altitude as directed. |
display units | Make a choice. Further adjustments are easy to make later in the configuration file. |
Weather Station hardware Type | Choose: Simulator. |
On the WeeWX Installation page, follow the topics:
Value | Note |
---|---|
Status | Log entries will appear. These values are unimportant at this time. |
Verify | Web pages to appear at /var/www/html/weewx/index.html |
Customize | Ignore (for now). |
Start/Stop | Stop weewx. (sudo /etc/init.d/weewx stop ) |
Uninstall | Ignore. |
Layout | Keep for reference. |
- Visit https://github.com/captain-coredump/weatherflow-udp
- Download the .ZIP download of the project from the GitHub web interface
- Button:
CODE
- Choose
Download ZIP
- Button:
This retrieves: weatherflow-udp-master.zip
sudo wee_extension --install weatherflow-udp-master.zip
sudo edit /etc/weewx/weewx.conf
In the [Station]
section near the top of the configuration file, edit:
station_type = WeatherFlowUDP
- Find the section
[Simulator]
, and delete / comment out all lines in the section, including[Simulator]
. - Copy the following lines to where
[Simulator]
was previously:
[WeatherFlowUDP]
driver = user.weatherflowudp
log_raw_packets = False
udp_address = <broadcast>
# udp_address = 0.0.0.0
# udp_address = 255.255.255.255
udp_port = 50222
udp_timeout = 90
share_socket = False
[[sensor_map]]
outTemp = air_temperature.AR-00004444.obs_air
outHumidity = relative_humidity.AR-00004444.obs_air
pressure = station_pressure.AR-00004444.obs_air
# lightning_strikes = lightning_strike_count.AR-00004444.obs_air
# avg_distance = lightning_strike_avg_distance.AR-00004444.obs_air
outTempBatteryStatus = battery.AR-00004444.obs_air
windSpeed = wind_speed.SK-00001234.rapid_wind
windDir = wind_direction.SK-00001234.rapid_wind
# lux = illuminance.SK-00001234.obs_sky
UV = uv.SK-00001234.obs_sky
rain = rain_accumulated.SK-00001234.obs_sky
windBatteryStatus = battery.SK-00001234.obs_sky
radiation = solar_radiation.SK-00001234.obs_sky
# lightningYYY = distance.AR-00004444.evt_strike
# lightningZZZ = energy.AR-00004444.evt_strike
(original source: https://github.com/captain-coredump/weatherflow-udp)
I edited the top part to be:
[WeatherFlowUDP]
driver = user.weatherflowudp
log_raw_packets = False
# log_raw_packets = True
# udp_address = <broadcast>
# udp_address = 0.0.0.0
udp_address = 255.255.255.255
udp_port = 50222
udp_timeout = 90
share_socket = False
Replace the sensor_map section with the following content:
# This section is for the TEMPEST WeatherFlow Bridge packets, via UDP broadcast on local subnet
[[sensor_map]]
outTemp = air_temperature.ST-00000025.obs_st
outHumidity = relative_humidity.ST-00000025.obs_st
pressure = station_pressure.ST-00000025.obs_st
#lightning_strikes = lightning_strike_count.ST-00000025.obs_st
#avg_distance = lightning_strike_avg_distance.ST-00000025.obs_st
outTempBatteryStatus = battery.ST-00000025.obs_st
windSpeed = wind_speed.ST-00000025.rapid_wind
windDir = wind_direction.ST-00000025.rapid_wind
#luxXXX = illuminance.ST-00000025.obs_st
UV = uv.ST-00000025.obs_st
rain = rain_accumulated.ST-00000025.obs_st
windBatteryStatus = battery.ST-00000025.obs_st
radiation = solar_radiation.ST-00000025.obs_st
#lightningXXX = distance.ST-00000025.evt_strike
#lightningYYY = energy.ST-00000025.evt_strike
ref: https://github.com/captain-coredump/weatherflow-udp/blob/master/sample_Tempest_sensor_map.
The sample code is for data coming from station ID ST-00000025
. You now need to find out your station ID.
- Under
[WeatherFlowUDP]
set:
log_raw_packets = True
- Save the configuration file (
weewx.conf
). - Restart weewx.
sudo /etc/init.d/weewx restart
weewx will start watching for the UDP packets from the Tempest and dump them in the log. We can see this information with:
sudo tail -f /var/log/syslog
You are looking for records like:
May 26 22:26:55 raspberrypiZ2-2 weewxd: weatherflowudp: MainThread: raw packet: {'serial_number': 'ST-00052000', 'type': 'rapid_wind', 'hub_sn': 'HB-00041000', 'ob': [1653618412, 0.52, 315]}
May 26 22:28:25 raspberrypiZ2-2 weewxd: weatherflowudp: MainThread: raw packet: {'serial_number': 'ST-00052000', 'type': 'rapid_wind', 'hub_sn': 'HB-00041000', 'ob': [1653618504, 0.29, 312]}
May 26 22:28:26 raspberrypiZ2-2 weewxd: weatherflowudp: MainThread: raw packet: {'serial_number': 'ST-00052000', 'type': 'device_status', 'hub_sn': 'HB-00041000', 'timestamp': 1653618505, 'uptime': 26712917, 'voltage': 2.763, 'firmware_revision': 156, 'rssi': -64, 'hub_rssi': -64, 'sensor_status': 131072, 'debug': 0}
(I have slightly obfuscated the serial numbers from my own Weatherflow Tempest).
Terminate the log viewing with Ctl-C.
sudo edit /etc/weewx/weewx.conf
- We want the Tempest serial number (here: ST-00052000) in the sensor map code:
In /etc/weewx/weewx.conf, search/replace ST-00000025 with ST-00052000 (but with what you found in your log file) - I also uncommented all lines in [[sensor_map]]. Not sure what effect this has.
- Save the configuration file (
weewx.conf
). - Restart weewx.
sudo /etc/init.d/weewx restart
- Let run for 10 - 15 minutes (or more).
WeeWX has main ouput in web pages at: /var/www/html/weewx
. To see if WeeWX is working for you, view the web index.html
file.
vim /var/www/html/weewx/index.html
Browse down and look for output like:
<div class="widget_contents">
<table>
<tbody>
<tr>
<td class="label">Outside Temperature</td>
<td class="data">61.7°F</td>
</tr>
<tr>
<td class="label">Heat Index</td>
<td class="data">61.0°F</td>
</tr>
<tr>
<td class="label">Wind Chill</td>
<td class="data">61.7°F</td>
</tr>
<tr>
<td class="label">Dew Point</td>
<td class="data">52.6°F</td>
</tr>
What's notable here is:
Outside Temperature appears with a value of 61.7. If weewx is not configured correctly, you will likely see N/A.
When you are satisfied that weewx is getting the UDP packets from the Tempest hub, you will want to turn off log_raw_packets
since it will put lots of now unnecessary stuff in the system log. Edit the configuration file (weewx.conf
).
sudo edit /etc/weewx/weewx.conf
- Set
log_raw_packets = False
- Save the configuration file.
- Restart weewx.
sudo /etc/init.d/weewx restart
The default measurement units for StdReport appear in /etc/weewx/weewx.conf
and are set to US units. I set mine to the following (Canadian units):
- In
/etc/weewx/weewx.conf
, navigate to: StdReport >> Defaults - Set
unit_system = metric
- Navigate a few lines down to Units >> Groups, and edit the respective lines to read:
group_pressure = kPa # Options are 'inHg', 'mmHg', 'mbar', 'hPa', or 'kPa'
group_rain = mm # Options are 'inch', 'cm', or 'mm'
group_rainrate = mm_per_hour # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
- Save the configuration file.
- Restart weewx.
sudo /etc/init.d/weewx restart
On your phone or tablet and in the Tempest configuration app, you specify if you want to share your results publicly.
Settings > Stations > (Station name) > Public Data > Share Publicly
A few lines below is the Share Page with the URL of where your weather results appear:
https://tempestwx.com/station/nnnnn
...where nnnnn
is your given station number. It is not the same as the serial numbers of the Tempest of the Hub.
I use Infinity Free as a web hosting site. It's:
- free
- allows regular ftp upload
- is mostly smooth in producing pages
... and suits my non-professional purposes.
Use the notes in FTP in the WeeWX User's Guide for FTP transfer.
For illustration, I have configured:
enable = true
user = epiz_redacted
password = redacted
server = ftpupload.net # The ftp server name, e.g, www.myserver.org
path = /rongrimes.42web.io/htdocs # The destination directory, e.g., /weather
# Set to True for an FTP over TLS (FTPS) connection. Not all servers
# support this.
secure_ftp = False
# Most FTP servers use port 21
port = 21
# Set to 1 to use passive mode, zero for active mode
passive = 1
WeeWX maintains a world map of all registered WeeWX stations at:
To register on the map:
sudo edit /etc/weewx/weewx.conf
- Navigate to:
[StdRESTful] > [[StationRegistry]]
- Set
register_this_station = true
- Navigate to
station_url
(above in the config file). - Set
station_url
to your Weewx website. Really, set it to any website you have control over. - Save the configuration file.
- Restart weewx.
sudo /etc/init.d/weewx restart
Check the WeeWX map and your site will appear soon. (I don't remember if it takes 5 minutes, an hour or a day.)
There are two ways to get your Tempest weather data published to Weather Underground.
- Direct the Tempest website to publish to Weather Underground. This is the method I use.
- The weewx configuration file can be set up to send data to Weather Underground. See the section in the configuration file:
[[Wunderground]]
- Navigate to http://www.weatherunderground.com
- Login to the site. (Use Join if you're a new member.)
- In My Profile, go to My Devices.
- Use Add New Device and provide data as prompted.
- From the Devices page, record your ID and Key.
- Go to https://tempestwx.com/ and login with the same username & password that you created for the mobile app.
- Navigate: Settings > Stations > (Your station) > Public Data > Weather Underground
- Enter your Station ID and Station Key for Weather Underground from above, and enable the Send Rain switch.
- Click < at the top of the page to exit.
- Check Weather Underground in a day or so to see that it's publishing.
I found that Weather Underground took a while to show my station on the map, but I could find my data explicitly on the Weather Underground web site via My Profile > My Devices.
AWEKAS (Automatisches WEtterKArten System) is an Austrian weather station collecting site with a strong European presence. It is similar in principle to WeatherUndergound in North America.
To get your weather results displayed with AWEKAS:
- On the AWEKAS page, navigate to:
My Awekas > My Station Panel
- Use
Register New
, and supply details as required. - Update the WeeWX configuration file with your login information.
- For illustration, I have:
[[AWEKAS]]
# This section is for configuring posts to AWEKAS.
# If you wish to do this, set the option 'enable' to true,
# and specify a username and password.
# To guard against parsing errors, put the password in quotes.
enable = true
username = redacted
password = redacted
- Save the configuration file.
- Restart weewx.
sudo /etc/init.d/weewx restart
Weathercloud is a Minnesota (US) station collecting site with fairly repeasentative presence worldwide.
To get your weather results displayed with PWS Weather:
- On the PWS Weather web page, use
Log in
, and create your login ID. - Click the button to
Add a station
. If you don't seeAdd a station
, log out and log back in again. - Provide your station details and then click
SAVED STATION
. - Click your station button on the Stations web page and retrieve:
- your
Station ID
- your
API Key
.
- your
- Update the [[PWSweather]] section in the WeeWX configuration file with your station information. (Use your
API Key
for the password). - For illustration, I have:
[[PWSweather]]
enable = true
station = EASTTORONTO
password = 218_redacted
- Save the configuration file.
- Restart weewx.
sudo /etc/init.d/weewx restart
Weathercloud is a Barcelona station collecting site with a strong European and North American presence.
To get your weather results displayed with Weathercloud:
- On the Weathercloud page, navigate to:
Get started
- Use
Sign up
, and supply details as required. - You will receive an email with:
- Weathercloud ID
redacted - Key
redacted
- Weathercloud ID
- Update the WeeWX configuration file with your ID/key information.
- For illustration, I have:
[[WeatherCloud]]
id = redacted
key = redacted
- Save the configuration file.
- Visit https://github.com/matthewwall/weewx-wcloud, and follow the directions to install wcloud - the weewx extension that sends data to WeatherCloud.
- Restart weewx.
sudo /etc/init.d/weewx restart
WOW is the UK Met Office WeatherObservationsWebsite with a strong Western Europe, Australia/New Zealand and some North American presence.
I found this site more difficult/less intuitive to set up, and hence a few more notes here regarding configuration. In your WeeWX config file you are asked for two values:
- station
- password
The notes below will help you find these (it's not obvious until you know!).
To get your weather results displayed with WOW:
- On the WOW page, use
Sign up
, and supply details as required. - Use Create a Site and supply the information to configure your station entry on WOW.
- For Step 1: Configuration screen in (2) Site Details, it will ask for "Authentication Key". Use any value here (but avoid spaces, and "some" special characters), and this will be your WeeWX password value.
Example:
- Click Complete on the web page to register your site.
- Review your site (you can find it under My sites).
- The coded value under your station name, is the station value for the WeeWX config file.
Example:
- In weewx.conf, update the [[WOW]] section with your WOW credentials. For illustration, I have:
[[WOW]]
# This section is for configuring posts to WOW.
# If you wish to post to WOW, set the option 'enable' to true, then specify a station and
# password. To guard against parsing errors, put the password in quotes.
# >> Example values to match images.
enable = true
station = "3251462c-74fc-ec11-b5cf-0003ffffffff"
password = "EvilPlace"
- Save the configuration file.
- Restart weewx.
sudo /etc/init.d/weewx restart
The WOW Site registration page uses the 4. Site Data Preferences section to describe the realistic accuracy of your station. This section was horribly cryptic until I found the section description in the Support Pages:
Support > Site Ratings
I found some help in debugging the upload process in:
Support > Data Formats and APIs
In particular, I found that using the Example URL meant that instead of working with WeeWx to communicate to WOW which could take 5 minutes per cycle, I could instead, manually send REST requests off to WOW at any speed. This way I finally got the station (= siteid) and password (= Authentication Key = siteAuthenticationKey) correct.
As mentioned above, this document was written when I transferred the WeeWX software from a Raspberry Pi 4 2GB to a Raspberry Pi Zero 2.
The essentials of the transfer were particularly easy. I loaded a new WeeWX on the Pi Zero using the directions above and then to transfer the data across:
- Stop weewx on the Raspberry Pi 4, and the Raspberry Zero 2.
sudo /etc/init.d/weewx stop
- Copy
/var/lib/weewx/weewx.sdb
from the Pi 4 to Pi Zero 2. - Start weewv on the Pi Zero 2. The FTP to web server module picked up immediately and transferred web pages on the next 5 minute boundary.
I found the wireless connection got faulty after a few days. The symptom being that weewx would lose data and frequently show temperature (and other readings) as N/A with the daily graphs being dots instead of continuous lines.
Cure: I turned off wireless in the Raspberry Pi Zero 2 and used ethernet-to-usb. The data reception was rock solid from then on.