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

I created a new device using V1.3.1. Clicked on Children create. I think that fixed my issue. All the plugs are now listed under Gym Power Bar. I am happy with the fix. One small thing you could consider is the friendly name of the switch from Tasmota is not pulled by your code. I can manually replace the device label. Another minor change you could add is instead of Dual, Quad, and Eight relay versions groovy, the user can just set the number of plugs before clicking the "Children create" button you might be able to create the child plugs as per the user configuration with just one version of groovy for compound switches. RuleMachine can now see all the plugs as well. Please let me know if you have another code for me to test. Please note if you click on the "Children create" button again you will get the below error.

"Didn't create child devices for some reason: java.lang.IllegalArgumentException: A device with the same device network ID exists, Please use a different DNI"



1 Like

image

No. This is the Single Relay/Switch/Plug with PM driver

image

Click on the childrenDelete button to create the variable and set it correctly. Won't hurt anything.

That is a trapped error and expected.

Good suggestions. Working on a project right now but I'll take a closer look when I come back to this.

2 Likes

There is no childrenDelete button on my Single Relay/Switch/Plug driver page

1 Like

Change it to a dual, click the button and change it back. I think that should do it. It's not an issue for a new install just those pre-existing installs.

P.S. The error won't do any hard but I agree it's undesireable.

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.