Hi @sihui - I’m the one who raised those issues, and unfortunately the 3 pull requests I have up there for these are not yet merged, however 2 of them are documentation only, and one can be overcome by a quick edit of one file.
@joflo - If this helps, see the following documentation that I used for building it on my PI 3B.
Apologies for the formatting, its a cut ‘n’ paste from my House Wiki - Hopefully nothing was lost in the process…. Only caveat, is the last time I performed this process, was early 2025, and on Ubuntu ~ 24.04
Hope this helps.
Install Pre-Requisite Packages
sudo apt-get update
sudo apt-get install python3 python3-pip
python3 --version
Clone mqttany
cd /opt
sudo git clone -b v0.14.4 https://github.com/CrazyIvan359/mqttany.git
sudo mkdir /etc/mqttany
sudo cp /opt/mqttany/mqttany/config/mqttany.yml /etc/mqttany/mqttany.yml
Setup Python Virtual Environment
sudo python3 -m venv /opt/mqttany/mqttany/venv
Edit mqtt pip requirements
sudo nano -B /opt/mqttany/requirements/mqttany.txt
Change: pyyaml>=5.1.2,<=6.0 to: pyyaml>=5.1.2,<=6.0.2
Install PIP Modules
sudo /opt/mqttany/mqttany/venv/bin/pip3 install -r /opt/mqttany/requirements/i2c.txt
sudo /opt/mqttany/mqttany/venv/bin/pip3 install -r /opt/mqttany/requirements/led-rpi.txt
sudo /opt/mqttany/mqttany/venv/bin/pip3 install -r /opt/mqttany/requirements/mqtt.txt
sudo /opt/mqttany/mqttany/venv/bin/pip3 install -r /opt/mqttany/requirements/mqttany.txt
sudo /opt/mqttany/mqttany/venv/bin/pip3 install importlib
Edit mprop file to fix deprecated package
sudo nano -B /opt/mqttany/mqttany/venv/lib/python3.12/site-packages/mprop.py
change line 2:
from: import imp to: import importlib