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

Could add a simple line to initialize function, that checks for the useChildDevices flag and if it isnt set, then it creates it? Agreed its probably annoying, even if totally harmless!

I guess I didnt consider single device changes (though in my defence I didnt submit the changes to the single switch device so never tested it! Only did dual/quad/eight, but thats annoying to maintain!)

1 Like

The setting of the flag happens in the childrenCreate (true) and childrenRemove (false).
Then it is tested in updateChild as shown.

I'm not checking for a null (setting does not exist), perhaps that is it. I'll experiment and figure it out. If it is the null that it causing it I'll add it to the initialize per your suggestion.

I just updated to the v.1.3.1 driver and experiencing some issues with my Tasmota-flashed Sonoff S31 plugs. I have several of them and before the driver update, all four were functioning as I would expect. After the driver update however, two power statuses show up in Hubitat, Power and Power1. When I use the hubitat interface to turn the switch on or off, the devices turn on and off properly, but the Power status remains in one state. Hubitat sees Power1 is updated to reflect the status, but Power status never seems to change. As a result I don't see an accurate status of the device in Homebridge or HomeKit. If I use the web interface on the Tasmota device to turn it on or off, the Power status as well as the Power1 status seem to be in sync and work just fine.

I'm a total newbie when it comes to Tasmota, so I apologize if I've missed something obvious. I've re-run the Tasmota Inject command, and followed the instructions. Is there something obvious I'm missing? I've checked the Tasmota documentation here to see if there were any options I could set on the S31 itself and noted SetOption26 to use indexes when only one relay is present (which it is in my case). But it is set to 0, which was the default.

Any help would be greatly appreciated.

1 Like

Just bumping this in hopes that someone has an older version of the driver. I checked Gary's github, but can't seem to find a single relay version around revision 1.2.5. Does anyone happen to have a copy?

I suspect something has broken.

I had a fairly messy power-management piston, which recently failed to run the way I'd came to expect.

I did a stack of trouble-shooting, and I ended up writing a teeny piston to confirm my suspicions.

image

Effectively, it's now failing to

  1. detect when this changes
    and
  2. manage to alter the switch from on, off, or toggle.

I believe the update to this had broken it.

image

Even this fails to actually do anything:

image

.
.
.
.
.
.
..
edit...it's obviously down to this switch1 / switch change.

The 'switch' no longer has any purpose on my device, it seems to be now the 'switch1'.

Unfortunately, switch1 isn't available to webcore, which has now wrecked my power management routines. =(

  • Does anyone have the older code please? It was fine until last week, I think =(
1 Like

Yes, something is definitely broken.
I had lost ability to turn on & off my Tasmota plug.
I remembered that @FriedCheese2006 edited the driver for some energy readings.
I have updated to the single plug driver and I can confirm that that plug is working properly again, I can turn it on and off again :smile:

I seem to require the older version of the single relay with pm, unfortunately.

Hmm, not sure about all the different drivers but I thought this was the single relay with PM that I am also using; this is version 1.2.4 and latest version is 1.3.1?

Tasmota Sync N Port Relay\Switch\Plug Driver with PM v1.2.4

This text will be hidden

Summary

1 Like

You can look at the driver history in GitHub and pull an older version.

https://raw.githubusercontent.com/GaryMilne/Hubitat-Tasmota/d7704a86f86cc3446b99cdbb9801ea602da8f925/Single_Relay_Switch_Plug.groovy

@garyjmilne it looks like the code is treating a single plug as a child device even though it's not creating one.

1 Like

You can get older versions off gitHub by clicking on "History"

1 Like

ah, this does the trick. ta

1 Like

Thanks, I did look through the history on github, but there were changes around that time by other contributors so I wasn't sure which was the recommended one. I'll try 1.2.4 and see how it works.

So for the delay, I should be able to get to this in a day or two at most. In the meantime you can find the old non-child version of the single relay driver here.
https://raw.githubusercontent.com/GaryMilne/Hubitat-Tasmota/main/Single_Relay_Switch_Plug_PM_1.2.5.groovy

Sorry for any inconvenience.

2 Likes

I have a 2-way light switch. I use "https://raw.githubusercontent.com/GaryMilne/Hubitat-Tasmota/main/Dual_Relay_Switch_Plug.groovy" device code. When the device is turned on/off physically the status doesn't change on the tasmota device in habitat hub until I manually press the refresh button (see screen shot) to get the change. This issue is affecting the webcore trigger I wrote to update the virtual switch to control my weird tasmota 2-way switch. Am I doing it right? Is there an easier way? If so, then can you share how I can turn my 3-way switch on or off? I know you are busy. I'll wait for your reply.

Have you tried just waiting to see if the change is reflected after 30 secs-1minute?

It's not instant.

I am having an issue, I turn a light switch on via the dashboard, light turns on turn off via the dashboard, light turns off but the "button" gets stuck on sending. Then if I go into the device the switch still says "on" but the light is off.

It seems to be all the single switches. I have removed and added device back in Hubitat, flashed a newer version of Tasmota

Device2

Device3

So if you see above the switch says it is on and switch1 says it is off, no matter what I click on or off the one called "switch always stays on which must be the one the dashboard reads

1 Like

I think it didn't change. But I will confirm later today. 30sec- 1 min seem bit too much. So it is not Realtime for 2-way switch. My home assistant integration takes only 2-3 sec.

I have just uploaded version 1.3.3 and it is available via HPM. As far as I know it cleans up all of the known issues. A couple of notes.

In Tasmota switches are defined as Switch 1 - 8 in multi-relay devices. In Hubitat the first switch is "switch" and it is at the programmers discretion what subsequent switches are named, but most commonly the sequence goes switch, switch1, switch2 etc. or switch, switch2, switch3 etc.

To be consistent I have linked the attributes "switch" and "switch1". These should always be in the same state and you can elect to use either one in your rules. Use whatever makes the most logical sense to you. Likewise "On" (at default behavior) and "Power1 On" have the same outcome as does the equivalent off operation.

I have left a "test()" function enabled and you will see it is a command button. This toggles the state of the useChildDevices boolean. The only time you would need it is if you upgrade an existing single relay device in which case the useChildDevices value would be null. This command will be removed on the next release.

In a newly installed device this is set at install. In an existing multi-relay device this value is toggled be the create\delete child devices.

Sorry for the issues you have had. Hopefully this will put them to bed and that driver dev can go back to sleep.

7 Likes

Tested. Perfect, thank you.

1 Like

working my side as well, many thanks

1 Like