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.
- ✅ Automatic temperature conversion to Celsius using WeeWX unit helpers
- ✅ Lightweight with zero external dependencies
- ✅ Compatible with Python 2.7+ and Python 3.x
- ✅ Works with WeeWX v3.8.0 and later
- ✅ Support for both WeeWX v4 and v5 installers
- ✅ Simple configuration via weewx.conf
- Python: 2.7+ or 3.x
- WeeWX: v3.8.0 or later
- API Key: from Temperatur.nu
- External Libraries: None (uses only Python standard library)
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.zipFor WeeWX v4 and earlier:
wee_extension --install weewx-temperaturnu.zipFor WeeWX v5:
weectl extension install weewx-temperaturnu.zipEdit /etc/weewx/weewx.conf and add the following section:
[StdRESTful]
[[TemperaturNu]]
apikey = YOUR_API_KEY_FROM_TEMPERATUR.NUOptional 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.phpsudo systemctl restart weewxThe extension performs the following tasks:
- Monitors archive records from your WeeWX weather station
- Extracts the outdoor temperature (
outTemp) - Converts temperature to Celsius (if your station uses Fahrenheit or other units)
- Uploads the temperature data to Temperatur.nu via HTTP GET for each new archive record
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 temperaturnuAdd to /etc/weewx/weewx.conf:
debug = 2Then restart WeeWX:
sudo systemctl restart weewxcd /usr/share/weewx
PYTHONPATH=bin python bin/user/temperaturnu.pyExpected 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/syslog
No external pip packages are required.
Copyright © 2026 RC Chuah
Distributed under the terms of the GNU General Public License (GPLv3)
- Original Concept: Based on weewx-windy by Matthew Wall and Jacques Terrettaz
- Modified for Temperatur.nu: RC Chuah
- WeeWX: https://www.weewx.com/
- Temperatur.nu: https://www.temperatur.nu/
- WeeWX Documentation: https://www.weewx.com/docs/
- weewx-windy: https://github.com/Jterrettaz/weewx-windy