Extension for WeeWX that allows publishing LOOP records to an MQTT broker.
This extension requires Python 3, WeeWX 4 and the Paho MQTT library.
- Ensure you are using Python 3 and WeeWX 4. You'll also need to have set up an MQTT broker.
- Install the Paho MQTT library:
E.g.:
# Debian, Ubuntu, Raspberry Pi OS
$ sudo apt install python3-paho-mqtt
Or:
# Fedora
$ sudo dnf install python3-paho-mqtt
Or:
# Arch
$ sudo pacman -S python-paho-mqtt
Or:
# pip
$ sudo pip3 install paho-mqtt
- Download the release file from this repository.
- Install the extension using the
wee_extension
utility:
E.g.:
# Replace file name with actual path of downloaded file
$ sudo wee_extension --install weewx-mqtt.tar.xz
- Open the WeeWX configuration file in your favorite text editor:
E.g.:
$ sudo nano /etc/weewx/weewx/conf
- Find the
[StdRESTful]
section and navigate to the[[MQTT]]
section within it. - Edit the configuration options according to your needs:
# Configuration for uploading LOOP data to an MQTT broker
[[MQTT]]
# Enable/disable this service
enable = true
# Hostname/IP of MQTT broker
host = localhost
# Credentials
# Leave blank or uncomment for anonymous authentication
#user =
#password =
# Prefix for topics
topic = weather
- Save the edited configuration
- Start or restart WeeWX
Any contributions to this project are absolutely welcome: issues, documentation and even pull requests.
This project is licensed under the Apache License, Version 2.0. See the LICENSE
file for a copy of the license.
All trademarks are held by their respective owners.