Control your Tasmota home automation accessories, configure the Homy MQTT connector

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.

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.

1 cloudmqtt create instance

Give a name to your instance and continue

cloudmqtt instance domoticz mqtt

Select the Cute Cate plan which is free (but limited to 5 simultaneous connections). Continue by clicking on Select Region.

 cloudmqtt plan prix

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

cloudmqtt localisation serveur aws

Finalize the creation of the instance on the next page by clicking Create Instancecloudmqtt create instance domoticz homy

The new instance is added to the list.

cloudmqtt instance domoticz created

Click on the name of the instance to open the connection parameters:

  • Server: the login domain name
  • User and password
  • Several ports are available

cloudmqtt mqtt instance info connexion

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.

cloudmqtt tasmota configuration

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

tasmota firmware connected cloudmqtt console ok

You can also connect to the UI websocket on cloudMQTT to verify that the online message has been received.

cloudmqtt sonoff s26 mqtt connected tasmota firmware

Everything is ready, you can go back to Homy to configure the connector.

Configure the MQTT Connector for Homy

Open the Settings

homy settings

Open the Connector List.

homy settings

Click the Plus.

homy connector list

Choose MQTT from the connector list.

homy add new connector mqtt broker

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.

homy mqtt connector settings

Other options (optional)

You can let Homy automatically add all new Domoticz devices found on the server by checking the synchronization option

homy mqtt connector auto add new device detected

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!

homy mqtt connector auto discover domoticz devices

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

Subscribe to the weekly newsletter

No spam and no other use will be made of your email. You can unsubscribe anytime.

Tags:

We will be happy to hear your thoughts

Leave a Reply

DIY Projects
%d bloggers like this: