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

Nothing built into the firmware for the bulb to my knowledge. They do a nice job transitioning from one color to another but I think the maximum period is about 30 seconds.

I don't think it would be too bad, maybe 4-6 transitions of 30 seconds each. A little crude but some rules for holiday lights could be a fun little project. I'd make it a rule though that used backlog so you could just turn the whole thing off and on.

1 Like

Doing a Halloween flicker was my original objective, but that's a bit harder unless it's controlled by Tasmota itself (due to WiFi signal delays), but you're right backlog with a few stacked commands might just work

You know, if you get something going it would be a fun add to the Tasmota Broadcaster app. A few sample lights templates would be all it would take to get people started.

If you are not familiar with Tasmota Broadcaster you can find out more here.

Thank you for the tips @logan3089 . I also needed to get the Tuya fan/dimmer combo switch working, so I did mostly the same thing, starting with Gary's excellent Sonoff driver here. I may package this up at some point, but for now, if anyone needs to get this Tasmota-flashed Tuya fan working, you can find my working code here:

(https://raw.githubusercontent.com/virantha/tasmota/main/drivers/tasmota_fan_light.groovy)

Just FYI, you can still order a Tasmota-flashable switch with the ESP8266 module with the Esmlfe version (as of mid-Oct 22):

I did simplify some of the things in Gary's driver code, and it works fine with Alexa (say "turn off NAME" for light on/off, and say "set NAME to medium" for fan control, except for dimmer level. You also use the "configure" button to upload the RULE3, and also install all the Tasmota settings for the Tuya hardware. All the user needs to do is flash the tasmota.bin firmware, and then get it on the wifi network. The driver will do all the baud rate and tuya settings. You can set it up in the dashboard as two devices, no problem too.

Thank you again, @garyjmilne, for figuring this Rule callback stuff out and publishing your work!

1 Like

@garyjmilne
I get these error messages fairly regularly in the logs. The devices seem to be working fine. Any idea what is causing this?

errororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_garyjmilne_Tasmota_Sync___Single_Relay_Switch_Plug_with_PM_2176.checkPresence() is applicable for argument types: () values: (method checkPresence)

My driver does not have a checkPresence() function. I suspect you have something left over from the Markus era where you had some rules or something trying to do a presence check. Have a look at the bottom of the device and see what it is 'In Use By'. That is your culprit.

1 Like

@garyjmilne Thanks for the tip :+1:

Yep, these devices migrated over from the Markus era. It looks like the old Tasmota App (not driver) created a cron job to check presence. The problem is I removed the app from Hubitat but the checkPresence handler is still on the devices. Any idea how to remove this handler without deleting and re-adding every device?

No, I really don’t. Support may have some tools but I also notice a bunch of left over data from the old Markus driver so I’d probably delete and recreate if it were me.

@bravenel any ideas how to get rid of these orphaned scheduled handlers? I have a bunch of tasmota devices and I'd prefer to not have to delete and recreate them all if there is some other way to clear this out

What driver?

Put unschedule() in the updated() method, and hit Save Device.

2 Likes

Hey guys, I've just tasmotized a device for the first time and it happened to be a Sonoff 4CHPro R3. I didn't solder (although I have everything required), just put the connector cables and bent them slightly into the holes.
I was looking for a driver and decided to try this one and I can confirm it works! However, I have no idea how to enable the interlocking or inching modes. The official page says that they are app controlled and available for separate gangs, so I will try to figure out something. Do any of you guys have ideas on that?

@garyjmilne After a bit of testing on the sonoff 4chpro r3, I can clarify that custom actions, rules work fine, but the toggle option doesn't. Only turn the relay on. Also I've paired it with the original 433MHz RF Remote and I have the following rules:


image

The problem is that as far as I can see, the tasmota sync doesn't work properly (at all). If I switch the device using my aqara button, the relay switches and the color of my led strip changes. If I use the RF remote, the switch changes, but hubitat has no idea and therefore the rgb doesn't change. If I manually refresh the device, it gets the new value and it works. If I set a polling interval of 1 minute, it also works every minute, but that obviously would defeat the purpose of not having polling. Also even I wanted this to be case, the polling interval is still huge and anything longer than 5 seconds would be too much for my purposes.

Question is - can I help you somehow figure out what is going on with the sync and why isn't it syncing? I see the web portal is showing the changes from the remote, so the tasmota has the updated status as far as I can tell.

I suspect you have not performed the rasmotaInjectRule.

Absolutely correct, thank you very much. I've configured it on the first one, but the main testing was done with the second one and I've forgot to do it there.

If you install the Tasmota Sync Broadcaster there is an example in there for Interlock as I use it for my Speinklers.

1 Like

@garyjmilne How can I create a simple 5 sec auto-off on a single relay device. When I use your driver and in Tasmota console enter: PulseTime1 5 it immediately turns-off from On. Also, the device in HE does not sync to the OFF, it only does when I hit refresh button.

What am I missing?

@garyjmilne I want to make sure I'm understanding that correctly. If we want to get notified of power changes without polling, we DO need to set the TelePeriod? But we can set the TelePeriod fairly short since it will NOT send a message if the value didn't change, Is that correct? I think I was previously mistaken that it would send when the change happened, but it sounds like that's not quite the case. If i understand the statement above, short TelePeriod should be ok since it won't send if nothing changed.

On my devices PulseTime is in increments of 1/10th of a second. You likely want pulsetime1 50.

1 Like

That is correct, although power changes (W,V,A) would also get reported when there is a change in power state as well.

The minimum for TelePeriod is 10 seconds. In most cases the values for W,V and A are likely to change with each reading unless the number of decimal places being reported is altered. Even at the minimum resolution of 0 decimal places the Wattage of an active device like a washer or dryer will fluctuate so I would expect to see a steady stream of values getting reported at the TelePeriod while the device is active. Even when the device is off and the Wattage is zero you can still get fluctuations in the supply voltage that would constitute a change so you have to be particular about your collection methodology.

Hi Gary,

I just proposed some changed on Github about creating child devices for these handlers. I only proposed them on the Quad handler as thats the one I use, but could easily be done on all other standard switch devices. Would be greaat to hear your thoughts!

Thanks