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

{“version”:“1.0.1”, “date”:“Jul 31 2016 20:30:34”, “mac”:“5ccf7f471390”}

mine seems pretty old…
at which version did you add this feature ?

hi @erocm1231 I have flashed and properly set up a few sonoffs but my last couple after I have flashed them did not get a Wi-Fi signal and toggle led stops working. have you encountered this problem yet?

You basically need to replicate this:

There’s a post over on Tasmota’s wiki on this topic:

TL;DR - switch your TX/RX wires.

Try to flash it with NodeMcu. Steps for that are a couple posts back.

I added the boot up option of “inverse previous state” that should accomplish what you are trying. I haven’t added the option to the device handler yet, but you can change it from the web interface. I posted the file for the Sonoff and S20 and will get the others up once I test them.

@mrmrmrmr Yeah, that is an old version with a bug that is causing you problems. Updating should take care of it.

@cuboy29 I will definitely look into that.

3 Likes

Hi,

I have managed to get one of the devices working but I am having issues with 2 others. I can flash the device which shows as successful but when I try to connect through WiFi the device doesn’t seem to broadcast.

Any ideas?

The man is a genius. Works wonders, thank you.

Nick

Hi @erocm1231, can you please suggest what code I need to change to replace 120v with 240v if possible? I can use this workaround till the next version is published.

I have one here but haven’t had chance to flash it as yet… Can anybody tell me what functionality the buttons have on the Dual using this firmware?

A) does the on board button have any effect? If so does it switch both relays or just relay 1?
B) Do the button0 and button1 headers control the individual relays? If so are they momentary?

Thanks

Nick

Since you’re looking at it anyway, how about having the firmware phone home and display the latest available firmware version and allow user to download/install it from the device tile?

1 Like

That’s a huge job, you know that right? I mean like a month of coding and testing with huge risk if any of the firmware versions have a problem…

Nice as it might be!

I tried to go through all 772 post but might have missed it. Is there code for a double-switch (2 relays) for Nodemcu with onboad switches that will work with ST?

I’ve added the ability to set a “hostname”. This is the hostname that is presented to your dhcp server when requesting a lease. Depending on your router, you may be able to access the device via its hostname instead of ip address.

I also added a banner that appears if you change a setting that requires a reboot.

image

There is a new boot up state called “Inverse Previous State”. So if the switch is on when it is rebooted the boot state will be off. If it is off, the boot state will be on.

image

Ability to set the debounce for the physical button or attached switch (in ms).

image

Device voltage selection for Sonoff POW.

image

3 Likes

Hello,

update the new FW, all seems to work fine.
@erocm1231, great job, thx

Just one question:
Is it possible to show the Temp from the TH16 in the favorites, or is there an other solution?

And, are there any other documents to learn how to program DH/Smartapp a.s.o.?

THX
Mike

Hi Eric, I have flashed my Sonoff successfully, attached it to my wifi, published both my device handler and smartapp, and it the app is showing up in the marketplace under “my apps”, but it won’t discover my device. Any thoughts?

1 Like

Hi Martin,

I flashed the 4ch firmware onto a sonoff regular and then soldered some extra relays onto the board so it is now a 3CH device (using the 4ch device handler too). There is no reason you couldn’t do the same with the NodeMCU.

Hi,
the sonoff and the ST must be in the same subnet. Check your DHCP-Server-Entrys (normaly the router)
Sonoff begins with ESP-xxxx, Smartthinghub with st-xxxxxxx.
Can you access the sonoff via web (only http:// IP-Adress-of-sonoff).
If no, than you can not discover.
If yes, try to flash via OTA again.
Normaly it works fine,
Otherwise try the manually integration.
Hope it helps,
MikeXX

Did you put the Sonof into pairing mode by holding the button for a few seconds until the LED became solid? Worked for me.

Thank you for the reply. I figured it out. I was doing it from a Youtube video at 1st, but then followed Eric’s steps here and all was good. Sorry for not posting earlier.