MQTT
Uit WaaaghPedia
Install
CentOS 7
sudo yum -y install mosquitto
Raspberry PI
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key sudo apt-key add mosquitto-repo.gpg.key cd /etc/apt/sources.list.d/
Then one of the following, depending on which version of debian you are using: cat /etc/debian_version
- 7 = Wheezy
- 8 = Jessie
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list sudo wget http://repo.mosquitto.org/debian/mosquitto-jessie.list sudo apt-get update sudo apt-get install mosquitto mosquitto-clients
Werking
Lees MQTT Server
mosquitto_sub -h localhost -t "#"
-h: Server
-t: Topic
Post naar MQTT Server
mosquitto_pub -h localhost -t testTopic -m "Hello world!"
-h: Server
-t: Topic
-m: Bericht
Tools
MQTT Spy
https://github.com/eclipse/paho.mqtt-spy/wiki/Downloads
Bron
https://arduinodiy.wordpress.com/2017/11/24/mqtt-for-beginners/
https://www.wire-kit.nl/category/tutorials/beginner/
https://www.domoticz.com/wiki/MQTT
https://iot.stackexchange.com/questions/3482/mosquitto-sub-command-not-found