Page 1 of 1
Tighter integration with Tasmota
Posted: Tuesday 12 December 2017 18:31
by emontnemery
I'm using a number of Tasmota flashed devices together with Domoticz. This works pretty well, but there are a couple of missing things:
- No error detection due to the use of "dummy device" in Domoticz
This can (for example) be fixed by updating the existing Domoticz MQTT integration to also send actuator commands instead of just sending status updates or by a Tasmota plugin for Domoticz. Updating the existing Domoticz MQTT integration is pretty straight forward, and I have a very basic implementation working.
- Auto discovery, several manual steps are needed in both Domoticz and Tasmota when a new Tasmota device is added (create a dummy device of the right type, setup the Tasmota to listen to that idx, etc)
For this a Tasmota plugin understanding the Tasmota MQTT commands would be necassry
So, I was thinking about either extend the existing Domoticz MQTT integration to also send actuator commands, or implement a Tasmota HW plugin.
It would be great to get some suggestions here from others who use Tasmota together with Domoticz as well as Domoticz developers before starting the work.
Re: Tighter integration with Tasmota
Posted: Thursday 21 December 2017 20:06
by emontnemery
Some progress has been made:
- Basic MQTT support has been added to the Python plugin framework, but it's not quite ready for submitting yet, discussion ongoing with Dnpwwo about how to fit MQTT nicely into the plugin framework
- A prototype Domoticz plugin which does
- Basic auto discovery of Tasmota-flashed devices
- Domoticz state synced with the state of the remote device
Re: Tighter integration with Tasmota
Posted: Monday 15 January 2018 3:29
by 0n370uch
Hi, one step forward:
https://github.com/arendst/Sonoff-Tasmota/pull/1604
One problem: Domoticz send a battery 255 and rssi 12 with a dummy switch on/off command. Is there a solution to remove these parameters?
Greetings Fabi
Re: Tighter integration with Tasmota
Posted: Friday 19 January 2018 21:27
by emontnemery
In my view, the problem is really that dummy switches + built-in MQTT support is not a complete solution for controlling remote HW.
- The only command sent out by Domoticz is basically a status update command.
- It's not possible to send a command to Domoticz to inform about a status update.
I did actually implement a simple Tasmota plugin for Domoticz which is using the newly available MQTT support in the plugin framework.
Would you be interested in giving it a try?
Re: Tighter integration with Tasmota
Posted: Friday 19 January 2018 21:33
by 0n370uch
Hi, yeah sounds very interesting.
Greetings Fabi
Re: Tighter integration with Tasmota
Posted: Sunday 21 January 2018 13:30
by emontnemery
OK, I pushed my current working version here:
https://github.com/emontnemery/domoticz_mqtt_discovery
This is work in progress, please let me know if it's working or not.
Features:
- Switch and dimmer devices will be automatically found and added to Domoticz database
- State in Domoticz in synchronized with device state unlike with "Dummy hardware"
- Vcc reported by Tasmota in stat/TELE is stored in "BatteryLevel", but I don't think it's very useful.. Maybe would be better to store as text such that it shows in Data column?
- RSSI reported by Tasmota in stat/TELE is stored in "SignalLevel", but does not show up in WebUI. I've not debugged this.
Prerequisites:
- Domoticz must be from Jan19 or newer (must include PR #2071)
- Sonoff devices must be flashed with 5.11.1c or newer (must include support for home-assistant style MQTT discovery)
- Sonoff devices must have option 19 set to 1 (setoption19 1)
- Sonoff devices must be connected to MQTT server, and must have individual topics (by default all devices topic will be set to sonoff, this will not work)
- Sonoff fulltopic should be reasonable, for example "tasmota/%topic%/%prefix%/"
Instructions:
Re: Tighter integration with Tasmota
Posted: Monday 22 January 2018 14:36
by 0n370uch
Oh wow... nice work. I will test it this week

. First I wanna clone my sd card to easly go back if something runs wrong ...
Greetings Fabi
Re: Tighter integration with Tasmota
Posted: Thursday 25 January 2018 16:24
by 0n370uch
Short update: I upgraded my devices to version 5.11.1e today. So the test with your Sonoff integration start soon.

Re: Tighter integration with Tasmota
Posted: Sunday 31 March 2019 18:43
by diogoc
Autodiscovery with tasmota on RGBW devices is not working.
Domoticz detects only the rgb colors.
There are plans to fix that?
Re: Tighter integration with Tasmota
Posted: Tuesday 23 June 2020 15:03
by chiefmaster81
Hi, better tasmota integration would be great. Not sure if this is the correct topic, but I'll try it here...
I am managing tasmota switches via domoticz dummies with http requests and this works great except that the current status of the switch is never sure as it is not monitored continuesly. a simple script could change that...
I am not good at programming, but in bash something like this works:
pi@smarthome:~ $ ./status.sh BULB.fritz.box
{"Hostname":"BULB"} : {"POWER":"OFF"}
pi@smarthome:~ $ cat status.sh
DEVICEIP=$1
STATUS=$(curl http://$DEVICEIP/cm?cmnd=Power 2>/dev/null )
DEVICE=$(curl http://$DEVICEIP/cm?cmnd=Hostname 2>/dev/null )
echo "$DEVICE : $STATUS"
Can't be that difficult to integrate thin into existing dummy as http poll ? Perhaps only the device power state...
Meanings ?