Sonoff Smart WiFi switch integration

Firstly, I have to say this should not be tucked away at the bottom of a thread but should have its own!! (Tried all the other methods before spotting this) Love the fact there is no parent/child handlers and no app to update status! I have successfully added a couple of sonoff touch units, and they work great so far. I have a few two channel switches and can see in the preference for the device I have to change a setting to “True” for a two relay device but can’t work out how I actually create the second channel? probably being stupid but could you advise please?

Thanks in advance

Hi,

I’m glad you like my handler, I’m not an expert at groovy but wanted something simple, which is what this is. For the 2R device, I realised that without creating a chikd you need 2 devices with the same ip address so the network I’d can not be used for the 2nd switch. I have made a different handler for the 2nd switch but as I wasn’t totally happy with it as a solution I didn’t put it on github.

I’ll dig it out for you when I get home.

Regards,

Mark

Hi Mark,
Glad it wasn’t me being stupid! I would really appreciate it if I could get hold of the handler. Have about 10 sonoff touch unit’s, couple of basics and even a wemos D1 Mini that I have added using your handler today and they work great.

Thanks

Hi

I have added it to my github repository, the 1st relay uses the basic with 2r selected and the 2nd uses this

You need to put the ip address in the preferences and make up something else for network id, doesn’t matter what, smartthings needs a unique id

Hope it helps,

Mark

Hi Mark,
Works great!! thanks for adding the second handler.Really good job mate, exactly the way I was hoping I could get my sonoffs working with Smartthings :slight_smile:

Great,

Glad someone else can make use of it.

Mark

Hello @joelw135, this is great job. Many thanks to you.
Only one question I have .

Could you update source code little bit to make an switch on smarthing as primary source. I mean that after physical device was reboted or power outstage get stage of smarthing switch status. Current implementation grab status of physical device and update switch status in smartthing. Is it possible to make vise versa?
As after power outstage I have to update all switches in correct state in manual or via smart app.
That will be good to have an update from smarthing to physical device (instead current implementation physical device to smartthing) as it primary source of data and control.

Looking forward to your reply.

Hello Mark,

I have an question. Does this approach require update flash memory as was mentioned on beginning of this thread? Or that is apply to fresh devices “as is” from factory?

As I can’t confrol Sonoff basic unfortunately. Device Network Id set as IP of device and only what I have now is "authentication is ok " and "refresh is active " and nothing more.

Please help

BR,
Pavlo

in detailed log i received
'File Not Found

URI: /cm
Method: GET
Arguments: 1
cmnd: power1

1 Like

Question… Does this DH require the Sonoff to be flashed with Tasmota? Or can it work as is out of the box?

I had made the same with my panel Actiontiles or Sharptools. THe problem is that if I turn on a Sonoff device manually then the status update is not reflected in smartthings. Did you figured that out?

Requires Tasmota.

1 Like

You have to flash with the Tasmota firmware.

© 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.