# \[APP\]\[Pro\] Tasmota MQTT

**URL:** <https://community.homey.app/t/app-pro-tasmota-mqtt/26164>\
**Category:** Apps\
**Tags:** homey-pro\
**Created:** [February 20, 2020, 6:14pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164 "2020-02-20T18:14:10Z")\
**Posts on this page:** 20\
**Page:** 15

<div class="post-metadata">

**Author:** ![Snoop](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/snoop/32/36434_2.png) [@Snoop](https://community.homey.app/u/Snoop)\
**Post date:** [April 8, 2021, 9:50am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/281 "2021-04-08T09:50:37Z")

</div>

Thanks Pavlo. I can change the icône in HomeKit so it is not a big deal 🙂 just wanted to know if I messed around.

---

<div class="post-metadata">

**Author:** ![Snoop](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/snoop/32/36434_2.png) [@Snoop](https://community.homey.app/u/Snoop)\
**Post date:** [April 8, 2021, 6:06pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/282 "2021-04-08T18:06:15Z")

</div>

I have another stupid question. Just added a Sonoff TX3EU2C and it is display as a multi plug and no direct access to individual switch. I created a virtual device for each switch and linked to flows. But is it the easiest way to have a quick access to individual switch ?

---

<div class="post-metadata">

**Author:** ![pavlo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavlo/32/17311_2.png) [@pavlo](https://community.homey.app/u/pavlo)\
**Post date:** [April 9, 2021, 5:58pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/283 "2021-04-09T17:58:22Z")

</div>

That is another thing that is pending to be implemented. For now, there is no other way. I have plans in the future to add the possibility to add separate switches for multi-switch devices.

---

<div class="post-metadata">

**Author:** ![Snoop](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/snoop/32/36434_2.png) [@Snoop](https://community.homey.app/u/Snoop)\
**Post date:** [April 10, 2021, 9:48am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/284 "2021-04-10T09:48:23Z")

</div>

I wasn’t asking for more work on your side as I know very well this issue of finding time for side project. Is Virtual Device the more efficient method at the moment?

---

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [April 10, 2021, 2:47pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/285 "2021-04-10T14:47:12Z")

</div>

@snoop Maybe the ‘MQTT device’ of the MQTT hub app?

---

<div class="post-metadata">

**Author:** ![unicus](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/unicus/32/39163_2.png) [@unicus](https://community.homey.app/u/unicus)\
**Post date:** [April 11, 2021, 8:23am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/286 "2021-04-11T08:23:58Z")

</div>

Hello everyone, I have multiple tasmota devices, but only one currently running mqtt and connected to my homey. It is an s26 smart plug with some lights connected. When I add the device in tasmota mqtt it is working fine for a while (days, up to a week) but inevitably it will be greyed out in my device list with a warning that says Device timed out. Restarting all the apps (broker, client, tasmota mqtt) does not fix it. The only fix is to remove the device and add it again. I don’t even know where to start troubleshooting when there is 3 different apps and one device at play here. Anyone have an idea about this?

---

<div class="post-metadata">

**Author:** ![pavlo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavlo/32/17311_2.png) [@pavlo](https://community.homey.app/u/pavlo)\
**Post date:** [April 12, 2021, 5:09am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/287 "2021-04-12T05:09:06Z")

</div>

Hi @unicus.  
Most likely, if the device fails with timeout and the problem is not in the device (you didn’t change the configuration or disconnected the device), MQTT communication is broken. To check if the device communicates with MQTT use the console from your s26 web interface. YOu should be able to see messages like this:  
06:00:59.899 MQT: stat/tasmota\_\*\*\*\*\*\*/STATUS  
(with MQT after timestamp).  
If you see these messages your device and MQTT broker communication is OK. Next step - to check the client. Use Configure App → Get logs from MQTT client and check if you can see messages like:  
20210412-05:02:12 received …  
If you see them client-broker communication also working. THen the reason should be - broken communication between the client and the tasmota MQTT app. The easiest way is to restart the tasmota MQTT application (but you will need to do it after each homey restart) or use this workaround: [[App] Tasmota MQTT - #276 by Joka](https://community.homey.app/t/app-tasmota-mqtt/26164/276)

---

<div class="post-metadata">

**Author:** ![pavlo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavlo/32/17311_2.png) [@pavlo](https://community.homey.app/u/pavlo)\
**Post date:** [April 18, 2021, 9:09pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/288 "2021-04-18T21:09:07Z")

</div>

Published 0.9.1 to beta ([Tasmota MQTT App voor Homey | Homey](https://homey.app/nl-nl/app/com.paveld.tasmota/Tasmota-MQTT/test/)) . This version is much more stable and contains a lot of fixes and small improvements. But I changed the way how Zigbee device ID generated so you need to remove all Zigbee (Zigbee only) devices added in version 0.9.0 and add them again (sorry but I warned it could happen). Also, I tried to fix the problem with the MQTT Client connection and I couldn’t reproduce the problem in my environment. Everything works like a charm, even if my app starts after the MQTT Client everything works. Anyway, I tried to work around the problem and add a mechanism that if there are no incoming MQTT messages longer than 10 minutes application will try to reconnect. Can somebody check if it is working? Also fixed all known bugs (and probably add a couple of fresh bugs 😃 )

---

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [April 18, 2021, 10:04pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/289 "2021-04-18T22:04:04Z")

</div>

@pavlo Have you seen (and tried) this already? Hopefully it solves many of the connection problems.

> [@Strange MQTT Client behavior](https://community.homey.app/t/strange-mqtt-client-behavior/45105/65):
>
> For completeness, the updated [test version](https://homey.app/nl-nl/app/nl.scanno.mqtt/MQTT-Client/test/) can be found here: Please report your findings slight_smile Details of the changes:

---

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [April 18, 2021, 10:25pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/290 "2021-04-18T22:25:21Z")

</div>

I also added a `reference` to the subscribe api. This `reference` can be used with the new `unsubscribe` api to dispose topics not needed anymore.

The `reference` can be any string grouping topic subscriptions.  
The base scenario is sending your app.id with every topic subscription to unsubscribe on app uninstall. Another example could be a device.id to manage active topics per device.

Example usage:

```
// Subscribe to all messages in the `homey` topic
// messages will pass through the onMessage method via the realtime api
MQTTClient.post(
        'subscribe', 
        { topic: 'homey/#', reference: 'my.app.id' }, 
        (error) => this.log(error || 'subscribed to topic: homey/#')
 );

// Unsubscribe from topics used by this app
// If the topic is not provided, all topics used by 'my.app.id' will be unsubscribed
MQTTClient.post(
        'unsubscribe', 
        { topic: 'homey/#', reference: 'my.app.id' }, 
        (error) => this.log(error || 'unsubscribed from topic: homey/#')
);
```

---

<div class="post-metadata">

**Author:** ![pavlo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavlo/32/17311_2.png) [@pavlo](https://community.homey.app/u/pavlo)\
**Post date:** [April 19, 2021, 5:28am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/291 "2021-04-19T05:28:42Z")

</div>

> [@HarriedeGroot](#):
>
> Have you seen (and tried) this already?

@HarriedeGroot No I haven’t seen it yet. It looks like you did a great job. Will try it today. That is great that you improved the processing of retained messages. Now I can try to implement support for new tasmota discovery.

---

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [April 19, 2021, 6:45am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/292 "2021-04-19T06:45:29Z")

</div>

@pavlo maybe the Homie Discovery device of the MQTT Hub can give you a jump start? Because the retained messages are send at topic subscription, discovered devices are coming in immediately.

Also the unsubscribe API is very useful here. Discovery takes place at some root wildcard topic. Now we can free the resources if discovery is finished. Before the client kept listening to all these messages until the app was restarted.

 ![Screenshot_20210417-101155](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/d/3dfe47b6b9824fd5876939e3a1dc30ab7dcef9fa.jpeg)

_Unsubscription is implemented in the test version of the MQTT Hub ([beta branch](https://github.com/harriedegroot/nl.hdg.mqtt/tree/beta))_.

---

<div class="post-metadata">

**Author:** ![Janno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/janno/32/21757_2.png) [@Janno](https://community.homey.app/u/Janno)\
**Post date:** [April 22, 2021, 10:06am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/293 "2021-04-22T10:06:26Z")

</div>

Hello. I have noticed during few days a 1-gang wall switch’s status is not updating for flows anymore (switch can be operated via Homey’s GUI and its status is updated correctly for GUI). Earlier the status changes for flows was working. (No such issue with 3-gang switch, at least for particular ‘button’). E.q. I have created a flow to generate a timeline notice when the switch’s button is pressed, but no notices are created. As if device ‘status’ is used instead of gang’s ‘status’? Currently running Tasmota app V.0.9.1 (experimental), Homey 5.0.4.  
Has anyone else seen that?

---

<div class="post-metadata">

**Author:** ![pavlo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavlo/32/17311_2.png) [@pavlo](https://community.homey.app/u/pavlo)\
**Post date:** [April 22, 2021, 6:32pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/294 "2021-04-22T18:32:30Z")

</div>

Yes, it could be my fault I changed a lot of code responsible for flow cards when were splitting code for Zigbee driver. I of course tested what I could but not all. Thanks for reporting I will check it.

---

<div class="post-metadata">

**Author:** ![pavlo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavlo/32/17311_2.png) [@pavlo](https://community.homey.app/u/pavlo)\
**Post date:** [April 25, 2021, 6:15am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/295 "2021-04-25T06:15:14Z")

</div>

Version 0.9.2 published to test. Some flow cards fixed. Added support for [Xiaomi Mijia Door & Window Sensor MCCGQ01LM Zigbee compatibility](https://zigbee.blakadder.com/Xiaomi_MCCGQ01LM.html)  
As always you can find it here: [Tasmota MQTT App voor Homey | Homey](https://homey.app/nl-nl/app/com.paveld.tasmota/Tasmota-MQTT/test/)  
If there will be no surprises this version will go to release in a couple of days.

---

<div class="post-metadata">

**Author:** ![Janno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/janno/32/21757_2.png) [@Janno](https://community.homey.app/u/Janno)\
**Post date:** [April 26, 2021, 6:39am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/296 "2021-04-26T06:39:37Z")

</div>

> [@pavlo](#):
>
> Some flow cards fixed.

I can also see, that in the v.0.9.2 the status update for the 1-gang switch started to work for flows. Thank You very much.

---

<div class="post-metadata">

**Author:** ![Arnold\_vd\_Linden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnold_vd_linden/32/19336_2.png) [@Arnold\_vd\_Linden](https://community.homey.app/u/Arnold_vd_Linden)\
**Post date:** [May 1, 2021, 7:27am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/297 "2021-05-01T07:27:19Z")

</div>

Looks like the last update broke flows to stop the sockets.

This option isn’t working anymore:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/3/93b67edb7edef2ca21b2157f74c9b260033dba18.jpeg)

Any ideas how to solve this?

---

<div class="post-metadata">

**Author:** ![pavlo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavlo/32/17311_2.png) [@pavlo](https://community.homey.app/u/pavlo)\
**Post date:** [May 2, 2021, 11:51am UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/298 "2021-05-02T11:51:14Z")

</div>

Sorry for that made a mistake when moved this action code from the device to the driver (according to the new SDK 3 approach). Funny that I tested it but only for a separate socket not for “all sockets”. Please, try the new test version v 0.9.3 [Tasmota MQTT App voor Homey | Homey](https://homey.app/nl-nl/app/com.paveld.tasmota/Tasmota-MQTT/test/) and let me know if it is working.

---

<div class="post-metadata">

**Author:** ![Arnold\_vd\_Linden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnold_vd_linden/32/19336_2.png) [@Arnold\_vd\_Linden](https://community.homey.app/u/Arnold_vd_Linden)\
**Post date:** [May 2, 2021, 12:32pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/299 "2021-05-02T12:32:54Z")

</div>

Yes it’s working again.  
Thx 👍🏻

---

<div class="post-metadata">

**Author:** ![pavlo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pavlo/32/17311_2.png) [@pavlo](https://community.homey.app/u/pavlo)\
**Post date:** [May 11, 2021, 8:00pm UTC](https://community.homey.app/t/app-pro-tasmota-mqtt/26164/301 "2021-05-11T20:00:59Z")

</div>

Strange never heard about this problem before. An application is written in a way to prevent it. The only explanation I could think of is problems with resource allocation on the Homey side (not enough memory). Can you try to reboot Homey by disconnecting it from power and try to add the Tasmota device again after that?  
If it will not help, I will explain how to send a bug report with logs and analyze this problem.

[Previous page](https://community.homey.app/t/app-pro-tasmota-mqtt/26164.md?page=14)

[Next page](https://community.homey.app/t/app-pro-tasmota-mqtt/26164.md?page=16)
