### Domoticz MQTT Broker

DOMOTICZ MQTT BROKER
Reference: http://www.domoticz.com/wiki/MQTT
IMPORTANT:
Define a Hardware Device first:
Hardware: MQTT Client Gateway with LAN Interface
Name: MQTT Client
Remote Address: 192.168.0.21 (the Raspberry Pi host address - this is an example)
Port: 1883 (this is default to set)
Publish Topic Flat
To sent a message to Domoticz subscribe as domoticz/in and publish using domoticz/in and the payload defined.
B4X Example:
Private mqtt As MqttClient
mqtt.Subscribe("domoticz/in", 0)
mqtt.Subscribe("domoticz/out", 0)
Domoticz Log
Check the Domoticz Log if connection established and messages are received.
Examples:
2015-10-25 10:04:47.188 Domoticz V2.3444 (c)2012-2015 GizMoCuz
2015-10-25 10:04:47.189 Build Hash: d546d82, Date: 2015-10-24 17:07:46
2015-10-25 10:04:47.189 System: Raspberry Pi
2015-10-25 10:04:47.189 Startup Path: /home/pi/domoticz/
2015-10-25 10:04:49.309 Sunrise: 07:07:00 SunSet:17:02:00
2015-10-25 10:04:49.309 EventSystem: reset all events...
2015-10-25 10:04:49.351 Active notification subsystems: email (1/10)
2015-10-25 10:04:49.356 Webserver started on port: 8080
2015-10-25 10:04:49.365 Webserver started on port: 443
2015-10-25 10:04:49.370 Started shared server on: 0.0.0.0
2015-10-25 10:04:51.372 Hardware Monitor: Started
2015-10-25 10:04:51.374 GPIO: WiringPi is now initialized
2015-10-25 10:04:51.375 GPIO: Worker started...
2015-10-25 10:04:51.376 EventSystem: reset all events...
2015-10-25 10:04:51.376 EventSystem: reset all device statuses...
2015-10-25 10:04:51.378 EventSystem: Started
2015-10-25 10:04:52.376 MQTT: Connecting to 192.168.0.21:1883
2015-10-25 10:04:52.477 MQTT: connected to: 192.168.0.21:1883
2015-10-25 10:04:52.578 MQTT: Subscribed
2015-10-25 10:04:54.373 Hardware Monitor: Fetching data (System sensors)
2015-10-25 10:05:06.281 MQTT: Topic: domoticz/in, Message: {"idx":12, "nvalue":0, "svalue":"19"}
2015-10-25 10:05:06.392 MQTT: Topic: domoticz/in, Message: {"idx":13, "nvalue":0, "svalue":";;;1021;0"}
2015-10-25 10:05:06.502 MQTT: Topic: domoticz/in, Message: {"idx":11, "nvalue":58, "svalue":"1"}
2015-10-25 10:05:06.612 MQTT: Topic: domoticz/in, Message: {"idx":15, "nvalue":0, "svalue":"Update Domoticz at 25-Oct-2015 10:05"}
2015-10-25 10:05:12.514 Incoming connection from: 192.168.0.2

Changed: , Category: Raspberry Pi MQTT, File: T6C236M1727.htm, ID: 1727