[Release] Tasmota Sonoff Hubitat Driver & Device Support

Which device driver did you use? can you provide a link to it? Is it one from a different thread? Then it won't work with the custom firmware. You can only use the custom firmware with the custom drivers listed or one that follows the same principals.


both are from under his GitHub.

"Hubitat/Drivers/sonoff-4ch-wifi-switch.src at master · erocm123/Hubitat · GitHub"

"Hubitat/Drivers/switch-child-device.src at master · erocm123/Hubitat · GitHub"

I don't believe those are drivers for the Tasmota firmware as they are not labeled as such. As you can see, other drivers are listed that way. This one i believe is supported by the firmware posted in @ericm's other post labeled "Sonoff Connect"

Ill go check it and try them now.

Looks like there is no driver/child driver for the 4ch pro r2 yet. Bummer.
I am trying to get this up and running to automate my chicken coop (run door via an actuator, lights, heat lamp)
Maybe someone here may be able to port them? :slight_smile:

Port from??? The problem with these devices is that the driver has to create child devices. That's a bit out of my skillset.

From his older Smartthings driver set for them?
I am assuming they are at least similar.

Nope. One uses his custom firmware and one uses Tasmota which is a totally different command set and method for responding to commands.

Did you try the firmware & driver combo from my Sonoff Connect thread? I use the Sonoff 4CH Pro with that code in Hubitat without any problems.

Which one, the old thread or the new one?
I’ll try it today.

It's possible he is having the same problem as me with the R2 releases, your firmware for the Dual loads and provides a webpage but won't control the relays.

I meant the old thread, but you might want to just try the firmware in this thread with the 4-ch drive I just posted.

@peter Here is the 2-ch driver for the firmware posted in this thread:

Make sure you install the child device driver too:

1 Like

thank you! The old forum firmware worked as you said, but I'll give this one a shot too. It's nicer to be on Tasmota If possible.

With those drivers, the listed firmware, and the Sonoff Connect, I am getting...

An error occured com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'Sonoff 4CH Wifi Switch' in namespace 'erocm123' not found

This is just after hitting NEXT on the found device while adding it.

The name your new 4ch driver is for is " [Sonoff 4Ch - Tasmota]"
Does that matter?

I'm getting the same but it mentions the Dual:

An error occured com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'Sonoff Dual Wifi Switch' in namespace 'erocm123' not found

I have found the problem change the handler name in the connect app code starts at line 347 so for the 4 Channel switch you would change line 355 from deviceHandlerName = "Sonoff 4CH Wifi Switch" to deviceHandlerName = "Sonoff 4Ch - Tasmota"

def deviceHandlerName
if (selectedDevice?.value?.name?.startsWith("Sonoff TH"))
deviceHandlerName = "Sonoff TH Wifi Switch"
else if (selectedDevice?.value?.name?.startsWith("Sonoff POW"))
deviceHandlerName = "Sonoff POW Wifi Switch"
else if (selectedDevice?.value?.name?.startsWith("Sonoff Dual"))
deviceHandlerName = "Sonoff 2Ch - Tasmota"
else if (selectedDevice?.value?.name?.startsWith("Sonoff 4CH"))
deviceHandlerName = "Sonoff 4CH Wifi Switch"
deviceHandlerName = "Sonoff Wifi Switch"

1 Like

I just did the same thing :slight_smile:

Noob question, but has anyone got the Sonoff Basic R3 working with all of this? I have some coming in. I have not used any of the Sonoff products before so this will be my first attempt :slight_smile:

Works a treat now!! Thanks

1 Like

I tried it both ways actually. Changed the Driver to match the master App and changed the master app to match the driver.

Either way, It is adding it and has a generic ON/OFF for the entire switch, but it is not adding the child driver for each toggle.

Did it add the child drivers for yours Peter ?