packet:bpqmonweb
This is an old revision of the document!
Tom 2E0JJI's bpqmonweb
Tom has created a superb web application to monitor a BPQ or Xrouter node. This involves installing a web server, installing an MQTT broker, and configuring the whole lot. This is on a Pi running Raspberry Pi OS 12 - let's start with installing the required packages:
sudo apt install -y git nginx mosquitto
Grab Tom's repository and copying everything into the web server
mkdir ~/src; cd ~/src git clone https://github.com/packethacking/bpqmonweb.git cd ~/src/bpqmonweb sudo rm /etc/nginx/sites-enabled/default sudo cp nginx/nginx.conf /etc/nginx/sites-available/bpqmonweb sudo cp *.html /usr/share/nginx/html/ sudo cp *.css /usr/share/nginx/html/ sudo cp *.js /usr/share/nginx/html/ sudo systemctl restart nginx.service
Now we need to add an entry to our hosts file so the nginx proxy knows where mosquitto is located on the network
echo "127.0.0.1 mosquitto" | sudo tee -a /etc/hosts
Then, we need to set up mosquitto users - replace the supersecretbpqmqttpassword with something “secret” so other people can't publish to your MQTT server!
echo "bpquser:supersecretbpqmqttpassword" | sudo tee /etc/mosquitto/bpqpasswd echo "bpqmonweb:bpqmonweb" | sudo tee /etc/mosquitto/webpasswd sudo mosquitto_passwd -U /etc/mosquitto/bpqpasswd sudo mosquitto_passwd -U /etc/mosquitto/webpasswd
and create some configuration files for mosquitto to enable publishing and websocket access
echo 'per_listener_settings true listener 1883 password_file /etc/mosquitto/bpqpasswd allow_anonymous false listener 9001 protocol websockets password_file /etc/mosquitto/webpasswd acl_file /etc/mosquitto/webaclfile allow_anonymous false' | sudo tee /etc/mosquitto/conf.d/bpqmonweb.conf sudo systemctl restart mosquitto.service
packet/bpqmonweb.1744492219.txt.gz · Last modified: 2025/04/12 21:10 by m0mzf