My first Sonoff arrived today and I was excited to get it flashed and set up to be controlled locally by Home Assistant!
Sadly, I quickly realised the latest Itead firmware (2.6.0 in my case) can no longer able to be flashed remotely with Tasmota by SonOTA, as they’ve hard-coded certificate validation into the firmware.
As I don’t have a soldering iron or the other elements needed to do a hardware flash right now, I began investigating options for controlling it locally using the stock firmware.
It turns out that there’s actually a feature built into the firmware now for exactly this, called “LAN mode”.
You have to do a few basic setup steps first (basically, initialise the Sonoff with eWeLink first, then block it from accessing the internet ever again from your router), but once set up it works great!
Full instructions and code here: https://github.com/beveradb/sonoff-lan-mode-homeassistant
I also made a short demo video (this is helpful to show what the LEDs do when it’s in LAN Mode): https://www.youtube.com/watch?v=sxtt2cNm8g8.
Give me a heads up if this is of interest to anyone, or feel free to raise issues on Github if anything isn’t quite right. I’m aware my implementation is very primitive at the moment, with no error handling, caching or even status checking implemented yet, but hope to improve it a bit more over the next few weeks.