The Tasmota firmware is very easy to install on Sonoff home automation modules. It installs instead of the official firmware and drive these modules from almost all home automation servers Open Source (Domoticz, Home Assistant …). You can also control all your Tasmota accessories without going through a home automation server directly from Homy. By connecting your Tasmota accessories to an online broker such as cloudMQTT, you can easily control them even when you’re away from home*.
(*) Need a 3G/4G internet connection or to be connected to a WiFi network obviously.
- 1 Create a free MQTT broker on cloudMQTT
- 2 Configure the MQTT connection on Tasmota
- 3 Check that the Tasmota accessory is correctly connected to cloudMQTT
- 4 Configure the MQTT Connector for Homy
- 5 Configure the MQTT Connector with the connection parameters of a cloudMQTT instance
- 6 Other options (optional)
- 7 Limitations of the MQTT connector for Tasmota
- 8 Other tutorials on the same theme
Create a free MQTT broker on cloudMQTT
cloudMQTT is a broker (server) MQTT online that offers a free offer. The free offer is limited to 5 simultaneous connections but it is more than enough for personal use. You will find other free online brokers here.
Create a free account on cloudMQTT. You will just need an email. Once logged in, click Create New Instance.
Give a name to your instance and continue
Select the Cute Cate plan which is free (but limited to 5 simultaneous connections). Continue by clicking on Select Region.
cloudMQTT uses Amazon AWS servers to function. You can choose the server on which your data will transit. Here, they will go through Ireland. Do not worry, the choice has little impact on the performance of your connection. Amazon AWS is a cloud leader…
Finish with Review
The new instance is added to the list.
Click on the name of the instance to open the connection parameters:
- Server: the login domain name
- User and password
- Several ports are available
Configure the MQTT connection on Tasmota
Connect to your Tasmota home automation accessory and open the MQTT connection configuration page (configuration -> Configure MQTT).
Enter the following parameters from the cloudMQTT parameters presented earlier:
- Host: cloudMQTT server on which your instance was created
- Port: the standard port. The SSL port is not supported by Tasmota
- User and Password of the cloudMQT instance.
Save the change by clicking Save. The Tasmota module restarts to apply the new settings.
Check that the Tasmota accessory is correctly connected to cloudMQTT
To find out if Tasmota has successfully connected to cloudMQTT, just open the console (log). No error or confirmation message is displayed if all is correct. Valid cloud connectionMQTT
You can also connect to the UI websocket on cloudMQTT to verify that the online message has been received.
Everything is ready, you can go back to Homy to configure the connector.
Configure the MQTT Connector for Homy
Open the Settings
Open the Connector List.
Click the Plus.
Choose MQTT from the connector list.
Configure the MQTT Connector with the connection parameters of a cloudMQTT instance
Complete the following parameters:
- Name the connector. Optional
- Check Active to enable the connector. By unchecking this option, you can suspend communication with the external temporary
- IP broker or domain name. Specify the cloudMQTTPort server (server) name.
- Enter the Websockets Port (TLS only) port of the cloudMQTT instance. Here 36338. The port is randomly assigned when the instance is created.
- Protocol: choose WSS (secure) for cloudMQT
- Finally, enter the user and password of your instance
- Test the connection. Click on “Test Connection”. If Homy could connect and authenticate to the cloudMQTT instance, the cross will be green. An exclamation point will be displayed if this is not the case**
** Warning, the connection test is not 100% reliable. Repeat several times, waiting a few seconds between each test if the feedback is negative and your settings seem correct.
Other options (optional)
You can let Homy automatically add all new Domoticz devices found on the server by checking the synchronization option
Unlike the HTTP interface, there is no function to retrieve with a single command the state (and configuration) of all available accessories. To work around this problem Homy scans the accessories up to the limit set by the auto scan field. This is a temporary solution for want of anything better. If you notice that there are missing accessories, consider adjusting the threshold of self-exploration by indicating the largest IDX of the table of the devices.
If you have several devices (smartphone, tablet …) on which you have installed Homy, you can synchronize Homy settings between your devices. All your data is synchronized via the MQTT broker. No information passes through a third party server. You keep control of 100% of your personal data!
Limitations of the MQTT connector for Tasmota
For the moment, the connector is limited to the following functions:
- Retrieve the states of the digital outputs
- Change the state of a digital output (On / Off)
- Retrieve the measurements of the sensors supported by Tasmota
Functions not yet supported:
- Dimmer ( dimmer)
- Color temperature
Other tutorials on the same theme
- Control Home Assistant from Homy, configure the connector
- Control HASS shutters, blinds and garage door (cover component) from Homy
- Control Home Assistant HVAC, Heat Pump and Thermostats (climate component)
- Control Home Assistant Vacuum component (robot vacuum cleaner) from Homy
- Control Domoticz from Homy, configure the HTTP / HTTPS connector
- Control your Tasmota home automation accessories, configure the Homy MQTT connector
- Control Domoticz via the JSON API, configure the Homy MQTT connector