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

Not sure about the Sonoff, but I had the H801 where the RX/Tx were swapped. Maybe give that a try if you haven’t got anything in the terminal apart from the error message listed.

Thanks, I’ll give that a go and report back.

Edit: Thats a no go. Swapping the TX and RX yeilds the same error.

Whether I push the button or not the LED flashes in the same pattern. The button works 100% as it turns my fan on and off when it is all hooked up.

Here is the full output fom the command line.

C:\Users\User\Desktop\Sonoff>esptool.exe -vv -cd nodemcu -cb 115200 -cp COM4 -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 COM4
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
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
read 0, requested 1
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
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
read 0, requested 1
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
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
read 0, requested 1
warning: espcomm_sync failed
error: espcomm_open failed

Double check your com port and device driver are what you think they are, run command as admin.

Well 10 idoit points for me.

I have a Sonoff RF (I didn’t realise) and as detailed here: http://tech.scargill.net/even-more-sonoff/ the RF version does not boot into programming mode very easily. I have tried to short the terminal as suggested and my device does appear to boot into programing mode as the LED is off but I get the same out put from the command line as above.

I have three regular Sonoff on the way so I guess Ill just have to wait for now.

My sonoff arrived today, finally.
I managed to connect everything as it should be and downloaded the flashing firmware tool and the image.
Once I unzipped the tool I have a few files like so:

In the tutorial at the beginning it says to use esptool.exe but when I try to open it all I get is a flicker on the screen as something opens and closes very fast, even when I tried to open as administrator.
The file below called ‘flash’ opens a command promt in which I place the command line from the tutorial, like so:

I believe my port is COM4 but I don’t have a clue how I could find that out…

I tried to run it as administrator and I get this

the result is the same error like the one form the previous post.

Any help is welcomed, thank you.

The problem is a bug in the esp8266 sdk. I am trying to find a workaround, but have been extremely busy.

@Petru If you run as administrator it will run from a system directory unless you put the full path of the executable. You don’t need to run it as admin. You can find your COM port in Device manager in Windows Control Panel.

2 Likes

Information is very useful but it would be good if someone make a video tutorial for better understating. I am newbie and want to connect sonoff 10A to Amazon Echo Dot 2.

Thank you!

Wow. You’re brave if you do this.
I had one in my fish tank light that first started to flicker then gave up altogether.
When I looked at it, it was extremely hot.
I immediately removed my other 2.
Personally I wouldn’t touch these with a barge poll.
I use SwiidInter’s now. (In UK) 3 x the cost but a certified device.

Hi guys,
Will sonoff direct work with Amazon Echo (Amazon Echo > Sonoff) or do I need Smartthing Hub (Amazon Echo + Smarthing Hub + sonoff)?

Thanks,

Still need ST. The built in firmware only works with their app, which I’ve never even tried, the new firmware on this thread is for ST. There may be ways around that as the Sonoff is WiFi and accepts commands via http, maybe IFTTT but I’ve not looked into that. You’d still need something on your local network to translate anything though.

Hi guys,

I have been thinking of something but I don’t know if it can actually be done. I’m not a coder/ programmer or anything of sorts so do not take it the wrong way if it turns out to be a bad idea…

If sonoff can connect to the internet through the company’s app I assume the commands for the switch is hosted on their cloud.

maybe it is possible to program the sonoff to connect to a different cloud like amazon. then if the commands are hosted on amazon’s cloud, a skill for alexa could be done that connects to the same place…

as I said, I don’t know if this is possible or not or any of the processes involved but maybe it will light a bulb is a smarter head :slight_smile:

just flash sonoff with mqtt support, have it subscribe to a topic to a broker online, like Amazon aws iot, then use Alexa skills to publish a message to the online broker.

1 Like

there you are…

thanks for that.
as I said, I wouldn’t have a clue how to do this but i’m hoping ill find the answers online.

but in that case you wouldn’t need the ST hub anymore - I think.

you can use this firmware from Home Assistant, it has MQTT built in. You can google for the second part. i think there are some examples out there

2 Likes

Do these devices have a temperature sensor? Maybe could use that as a warning/trigger to ST if temp started rising.

No. It was an inline switch.
I haven’t seen anyone else report this so it may just be a one off. From my perspective though, I’m not prepared to install these in case I get another ‘one off’.

How can i reset the device with this firmware ?

i have accidentally set a password and now i cant remove

Hold down the button for 20 to 60 seconds and then release it. You should see the light flash a few times and it should then start broadcasting its AP.

Great work !

I’m looking something that I can shove behind the electric board and can do multiple switches. Came across this 4ch Sonoff relay: https://www.itead.cc/sonoff-4ch.html

Can I get this to work with smartthings & Alexa ?