[RELEASE] Tasmota Sync Drivers - Native and Real-time Synchronization between Hubitat and Tasmota 11

TL;DR
I have developed a set of Tasmota Drivers that perform native and real-time synchronization between Hubitat and Tasmota (11 or later) without the need for any custom Tasmota compilation or HTTP hooks. It achieves this using Tasmota' built in triggers and rules to monitor changes and send them in JSON format to Hubitat when they are detected. Changes made on Tasmota show up on Hubitat in 1-2 seconds. New!! Tasmota Sync drivers can be found on Hubitat Package Manager using the keyword "Tasmota" or with the "Tasmota" tag.

**Important
If you have any difficulties please be sure to upgrade you Tasmota Sync Drivers to the latest version using HPM. Once upgraded do a "Save Preferences" on each device and then "tasmotaInjectRule". This will ensure everything is in the proper state. Any difficulties after that then please let me know.

There are 11 unique drivers on github: GitHub - GaryMilne/Hubitat-Tasmota: Respository for Hubitat Tasmota Drivers

  1. Color Bulb (RGBCCT)
  2. Switch with Dimmer
  3. Switch with Fan
  4. Switch with Sensor
  5. Sensor
  6. Single Relay\Switch\Plug with optional power monitoring.
  7. Dual Relay\Switch\Plug with optional power monitoring.
  8. Triple Relay\Switch\Plug (No power monitoring).
  9. Quad Relay\Switch\Plug (No power monitoring).
  10. Eight Relay\Switch (No power monitoring).
  11. Universal Multi Sensor - Beta. Learn more here.

These are all now available on Hubitat Package Manager under the categories "Lights & Switches", "Temperature & Humidity", "Misc. Devices", "Energy Monitoring". If they are not visible then make sure you update HPM first. Trying to get a Tasmota Tag added.

You can find documentation on driver installation and setup here on github. Additionally for those that need help upgrading Tasmota from 8.X to Tasmota 11.X you will find a guide here with pictures.

The bulb driver may be of particular interest includes the ability to save and load preset colors and CT's, which is callable from rules. It also supports Tasmota Fade and Dimmer functions.

I've also done some innovative (as far as I know) stuff with logging in these drivers. The Tasmota Sync driver log entries really pop making it easier to read. Also notice the TasmotaSync requests incoming from a PM and sensor device.

I'm looking for some Tasmota\Hubitat owners interested in trying them out and providing some feedback. All of these drivers are based on a common core and have been running very well in my house.

More Background for those with an appetite for reading
When I first came to Hubitat I quickly found Markus' Tasmota Driver suite. I was very impressed and adopted it quickly. I even wrote the documentation for it. Fast forward 18 months and things have changed. Markus is banned from the Hubitat platform and is no longer maintaining the the code. Over the intervening period I also found several other things about Markus' version to be limiting.

  1. To use Markus' version you had to use a special compilation of Tasmota that introduced some Hubitat hooks for synchronization.
    Tasmota Sync drivers retain the synchronization between Tasmota and Hubitat by using Tasmota rules to send sync requests whenever a change is detected on Tasmota. This requires version 11 or greater of Tasmota. Polling is also supported for earlier Tasmota versions.

  2. Markus used a Parent\Child App\Driver architecture. Meaning that a simple Tasmota device like a Bulb or a Switch had two driver entries. I found this unwieldy and cumbersome.
    Tasmota Sync drivers are just that, drivers only. Each Tasmota device (IP address) will only have one entry in the driver table making it a little cleaner in that respect.

  3. Markus' implementation was quite chatty and would sync on changes and at each TelePeriod (usually every 5 minutes).
    Tasmota Sync drivers only report on changes at the Tasmota device with the exception of PM & Sensor devices which report at the TelePeriod, but ONLY if there has been a change.

I also found that Markus' drivers were not always complete such as setting colorTemperature on a bulb. Markus' code was also very dense making changes difficult when combined with the App\Parent\Child architecture.

I had previously written much of this code for the Smartthings Classic environment and carried forward some useful elements such as saving and recalling favorite color and CT values and full support for Tasmota Fade. I hope some of you will enjoy using these drivers.

12 Likes

I will help.

I don't have any tasmota bulbs, I use tasmota2zigbee (hue emulation) for the few zigbee bulbs I have.

I use tasmota v11 (via node red) in the following devices, environment sensor, (temp/humid/pressure/lux), single and dual power monitoring plugs, simple switch/relay, and a 4 channel button device.

I did use Marcus' driver but moved my tasmota devices to node red for the reasons you listed.

One thing i would like to see is the ability of the driver to only log events when the values change by a user configurable amount.

Count me in mate, I'd love to help out where I can...

Capture

Sorry about the messy white outs but I.m ready for sleep.

I can test the many Zigbee Switches if that helps as well?

They are not Tasmota but are Sonoff if this helps?

Kind Regards

chillibenny

We don't have a great deal of overlap in devices at the moment but I did just publish my Plug driver which supports simple or PM plugs if you wanted to try it out. You'll find it here GitHub - GaryMilne/Hubitat-Tasmota: Respository for Hubitat Tasmota Drivers along with some instructions.

1 Like

See my response to kuzenkohome regarding device overlap. I also just published my fan driver if you wanted to try that out. I run all my drivers at home so I'm pretty confident of their operation.
I've ordered an LED Light Strip controller so I'm sure I'll add a driver for that in due course.
I don't have a Sonoff 4 channel and that is a device where a 1 - 4 parent\child ratio does make decent sense.

1 Like

Hi Gary,
Only a suggestion, if you have time?

Could you help other Hubitat owners currently using Markas's Tasmota Drivers, who wish to update from Tasmota v8.5.1 or less, a brief 'Howto' when upgrading to Tasmota v11 as this may be the handbrake that slows down or completely stops the will (IMHO) to move forward?

Love the time & work you've spent to help those using the Markas drivers move forward instead of remaining shelved at the level they got to!

1 Like

@garyjmilne I heartily second this! TIA for any help with this.

If everything works out fine, please consider putting everything in the Hubitat Package Manager. :smiley:

Also, if it's not too much to ask, if you got time, could you put in some sensors? PPM, CO2, weight sensors... I know, give them the little finger... :sweat_smile:

1 Like

I will put the drivers in HPM once it has been more broadly tested. Also, I will be adding almost all of Hubitat sensor capabilities. I won't be able to test many of them as I don't that particular sensor type but it's pretty straightforward and not too much room for error. I'll update this post when those updates have been made.

2 Likes

Getting Tasmota on most devices is the hardest part in most cases but if it would be helpful to have a simple guide for upgrading from Tasmota 8.X to Tasmota 11.X I will do that, should not take long.

4 Likes

Thanks @garyjmilne, the simple upgrade steps would be very helpful (I am assuming that those that have Tasmota devices already know how to flash their devices either by OTA or ESP). Just wanted to know if there were any potential complications or things to watch out for in the upgrade process of changing from Markus’ version of Tasmota and 11.x. Great work! Thanks!

2 Likes

@garyjmilne,
Another quick question. Like many others (I suspect), despite all the obvious advantages and reasons for doing so, I have dreaded making the conversion away from Markus’ drivers as my Tasmota devices are involved with several automation rules and routines (much laziness on my part, lol) which are working rock solid as they have been tweaked and massaged over the last couple of years. However, I realize I should bite the bullet and your drivers have motivated me to do so, although it would be nice to do this gradually if possible.

Is it possible to simultaneously run your driver on some devices while simultaneously using Markus’ drivers on some OTHER devices (using the OLL Tasmota Device Manager App for any devices still on Markus’ driver)? This way, I can gradually convert to your Tasmota Sync Drivers without having to convert every device (and their automations) all at one time. In other words, is this an All-or-Nothing type of conversion?

Thanks for the great work!

Thank you, for your work on that. If you could find a way, to add weight sensors in some way (maybe in combination with a switch or something like that), that would be just awesome. Only, if it's not too much of a hassle. :sweat_smile:
I would love to use the ones I already got as some kind of presence sensors for my bed. :smiley:

That is a good question. It is actually very easy to try things in parallel without making any irreversible changes to a device or the rules that depend on it.

  1. Edit the address of an existing device that you want to test with. For Markus' drivers this will be part of the parent driver. I usually just append an FF to the end and save it. The device address for IP devices is the HEX equivalent of the IP address.
    Before


    After

  2. Now you can install the device using the Tasmota Sync drivers using that same IP address. Test that everything works and you are happy with it. If you are not happy with it just delete the newly created device and edit the device address on the original driver to restore it to its prior operating status. To move forward and fully migrate the device go to step 3.

  3. Now go to back to the original device driver child device. At the bottom you will find all the places that the child device is in use.

What I did was click on these one at a time, substitute the newly added driver for the old one. Repeat until the "In Use By:" is empty. You should check to see if the Parent Device had any "In use by:" just to be safe. At this point you can delete the original device or just leave it around for a while.

In summary it is not an all or nothing switch. You can do a single device at a time and have some devices on Markus' drivers (or anyone else's) and some on the Tasmota Sync drivers for as long as you wish. You just can't have two devices with the same IP address active at the same time.

I hope that is clear.

1 Like

@garyjmilne, fantastic advice and thanks for taking the time to fully explain and for all your work on the driver. Am looking forward to it being added to HPM as well! Thank you.

You will find upgrade instructions here. Hubitat-Tasmota/How to Upgrade from Tasmota from 8.X to 11.X.pdf at main · GaryMilne/Hubitat-Tasmota · GitHub

Might take you 20 minutes to do the first device because you are reading as you go. After that it will take you about 10 minutes per device but you can do multiple devices in parallel.

2 Likes

It's on my todo list to add a broad range of sensor inputs. Should not be too hard. Presence sensor for a bed, tricky one but if you point me to the Tasmota device I'm sure I can do something. :grinning:

1 Like

See my response to the OP for a link to these instructions. Also a link to them in the very first post.

1 Like

Awesome! :smiley:

Sure thing, it's the HX711 Load Cell Sensor. It's listed here: Supported Peripherals - Tasmota

Uh, maybe also the RCWL-0516 Microwave Radar Presence sensor... :innocent:

Download the Hubitat app