[Release] Tasmota Sonoff Hubitat Driver & Device Support

I've tried the drive posted in the post above, but wasn't able to get it working as I though I could. I've gone back to the S20 driver to see if I could somehow get it working. I've pretty much got the same result as before, so no luck there. But I did note that on the device screen, that the state variables don't look right, namely the ipAddress=null. So I suspect somewhere in the setup process, ti did not configure the address correctly.

State Variables

  • settings : {vreport=60, password=null, logLevel=0, port=80, pos=0, ipAddress=null, wreport=60, override=null, autooff1=0, ureport=300, areport=60}
  • mac : C44F3389A84C
  • dni : C44F3389A84C

I tried setting the IP address in Preferences, but that doesn't seem to make a difference.

Don't let state variables get you messed up. If two drivers are using different variables, when you swap between them the old ones will remain. There's no way for a driver to know what variables a different version of the driver used so there's no way for them to be cleaned up. Only way to clean those is to load a driver that cleans them in between or start with a new virtual device.

I saw the problem with the S20 driver. There was problem with how the credentials were encoded if you used a password to control the Tasmota. The strange thing is that it looks like you don't have a password enabled, so it shouldn't have ever been calling that method. That is why it didn't effect me. Oh well, give the new one a shot.

You lost me on the password. Is this the password for the web UI to the device, or something else? I have set a password for accessing the web ui, so unsure why that would be it. Is there another password that can be set for the device itself, and how would that be enabled?

I've played with the preferences of the device to set password, but unclear if that is where I need to start.

If you set a password for the webui on the Tasmota, you need to put the password in the hubitat preferences for the device. You also need to get the latest driver from github.

So apparently the tasmota RPC code that you shared is causing issues on my hub. I have 6 of these devices and I guess they are killing the Lan Service. Do you had any updates or should I try one of the other drivers for generic single switch?

Thank you for the update. I looked at your hub's error log and the errors before your reboot yesterday morning came from the Lan Service. Looks like your hub got disconnected and then a custom code was trying throwing this error: Unknown HubAction: 8408

Nope... Haven't had that problem on my hub. Haven't seen any errors. That's the only info you have? Was this driver the only custom code that you have? The thing is, unless you are issuing a command to the device, the driver just sits there waiting for the Sonoff. It doesn't have to poll it because the Sonoff should report in on port 39501 when it changes, that's what the driver is keyed to. So, unless you were sending a command at the same time you were rebooting your hub, I can't see what in this driver would be causing that. But if support can be more helpful or you find out any more info , please let me know.

You're right.. too quick to point blame. Apologies; assumed that because I started having issues once I added more switches. I'm going through everything and turning on debug to try and narrow down. It's either this (which I doubt now), HubDuino Ethernet, or TP Link as those are the only ones doing HubAction calls.

Updated drivers for TP Link and HubDuino. Also lowered RSSI reporting for Hubduino and reduced the cloud refresh rate to once every 30 minutes (thought about disabling it but, we'll see if this helps). Worst case, I get my spare Hubitat out and move Lan devices to it...

1 Like

@jchurch Moving this over to the Tasmota thread. I've updated the driver for a fix on the button parsing. After updating make sure to go into the device and hit "Save Preferences".

Like I've mentioned, the Bridge could use a lot of work since it is an extremely capable device. My thought was to have the option to create different child devices in the preferences (motion, contact, smoke alarm, etc.). Right now it is only supporting button events.

I don't have time to dedicate to it so it would be nice if someone else could work on it.

1 Like

Thank you mate. I will "test" it out after work and let you know how I get on. I really do appreciate your work.

I wish I was a developer that was capable of doing that otherwise I would most definitely take that on but that would be outside my current skill set. I hope someone with the right skills will give it a shot though because it's a pretty powerful tiny device.

Is any one here having issues on the dashboard with the Sonoff Smart Switch? Mine show the status "on" or "off" (although the symbol "?") properly, I can command thru dashboard to turn it "off", but not turn it "on"...
If I uses the Device List, it can be commanded in both state on/off

Confirmed the button's are now working @ericm.

Anyways fingers and toes crossed that someone intends to work on this in the future as it would make an excellent bridge for really cheap yet reliable motion and contact sensors.

Yeah, I agree. I have tested it with some 433Mhz motion and contact sensors. Of course, the current code is sending button events, but it does work. The main problem I have seen is that the contact sensor / motion sensor that I have only send "open / active" reports. They do not report when the contact closes or motion stops. The driver can have a "timeout" put into it to simulate the "close / inactive" report, but I prefer the other way. Seems like a lot of the 433Mhz sensors work this way.

1 Like

All today's morning i was flashing sonoff s31 and have 2 issues.....:
1 new your tasmota firmware not installing.. All the time errors.. But that's fine for me... I had old one downloaded a few months ago...
2 i don't see power meter info any more in s31 driver... Se attachment



Have you made sure to fill out the Hubitat settings on device itself. You will need to make sure your hub ip address and port are there and correct.

spent all morning...checked everything

The Device network Id should be the MAC address without any port number. So, in your case the DNI should be:

68C63ACD8278

I'm not sure how it ended up in the other state. Did you use the connect app to add it?

Added manually through connect app.. Bc was waiting 15min. And connect app automatic didn't find...Did you find out why your new tasmota firmware doesn't work?

spent whole day long and nothing, installed couple times pow firmware from sonoff connect ... then original 6.6 tasmota... and endless...
but not showing 000000 in driver good step... but does not showing correct power and voltage meters just zeros

What errors are you getting with the new firmware? I haven't had any problems with it.

Also, did you change the DNI like I suggested?

Every time says failed...
Yes.. At first i changed like you said but it didn't help...
Then i removed everything and installed pow firmware after that sonoff connect app found automatically....... And then i just played With installing back and forth, Other firmware alternatives such us tasmota different versions etc... But no luck