Installation et paramètrage Mosquitto
Installation du broker
apt-get install mosquitto
Installation du client
apt-get install mosquitto-clients
Test de lancement
ps aux |grep mosquitto
Test de fonctionnement :
1 – Accepter tous les topics
mosquitto_sub -h localhost -v -t "#"
2 – Dans une autre fenêtre SSh créer un topic et envoyer des infos
mosquitto_pub -h localhost -t "ha/test" -m "Yo ça biche ?"
3 – la réponse doit donner un truc comme ça :
root@ubuntu:~# mosquitto_sub -h localhost -v -t "#" ha/test Yo ça biche ?