Adding support for tasmota devices through MQTT
This lightweight Homey device application adds Tasmota devices support through MQTT protocol. It uses Menno van Grinsven’s MQTT Client to communicate with an MQTT broker, so the client should be already installed and configured.
The current version of the application supports on/off capability for single or multiple sockets devices, power monitoring, dim, light_temperature, light_hue, and light_saturation capabilities for single socket devices.
- Any MQTT Broker
- MQTT Client
- Have MQTT Topics as the following:
%prefix%/%topic%/ (Tasmota default)
Feedback / Bugs
Any requests please post them in the Telegram topic on the Athom Community forum
Please report issues at the issues section on Github otherwise in this topic.
Would you like to buy me a coffee or a beer?
Feel free to donate to me for my work It’s highly appreciated!
Check out my other apps
What’s makes this app difference from the Sonoff app?
Because I use this app for my Sonoff Tasmota devices.
It is a good question. I used Sonoff application myself. But later decided develop new application.
1, Tasmota MQTT uses MQTT Client and Sonoff App makes a separate connection for each device. It means that Tasmota MQTT uses less memory especially in case when you have a lot of devices. Disadvantage of this approach is that it is not possible to add devices from different MQTT brokers. Only one broker supported (unlike Sonoff app)
2. Tasmota MQTT have only one type of device “Tasmota Device” all device capabilities is detected automatically from MQTT data sent by device. It makes much easier to add devices you don’t need to select device type it will be detected automatically. But for now, Tasmota MQTT supports only default tasmota MQTT topics (%prefix%/%topic%/), also only onoff capability and power monitoring (same as for Sonoff POW2 device) is supported. No dim or color light support yet (have plans to add it later).
3. Application support any tasmota device not only Sonoff for example I have couple of Zeoota power strips (https://nl.aliexpress.com/item/32864686078.html?spm=a2g0o.store_home.productList_1155678.pic_3) works without problems.
Also, you can use both application at the same time, even add same devices twice. Give it a try.
I will give it a try soon.
App works great! Have a couple of Sonoff basics, NEO coolcam and LSC plugs without power monitoring, easy discovery and adding all at once. There is small delay compared to switching through @robertklep Sonoff app, probably due to the route through MQTT client app. But it’s like 0.5s so no big deal. Would love to see the added support for dimming and color!
Small question: when using the route Tasmota > Tasmota MQTT app > Homey MQTT hub app > Homey MQTT client app > Home Assistant discovery. The device gets added as a switch, even though in Homey I’ve set it to being a light plugged in. Is this configurable somewhere?
@PascalB I am afraid not. Device type set on the device creation stage. In the Tasmota MQTT app, I set “switch” as device type if there is only one relay and “other” if there is more then one relay. The same behavior is used in Sonoff app by @robertklep .
OK, thanks for clarifying. Will stick to local MQTT control in HA then.
However, it is also different in Homey I have noticed. When adding a switch/plug through the Sonoff app, and configuring the advanced settings that a light is plugged in, it switches on/off when using the "switch all devices light on/off action card."When doing the same in your Tasmota app, it does get the light marking on the icon, but it does not switch on/off when using the same action card.
Can you replicate this issue? Or am I doing something wrong?
@PascalB, hmm haven’t tried it but I think I know what could be the reason. of this problem. I would try to fix it future version.
I have the same issue and when in use google assistent to put the lights off, hè said, sorry there is a problem with device name, try again later.
@Chatjozef @PascalB and other users, I found the root cause of the problem with switching on/off with “switch all devices” flow card and I know how to fix it. But I need your (and all other Homey users) advice, what, on your opinion, should be the behavior of multisocket devices like Sonoff 4ch or power strip in this case?
I see 3 possible solutions:
- Nothing, multisocket devices should ignore switch all devices on/off operation
- Apply operation only to first socket or relay
- Apply operation for all sockets. This approach looks like most logical but there is a price to pay. I would need to use custom capabilities instead of onoff (something like switch). It doesn’t matter if you will use it only in a homey application but if you will use something like MQTT Hub or Prometheus exporter to these values it will be clearly visible MQTT broker/Prometheus.
I think the last option is the best option.
Better to use direct MQTT for other purposes anyway like I said above
I looks like Tasmota MQTT devices don’t appear in Google Assistant?
They did when I used the Sonoff app.
May be I’m missing something, but why you cannot use Homey MQTT Hub app instead of your special application? I thought that if a device is connected to Homey it can be used with MQTT Hup app automatically…
@Robin_van_Kekem I haven’t noticed I am not using google assistant. I hope this fix that I planed will fix also Google assistant problem. If not will search for a solution.
@Marian not sure if I get your question right. This application not exporting devices to MQTT is kind of opposite it allows to add Tasmota devices through MQTT protocol to Homey.