[RELEASE] Sonoff, Sonoff TH, S20, Dual, 4CH, POW, & Touch Device Handler & SmartApp ($5 & $10 Smart Switches)

Hi, newbie here :pleading_face: I was going to flash the following dimmer switches to Tasmota…

https://blakadder.github.io/templates/ce_smart_home-WF500D.html

by using

Before I try this, is there an equivalent Sonoff custom device handler which I can use for these dimmer switches? I was able to find a custom Sonoff device handler for flashing my tuya smart switches over to Tasmota but I can’t find anything for a dimmer. Can I use this one?

https://raw.githubusercontent.com/erocm123/SmartThingsPublic/master/devicetypes/erocm123/sonoff-ifan02-wifi-controller.src/sonoff-ifan02-wifi-controller.groovy

I searched quite a bit but I haven’t found anything concrete that shows me how. I’m afraid if I actually succeed, I would not be able to control them with my SmartThings v3 hub.

Thanks so much.

You can try this one for Tasmota. I haven’t tested it so if there are any errors then PM them to me. With just the standard Tasmota firmware you won’t get status updates if you adjusted the device outside of SmartThings . . . Just FYI.

thanks erocm1231, that’s amazing !

I’ll let you know… probably will install it this weekend. thanks again !!!

@erocm1231 - I have been trying to follow the content and hoping you can help me with a TH16. I have Sonoff-Tasmota 6.7.1 by Theo Arends installed; your device handler and Connect automation.

I am not seeing where I can configure for the SmartThings hub; I only have Belkin WeMo and Hue Bridge. When I installed your .bin file I could connect through the SmartThings Classic App, and control the device but the temperature and humidity sensor wouldn’t work; I have the SI7021 which is now being sold in the bundle on Amazon. I reflashed back to the Tasmota and wanted to come ask for help.

Can you point me to the .bin file for the TH16 to use along with your device handler & SmartApp? Maybe it is that the device needs to be incorporated?

Thank you for creating this. This thread has gotten overwhelming but very helpful.

Wonder if you guys can help me . I flash my TH16 and can connect to it via my network and the ip address. When i try to connect to it via the smartthings sonoff connect app, it finds it and I can select it but than the ip address disappears and smartthings says Error - Bad State. Unable to complete page configuration. Please help. My router is a Samsung Mesh network smartthings router if that helps. Thank you

I had issues at one point. With the device powered up if you hold the button down for 40 seconds it completely wipes the chip and memory and you can start over. I wonder if you tried it again if it would work.

Make sure you have the correct TH16 device handler installed. Watch the logs while you hit the save button so you can see what the exact error message is.

Thank you. I’ll double check the handler but I’m sure it was the correct one (got it from this post: 2016_10_14 Update : I have been playing with the Sonoff TH (16 Amp Version) and am finished with a SmartThings capable firmware for it. Here is the device handler .

Also, not sure where to look at the log. I’m a bit of a newbie with this next level of integration. Thanks again.

I’ve figured out the monitoring the logging. Thanks

This is the error b02352ac-0ee4-4028-8450-12622575a136 11:59:52 PM: error physicalgraph.app.exception.UnknownDeviceTypeException: Device type ‘Sonoff TH Wifi Switch’ in namespace ‘erocm123’ not found. @line 381 (doCall)

I am trying to hook up the 2CH Sonoff board. I’ve flashed it with Tasmota but I can’t get it to work with Sonoff Connect. I’d thought that I might be able to config as per 4CH but it doesn’t let me add it - white screen.

I have installed Eric’s Tasmota fork on a Sonoff Mini by soldering wires and flashing. I followed an earlier post and was able to install Eric’s S20 Tasmota device handler and connect smartapp leaving the tasmota config as a S2X module for discovery. After discovery I applied the Sonoff Mini Template . Everything shows up in Smartthings but the control and update reporting are incorrect. In the Classic app the status is almost always “on”. When I select to turn off, the light goes off but the status changes to “turning off” but never gets to “Off”. It then goes back to “On” but the light remains off. I can still toggle the lights on and off but I have to double press to turn on.
I would use Eric’s non-tasmota firmware and device handlers but I need to configure the device for S1 & S2 and Tasmota is the only way I see forward. I’m not sure where to go next.

Does anyone have any suggestions?

Also this has tasmota fork doesn’t work at all in the new app vs classic

Check that the device settings in the IDE shows the mac address of the device in the Data field.
I’ve also had success by setting the Device Network Id as the mac address (lower case no colons)

If you use the sonoff connect app it populates this automatically. If your still having trouble, select the override IP option and set it manually.

Have you also turned on the smartthings setting on the tasmota configuration, then set the hub ip and port (39500)?

I’ve been having some odd behaviour with actiontiles not showing the correct on/off state for devices running the tasmota fork.

It seems that the Power state is reported in block capitals [ON/OFF] whilst smartthings expects them to be in lower case [on/off]

I’ve been advised by the actiontiles developers to try changing this and see if the issue resolves. Is this something that can be changed in the device handler, or is it a function of the tasmota firmware?

If anyone can think of a workaround?

I managed to solve this by changing the ‘StateText’ output on each of the Tasmota devices to lowercase by issuing a backlog command to them all (With MQTT enabled).

The command for anyone having the same problem can be pasted into the console:

Backlog StateText1 off; StateText2 on

I now have my custom icons working as desired.

1 Like

That is a great solution. It can also be converted in the device handler, but I haven’t had the time! In the parse section the results just need to be converted to lowercase.

createEvent(name: “switch”, value: result.POWER.toLowerCase())

1 Like

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.