Configuring MQTT (V1.9.5 firmware)¶
This page is for firmware version 1.9.5. If you have a Gateway with the new V2 firmware continue HERE.
The Gateway will communicate with your home automation system via the MQTT protocol.
The Gateway acts as a MQTT client and communicates with a MQTT server (also called a broker). For this you need a MQTT broker/server installed on your machine. Usually this is Mosquitto 1. If you are using Home Assistant or Domoticz, often this is pre-installed already.
Check if you have a MQTT broker/server¶
You can check if your machine has mosquitto installed. Open a SSH terminal on the machine your home automation system is running (f.i. a Raspberry Pi). Type in f.i. mosquitto_pub in the terminal. If it says ‘command not found’ you need to install Mosquitto 2 first. If you get a list of options, or an error that it is already running, Mosquitto is installed.
Although usually the MQTT server is running on the same machine as your home automation system, it is also possible it is installed elsewhere.
Making the appropriate settings¶
MQTT server address and configuration¶
Go back to the web interface of the Gateway. Go to ‘Settings’ and click on ‘MQTT settings’.
Usually the only setting you need to change here is the ‘IP Address’. Type in the IP address of the machine your MQTT server is running om in and click on ‘Save’. Normally you can leave all other setting to its default as shown. Optionally set a username and password if your MQTT broker demands authentication.
If you use the Domoticz plugin you need to set the ‘base’ parameter to ‘home’.
If everything went well, going to ‘System Status’ will show ‘MQTT is connected’. If it doesn’t, go to the troubleshooting section.
Set the right MQTT update frequency¶
By default the Gateway will publish the set of MQTT messages every 60 or 120 seconds. For temperature and general logging this is a good update frequency. However, this is too slow if you also want to capture short events like turning on the warm water for 30 seconds. If needed you can change the frequency in the web interface in ‘Custom Settings’ -> ‘Publish Time’. Don’t set it too low as it will bombard Domoticz with messages.
If you set this to zero, MQTT messages will be sent as soon as an EMS bus message has been received. However, this function is still under development.