Difference between revisions of "WeeWX Weather Server"
| Line 60: | Line 60: | ||
=== Uploading to your own webserver === | === Uploading to your own webserver === | ||
=== Broadcasting over MQTT === | === Broadcasting over MQTT === | ||
Install paho-mqtt | |||
* <code>sudo apt -y install python3-paho-mqtt</code> | |||
Download the WeeWX MQTT Extension: | |||
* <code>wget -O weewx-mqtt.zip <nowiki>https://github.com/matthewwall/weewx-mqtt/archive/master.zip</nowiki></code> | |||
Install the extension: | |||
* <code>sudo weectl extension install weewx-mqtt.zip</code> | |||
Then edit weewx.conf to configure things for your own MQTT server | |||
* <code>sudo vim /etc/weewx/weewx.conf</code> | |||
Scroll down & find the '''<nowiki>[[MQTT]]</nowiki>''' block, then edit it to suit your network. | |||
<nowiki>[[MQTT]]</nowiki> | |||
server_url = mqtt://'''Machine.Domain.TLD''':1883 | |||
topic = '''weather''' | |||
unit_system = METRIC | |||
restart WeeWx | |||
* <code>sudo systemctl restart weewx</code> | |||
* <code></code> | * <code></code> | ||
Revision as of 16:55, 31 August 2025
This particular set of instructions is based on building a Debian 12 based LXC under Proxmox to handle WeeWX. On my network, I have an existing WebServer & an existing Automation Server. The intent is to have the weather information served up as a web page (Default WeeWX thing...) by the WebServer and also be used by the Automation Server.
There is also a dedicated Database Server which we will be using. (can't possibly do things the easy way...)
(Based on: WeeWX: Installation on Debian-based systems)
Originally, the old version of this article was done with a much earlier version of WeeWX & our old Accurite weather station. Things have seriously changed since those days...
Configure apt
sudo apt install -y wget gnupgwget -qO - https://weewx.com/keys.html | sudo gpg --dearmor --output /etc/apt/trusted.gpg.d/weewx.gpgecho "deb [arch=all] https://weewx.com/apt/python3 buster main" | sudo tee /etc/apt/sources.list.d/weewx.list
Install WeeWX
sudo apt updatesudo apt install weewx
During this step, you will be asked for all the details about your install.
Fill everything in as best you can, but you can indeed change things later too.
If you are using weather station hardware that is supported by default, go ahead and select that hardware when asked. In my case, I'm currently running an EcoWitt weather station & that will require a little more effort. For now, I'm selecting Simulator as my hardware type.
Once the machine has finished churning away at the install, WeeWX will be running. You can verify this by running:
sudo systemctl status weewx
Setting up for EcoWitt gear
You'll be installing the Ecowitt Gateway (formerly GW1000) Driver
(Something happened to the original developer & all his stuff has vanished from the Interwebs...)
wget -O weewx-gw1000.zip https://github.com/hoetzgit/weewx-gw1000/archive/master.zipsudo weectl extension install weewx-gw1000.zip
Verify it can talk to your EcoWitt gateway:
PYTHONPATH=/usr/share/weewx python3 /etc/weewx/bin/user/gw1000.py --test-driver --ip-address=device_ip_address
(Where you replace device_ip_address with the actual address of your gateway...)
You should observe loop packets being emitted on a regular basis. Once finished press ctrl-c to exit.
Note: You will only see loop packets and not archive records when running the driver directly. This is because you are seeing output not from WeeWX, but rather directly from the driver.
Configure WeeWX to use the driver:
sudo weectl station reconfigure --driver=user.gw1000
restart WeeWx
sudo systemctl restart weewx
(Note: I've verified this with GW1100 and GW1200 gateways so far...)
Customising WeeWX
Connecting to a remote database
Uploading to your own webserver
Broadcasting over MQTT
Install paho-mqtt
sudo apt -y install python3-paho-mqtt
Download the WeeWX MQTT Extension:
wget -O weewx-mqtt.zip https://github.com/matthewwall/weewx-mqtt/archive/master.zip
Install the extension:
sudo weectl extension install weewx-mqtt.zip
Then edit weewx.conf to configure things for your own MQTT server
sudo vim /etc/weewx/weewx.conf
Scroll down & find the [[MQTT]] block, then edit it to suit your network.
[[MQTT]]
server_url = mqtt://Machine.Domain.TLD:1883
topic = weather
unit_system = METRIC
restart WeeWx
sudo systemctl restart weewx