Zeile 1: |
Zeile 1: |
| + | MQTT ist ein Standard, dessen Ursprünge weit vor dem Internet of Things liegen, aber für dieses häufig geeignet ist, um Informationen zwischen Sensoren und Aktoren auszutauschen. |
| + | |
| + | Der Versand von Informationen geht über einen Broker, dessen bekanntester Vertreter das Programm mosquitto ist, das auch einen öffentlichen Test-Broker unter |
| + | test.mosquitto.org zur Verfügung stellt. |
| + | |
| + | Auch zwischen Brokern können Nachrichten ausgetauscht werden. Siehe dazu die [http://www.steves-internet-guide.com/mosquitto-bridge-configuration/ diese Anleitung]. |
| + | |
| + | |
| + | == MQTT Server == |
| + | |
| + | Standard-Server ist mosquitto. |
| + | |
| + | == MQTT Clients == |
| + | === Web Clients === |
| + | Es gibt verschiedene Demo-MQTT-Clients, z.B. |
| + | * https://testclient-cloud.mqtt.cool/ |
| + | * https://www.hivemq.com/demos/websocket-client/ |
| + | |
| + | |
| + | === JavaScript Client API === |
| + | |
| + | Siehe |
| + | * [https://www.npmjs.com/package/mqtt MQTT.js client] |
| + | ** [https://github.com/mqttjs/async-mqtt Für MQTT.js gibt es auch Promises: mqtt-async] |
| + | ** https://www.emqx.com/en/blog/mqtt-js-tutorial |
| + | ** https://www.emqx.com/en/blog/how-to-use-mqtt-in-nodejs |
| + | ** https://www.hivemq.com/blog/ultimate-guide-on-how-to-use-mqtt-with-node-js/ |
| + | ** [https://github.com/MaximoLiberata/react-native-mqtt.js-example MQTT.js funktioniert auch auf React Native] |
| + | * https://mqtt.cool/download/web-client-sdk-2-0-0/ |
| + | |
| + | === Kommandozeilen-Clients === |
| + | |
| + | mosquitto_pub und mosquitto_sub |
| + | |
| + | == MQTT Auto Discovery == |
| + | |
| + | [[Homeassistant]] hat mit dem [https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery Auto Discovery Protocol] einen Standard gesetzt, wie man MQTT-Datenpunkte automatisch in eine [[Gebäudeautomation]]sumgebung einbindet. |
| + | |
| + | Siehe |
| + | * https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery |
| + | * https://resinchemtech.blogspot.com/2023/12/mqtt-auto-discovery.html |
| + | * https://opensource.com/article/21/2/home-assistant-custom-sensors |
| + | * https://community.home-assistant.io/t/mqtt-discovery-how-to-realize/659592/5 |
| + | |
| + | == Weiterführendes == |
| + | |
| Siehe auch | | Siehe auch |
| | | |
| * [[LoRaWAN#MQTT_Server]] | | * [[LoRaWAN#MQTT_Server]] |
| + | * [[Geb%C3%A4udeautomation#Selbstbaul.C3.B6sung_mit_Wemos_D1_Mini_und_MQTT]] |
| | | |
| ----- | | ----- |