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

This is a known bug with the esp8266 sdk. I ticket has been submitted. The problem mostly occurs when there is a power outage and your Sonoff devices boot up before wifi is available. If you have a lot of power bumps it may be beneficial to put your AP on a battery backup.

I have dozens of esp devices, but rarely have seen this problem in the wild (because I don’t have very many power issues and my AP is on battery backup). I can easily replicate it though.

1 Like

thanks for fast reply.

Luigi

Just flashed a SV (low voltage) the firmware works for it for those wondering.
I however don’t have a SmartThings hub so the app will not detect it.
I can control on/off from its web page and I’ve added it to the BWS Systems HA-Bridge which gives me Alexa control.

2 Likes

I flashed the sonoff , sonoffTH and the sonoff s20 all works perfectly with my smart hub thanks to Eric .I was wondering if there are any plans for other devices to be hacked such as the sonoff dual and the sonoff 4 channel device as these would be ever so useful for many application .If not then I’ll have to look for other ways to flash these devices say through arduino and a bridge or anything link up possibly or am I just missing something

Thanks for the response ?

Hi, Does anyone working flashing with Sonoff Touch before?
Any photos to share?

Just wonder how to link the FTDI module to the switch because i do have any physical Sonoff Touch on hand.
Cheers

Hi, do you manage to get the sonoff pow working?

I do plan on doing the dual channel Sonoff and the Sonoff POW. I have not considered adding the 4-channel version yet.

@tangcmin The headers for the Sonoff Touch are clearly marked inside. The only exception is GPIO0 which is needed to get it into flash mode. If you ground GPIO0 as shown in the below picture and then power the board via the FTDI adapters 3.3v, you will be able to flash the touch.

2 Likes

Hi

This is awesome work :slight_smile:

I already have 3 Sonoff SV , and wonder if it`s possible to flash those and use them like the other switch ?
I dont need or want a 220v switch.

I wonder about buying the flash USB, but need to know if it`s possible :sunglasses:

I have 4 speaker in my house I would like to control using a low power relay, and the sonoff relay is perfect.
And if it would be possible to use this into ST it would be even more awesome :smiley:

I wonder if nobody soon can make a relay board with 4 or more relay output that can be integrated with ST and work on 12v, if not, I would love to hear some option how to control some 5-12v relay from ST .

Cheers

I believe the Sonoff SV works with the default Sonoff firmware and handler, but I can’t confirm. Has anyone tried flashing one?

I will try to FLASH my Sonoff SV when I receive my flasher USB tool :slight_smile:

I also have a Sonof Dual switch, but I think somebody did mention it would not work in ST ?

Cheers, making this 5v relay switch working in ST would be AWESOME for future smaller projects that dont involve 220v power.

Anyone have a sonoff touch that had this issue:
I flashed the touch. flash completed. disconnected it from ftdi.
took it to switch location. installed it. no brain surgery.
Nin-Neutral
LIn-Hot
LOut-load

Sonoff doesnt appear to have ANY power.
Tested on board terminal. 120v present on board LIn terminal
Tried it with an electrical cord to an outlet.
Tested again, 120v present on board contact.
Sonoff does absolutely nothing. Not a single light, doesn’t broadcast a wifi hotspot.

Am I missing something? Or did I get a bum switch?

1 Like

Hi Eric, I’m sorry to keep asking but any chance you could give some time to getting the DS18B20 sensor working with the sonoff TH?

I know you’re busy because I follow some of your other threads as well, but I’m sure the temp sensor would make the sonoff TH perfect for many applications.

1 Like

I had exactly the same problem with my touch.
It took me ages to get it working.
It appears to flash ok but it doesn’t seem to stay.
If i flashed with espeasy firmware then did the upgrade via web it worked till i rebooted the switch then it died.
In the end i had to flash the firmware with NODEMCUFlasher. (https://github.com/nodemcu/nodemcu-flasher)
It’s now working fine.
My Touch is a eu version, i’m not sure if is slightly differnet from eric’s us version.

Gary, The flash was successful via NODEMCU flasher, just as the CMD prompt method.
Yet the switch is just dead. No hotspot. No manual touch. Lo leds light up. nothing.
I’m guessing I got a bum switch

The settings i used in NODEMCU were, 115200 baud, 1Mbyte Flash, 40Mhz Flash speed and SPI Mode DOUT. I thought my switch was dead unitl i flashed it with espeasy firmware then did the upgrade and the switch started working it just wouldn’t stay working.

I got my sonoffs delivered, and I’m trying to flash, it is flashing the firmware successfully (I think), but I do not see any new SSID, tried 3 of them, same thing. After flashing the button does not turn on the load, nor do I see any LED response on the sonoff. Below is the output of the flash (even flashed thrice):

D:\NodeMCU_ESP8266\Sonoff\ESPEasy flasher>esptool.exe -vv -cd nodemcu -cb 115200 -cp COM6 -ca 0x00000 -cf Sonoff.ino.generic.bin
esptool v0.4.6 - © 2014 Ch. Klippel ck@atelier-klippel.de
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to COM6
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
stat Sonoff.ino.generic.bin success
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_open
Uploading 337760 bytes from Sonoff.ino.generic.bin to flash at 0x00000000
erasing flash
size: 052760 address: 000000
first_sector_index: 0
total_sector_count: 83
head_sector_count: 16
adjusted_sector_count: 67
adjusted_size: 043000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting serial port timeouts to 10000 ms
setting serial port timeouts to 1000 ms
espcomm_send_command: receiving 2 bytes of data
writing flash

starting app without reboot
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete

EDIT: I should see SSID reboot after flashing, power the sonoff using the mains input or either using the 3.3v + GND, tried both power methods, still no go. I’m pulling my hair with this.

It should show the SSID on 3.3v or on wall power. I will test the posted binary tonight to make sure I didn’t upload something incorrectly.

I may have possible been doing the same thing yesterday… double check your port… I thought I flashed the sonoff 10 times until I realized I had a nodemcu plugged in on another port and kept relaxing it instead of the sonoff

@vbhoj74 thats exactly what’s happening to me

@derek_scritchfield mine was correct. and if it isnt hooked up right, it doesnt continue, it keeps retrying the connection.