A WeeWX extension that uploads weather data to Temperatur.nu
weewx-temperaturnu is a WeeWX extension that automatically uploads your weather station’s temperature data to Temperatur.nu, a Swedish weather data collection service. The extension is designed to be lightweight and simple, requiring no external Python dependencies.
Visit Temperatur.nu New Station to register your weather station and obtain an API key.
wget -O weewx-temperaturnu.zip https://github.com/rc-chuah/weewx-temperaturnu/archive/master.zip
For WeeWX v4 and earlier:
wee_extension --install weewx-temperaturnu.zip
For WeeWX v5:
weectl extension install weewx-temperaturnu.zip
Edit /etc/weewx/weewx.conf and add the following section:
[StdRESTful]
[[TemperaturNu]]
apikey = YOUR_API_KEY_FROM_TEMPERATUR.NU
Optional configuration parameters:
[StdRESTful]
[[TemperaturNu]]
# Your API key from temperatur.nu (required)
apikey = YOUR_API_KEY_HERE
# Enable or disable uploads (default: true)
enabled = true
# Server URL (default: https://www.temperatur.nu/rapportera.php)
server_url = https://www.temperatur.nu/rapportera.php
sudo systemctl restart weewx
The extension performs the following tasks:
outTemp)The extension automatically converts your weather station’s temperature to Celsius using WeeWX’s built-in weewx.units.to_METRICWX() helper function. This ensures accuracy regardless of your station’s native unit system.
| Fahrenheit | Celsius |
|---|---|
| 32°F | 0°C |
| 68°F | 20°C |
| 72.5°F | 22.5°C |
| 212°F | 100°C |
This extension uses HTTP GET to upload data to Temperatur.nu with the following format:
GET /rapportera.php?hash=YOUR_API_KEY&t=22.5 HTTP/1.1
Host: www.temperatur.nu
tail -f /var/log/syslog | grep temperaturnu
Add to /etc/weewx/weewx.conf:
debug = 2
Then restart WeeWX:
sudo systemctl restart weewx
cd /usr/share/weewx
PYTHONPATH=bin python bin/user/temperaturnu.py
Expected output:
Test 1 - US Units (Fahrenheit):
https://www.temperatur.nu/rapportera.php?hash=test_key_12345&t=22.5
Test 2 - Metric Units (Celsius):
https://www.temperatur.nu/rapportera.php?hash=test_key_12345&t=22.5
| Issue | Solution |
|---|---|
| No data uploading | Verify API key in weewx.conf is correct |
| Temperature missing | Ensure your station records temperature (outTemp) |
| Connection errors | Check internet connectivity; test URL with curl |
| Wrong temperature | Check your station’s unit system setting |
curl "https://www.temperatur.nu/rapportera.php?hash=YOUR_API_KEY&t=20"
This extension uses only Python’s standard library. The following modules are utilized:
Queue (Python 2) / queue (Python 3)urllib / urllib.parse (Python 3)systimelogging / syslogNo external pip packages are required.
Copyright © 2026 RC Chuah
Distributed under the terms of the GNU General Public License (GPLv3)