Sonoff with HA without soldering by OTA - Wifi using SonOTA

As I’d gone mad and ordered ten I thought I might as well get the usb gizmo as a backup. Given I’d need to set python up on a device decided to try it as a first step. After having a scan through the TASMOTA pages and watching the platformio video decided to give that a go as I was in front of my Mac and it didn’t need all the extra prep Arduino needs now that no one mentions in any of the guides, 0k spiffs etc.

Anyway, ten minutes to knock up a cable from some old header pins to make a more secure connection as I wasn’t going to solder anything in other than switch wires later and I was away. Opening the case is nothing to be scared of, there’s no glue and they pop apart at the slightest hint of a finger nail. Warranty isn’t an issue as that’s gone as soon as you flash it anyway :slight_smile: Setting up software was a nothing couple of minutes job and i set my first one going.

Now this is where the fun started, software changes fast and videos don’t get updated. After several what I thought we false starts, I discovered I’d actually flashed it successfully first time but because it was showing different things onscreen to the video I thought something was wrong. Video is fine up to clicking upload then just ignore the rest. Flashing takes 90 seconds with no interaction.

All that was left to do is go to the device web interface and set your options, no need to change the names etc when flashing, just change them afterwards.

Now I knew what I was doing I did the remaining nine in about thirty minutes including imaging them and testing in home assistant. It really is ridiculously easy, just suffers from out of date, incomplete guides like most things on the web. Actually read what it says in the software and you’ll be fine.

From my experiences, I’d say direct flashing without soldering is actually the easy quick option with far less setting up and knowledge needed. The usb gizmo costs next to nothing if you’re prepared to wait and only a fiver for next day from Amazon, so 50p on the cost of each Sonoff if doing ten.

Just my 10p worth but I’m very grateful for this post regardless as I probably wouldn’t have revisited them otherwise.

I tried the OTA approach and it got stuck in final stage, won’t ever complete.

I ordered a usb-serial adapter and tried flashing that way.
I can’t even get through that. No matter what it always says

warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed

I’ve read it might be the cable. Tried 3 or 4 different cables.
I’ve read it might be that I need to switch from Generic 8266 to 8265. That did nothing. I’ve all but given up until the remainder of the POWs show up from China and I will try flashing those instead.

Give us a few more details, what device to start with, what method are you trying to use, what cable etc, etc?

Sonoff Pow. Using the same process as bruhautomation video outlines for the most part (same adapter he linked to, arduino, etc). Soldered a header to the Pow and wired it to adapter. Hold the button on the sonoff and then plug usb in and hit upload. It stalls out during the upload process and give me that error.

I saw this when I googled your error

Problem lay in the “flash mode” - step 7 in my list.
It isn’t going to work that way. After re-reading the HowTo, you must Change step 7 to:

7.1 disconnecting the USB and pressing the button on the Sonoff POW
7.2 connecting the USB while pressing the button => LED lights (without blinking)

then, the Upload works just fine.

I am using ArduinoIDE not platformIO so not sure if that matters, but yes i hold the button the entire flash process, before i plug into the computer until i get the error on arduinoide, at which point i unplug usb typically and start over.

Sorry, how do i change into the directory?

EDIT: Never mind, got it

You let go of the button as soon as the power is supplied, that how it goes into flash mode. Have you done the extra prep mentioned in the TASMOTA wiki that you need to do with the latest version of using Arduino IDE? This isn’t mentioned in any of the vids because they use older versions as I said previously. One of the big advantages of platformio is it’s all ready to go bar putting in your WiFi details.

Mine is stuck broadcasting the FinalStage SSID. The sonoff device is repeating a long green light followed no light.

It seems bricked now :frowning:Any suggestions?

I have followed the wiki yes.

Just tried this in PlatformIO and got the same error-
Espcomm_sync_failed
Espcomm_open_failed
Espcomm_upload_mem_failed

These are so frustrating because I know they should be a simple 5 min setup but I am running into nothing but problems.

So I got a 2nd sonoff delivered yesterday. Tried the OTA approach and got the same result. It stays in final stage which makes me think it can’t download the full file…idk.

Anyways tried the platform IO on this one and actually got it to upload!

But now (sigh) I am stuck again as it won’t connect to my network. Did the 4 button wireless AP, put the network info in and saved/restarted, but it never shows up on Fing…strange.

Edit:fixed it
Fing is rather useless now without the mac addresses as it was showing as an echo dot when it was really a sonoff
Just glad its working

1 Like

Really, for me Fing shows:

Generic
IP address
Espessif
MAC address

…for each of my Basics, assume you did refresh it as it shows previous scan results until you do and it suggests you had a Dot with that IP last time.

Now you’ve got it to work it kind of suggests it was something to do with the connection at the header. Although you know how to get around it now, next time check how you entered the IP too, I put my ssid and password in 1 and removed the default from 2 just leaving the ””. You could always put your details in for both.

Great news you’re now up and running though :+1:

I agree I soldered the first one (must have done it poorly) and this one I just put female-male jumpers on it and held them at an angle similar to bruh video. Won’t solder them anymore this is easier.

In regards to Fing, I am using the Iphone app, might have to start using the android app on a Kindle because Iphone no longer allows Fing to see MACs, so yes it was just taking the last known device with that IP and saying that’s what it was. Not really helpful as most of my IPs change.

Back to SonOTA, not sure I can recommend it for the Sonoff POW, and if you are doing multiple I do suggest getting the cable and using PlatformIO, but I do appreciate that they are constantly trying to make the process better/easier. These are underrated devices once setup they are pretty great.

1 Like

Quite, when it is a download this, press the button, wait a minute, job done it will be great, ironically that’s what flashing currently is after the first one.

Having said that of course, Sonoffs come into their own when you configure the gpio and connect things to it…which means opening it up and soldering :grin:

Is there a way to replace the tasmota .bin file with this firmware:

I like the idea of the OTA update but want to use this firmware - seems excellent to work when wifi or mqtt aren’t available…

I’ve googled how to create a .bin file from arduino ide, but don’t understand how to do this.

Any help much appreciated.

Trux

What are you looking to do that tasmota can’t? I don’t know how to create a bin file but I read the Dullage switch and can’t find anything tasmota can’t do.

Thanks for the reply… So the tasmota firmware will function if the wifi drops/ mqqt broker isn’t available too? I’ll give it a try!

It does that plus loads more besides, just read the wiki.

@truxntrax, if you mean can you use the hardware button to toggle it without network, then the answer is yes.

I’m a bit shy and not so good in soldering and hence wanted to avoid that route.

This one was people like me and I Tried today and it worked like magic. So smooth and successful.

Thanks.