Sonoff with HA without soldering by OTA - Wifi using SonOTA

For anyone looking for a solution that works, I just tried this and it was fast and easy.

15 Likes

I confirm, it works without any issues, tested with a Sonoff S20

Could you recommend a step by step for getting from fresh out of the box to switching something on and off in HA please?

1 Like

follow the SonOTA guide to the letter; once successfully installed follow this guide to setup HA

2 Likes

Thanking you :+1:

Now just need to wait those painful few weeks for delivery.

I’ve tried sonota on s20 switch and it worked great, few weeks later tried on sonoff touch and it kept rebooting after flashing. I’ve spent some time debugging what was wrong, pulling my hairs out and etc. Finally found that newer tasmota upgraded Espressif SDK version, which might require full flash erase, which can be only done using hardware flasher. Some info here: https://nodemcu.readthedocs.io/en/master/en/flash/#sdk-init-data . I think the issue is when shipped hardware was on the older sdk and now tasmota has newer and it might not work. Anyway if after flashing using sonota device keeps rebooting it probably needs full flash erase, in my case it worked.

I really like the Sonoff basic which I installed yesterday. I put my sonoff in the in wall light switch box which was wired with 3 switches. I found that it fit in the box ok, and if I wired the switch to gpio14 and ground on the sonoff and set it to switch1 in the configuration, it works perfectly as a existing wired switch replacement. This should work with any number of light switches that control a light.

  • I can use the old switch to turn on / off the light like before
  • Use the other two switches to turn on / off the lights like before
  • automated the turning off / on the light
  • no sign of a sonoff device or any change from before
2 Likes

Cool, didn’t know you could do normal switches with them now, last time i looked into them you had to use momentary push ones.

I might be wrong but this seems to make a lot of assumptions that you know what you’re doing in Python, is there anything that tells you ‘exactly’ what to do so it becomes more of a cut and paste operation?

2 Likes

It requires you to download a python file that you need to run on a computer that the sonoff will connect to by wifi.

In the directory you downloaded, type

pip3 install httplib2==0.10.3
pip3 install netifaces==0.10.6
pip3 install tornado==4.5.1
python3 sonota.py

and then it will walk you through it.

Not working for me… using a POW and I get sonota running, enter wifi credentials, connect to ITEAD network, boots me from that, reconnect to my wifi and wait for ‘Final Stage’ … but that never comes. So it just keeps running saying ‘wait a minute or so and then connect to Final Stage’

Thanks @RobDYI , much appreciated …again. hassio.io was made for me if you get what I mean :flushed:

Expect more inane questions next week :+1:

I think that is where you want to be. You need to use your phone or anything and connect to the “Final stage” wifi network that the sonoff creates. Once you connect, the program will continue with an end message and then close.

You will then need to find the ip address that your network assigned to the sonoff. I just went to my router and looked at the connect device page but you can use nmap or some iphone app that searches. Once you get the ip, put it in a browser and change the wifi setup to your network.

Yes but it isnt creating a final stage network. It just hangs and never creates one, so i cant connect to it.

I am on version 2.0.4 of sonoff firmware which apparently is confirmed to work.

I googled your problem and found this, it might help.

https://github.com/mirko/SonOTA/issues/36

Thanks. I will have another go at it. I did upgrade to 2.0.4 so i dont think that is it, but i am a bit perplexed by ‘make sure all firewalls are turned off’

I am doing this on a raspberry pi which by default has no firewall to my knowledge, so i thought i was fine. Is my windows pc blocking the ‘final stage’ ssid even though it has no involvement? Maybe a stupid question.

No, I don’t think anything can block a wifi access point. If you saw the ITEAD network, you should be able to see the Final Stage one on the same device. Perhaps start the process over.

Lol i think i might just spring for a tfdi adapter.

I managed to get into final stage and now it’s hung up again in this stage.

Having same issue as ‘soytoledano’ where i am getting no led response from the sonoff but it is stuck in final stage.

Same here, waiting for the final stage ssid to show up which does not happen.

Just, for clarifaction.
it’s mean that you can flash sonoff original firmware over wifi? without wire to the sonoff?
//thanks