Raspberry Pi MQTT Broker (Mosquitto)
What is Mosquitto?
Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 3.1 and 3.1.1. MQTT.Broker , Publisher , Subscriber
How to Install?
Update your Raspberry pi First.
sudo apt-get update
sudo apt-get upgrade
Install mosquitto developer api library
sudo apt-get install libmosquitto-dev
Install mosquitto
sudo apt-get install mosquitto mosquitto-clients
How to Test?
After installation Mosquitto will be automatically started. To test, install the MQTT.FX software. ( Download ) After
installation issue following command into terminal window where we left after
mosquitto installation
mosquitto_sub -d -t hello/world
Now open MQTT.FX and click on setting. Then enter IP address of your Pi and port address 1883 (by default) ( see pics below ). Click apply and connect
Connect Mosquitto Broker at Raspberry Pi IP Address
Publish Topic "hello/world" Payload "Test 123456789"
Mosquitto Broker received data.
My Website
email : info@softpowergroup.net Tel .081-6452400
when i write command
ตอบลบmosquitto_sub -d -t hello/world
i get in response
Error: Connection refused
Can you help me with this