Mosquitto / MQTT
One of my first experiments starting with DigiPi on my Raspberry Pi 4 was to install MQTT ( Mosquitto )
sudo remount
sudo apt-get install mosquitto
sudo apr-get install mosquitto-clients
sudo systemctl enable mosquitto
sudo systemctl start mosquitto
sudo systemctl status mosquitto
The commands above gave no special problems. To using mosquitto over the network additional setup is needed. This protection only demonstrates attention to safety of DigiPi.
mosquitto -v
1700517586: mosquitto version 2.0.11 starting
1700517586: Using default config.
1700517586: Starting in local only mode. Connections will only be possible from clients running on this machine.
1700517586: Create a configuration file which defines a listener to allow remote access.
1700517586: For more details see https://mosquitto.org/documentation/authentication-methods/
1700517586: Opening ipv4 listen socket on port 1883.
1700517586: Error: Address already in use
1700517586: Opening ipv6 listen socket on port 1883.
1700517586: Error: Address already in use
Local test
As (local) test i typed in a terminal screen (i used the browser terminal) to subscibe to mytest
mosquitto_sub -d -t mytest
In another screen (for this i did log in using putty) i published "demo" to mytest
mosquitto_pub -d -t mytest -m "demo"
And got the expected response !
Perhaps i will later on use MQTT in combination with DireWolf
To use mosquitto over the network additional setup is needed. This protection only demonstrates attention to safety of DigiPi.
No comments:
Post a Comment