Sonoff integration without changing firmware

I did it once

sonoff is now available on wink hub 2, so if you have one, its easy

exactly, looking forward to a solution, without changing the firmware

if they did it, it should be relatively easy to have it on HASS

Also because ewelink app is well made, its way easier to make schedules there.

HASS GUI in that respect is not good

would love to see integration with sonoff out of the box .
the firmware upgrade involving soldering is always a risky thing for noobs .

besides , its easyer to code than soldering :slight_smile:

Has anyone succeeded to integrate a standard sonoff device unit with HA ?
Can it it report a standard on/off status with an url with the command line component?

I dont have sonoff yet, I’m looking to buy one,
Can someone test this?

The OOB firmware talks only to iteads cloud servers.
In order to use the oob firmware with other systems you need to:

  1. Deploy a server in your network that simulates the iteads cloud servers and then does “stuff” (mqtt etc)
  2. Set up rules in your router to redirect the sonoff calls to the cloud to your server from #1

#1 could be provided by (e.g.) a hass.io addon, but #2 will be different for everyone depending on what networking equipment they have…

also because the app ewelink is really excellent, I do prefer it to the HASS UI

understood, but I think 95% of user have a standard modem/router wih internal LAN.

Too bad I don’t know even to start how to program such component and server.

I think iteads uses AWS (does it make sense what I am writing)?

Anyone tried these, does not require any soldering or tinkering on the hardware.

oh really. Interesting

I was able to flash my Sonoff basic without any soldering. The setup took a while because of the Arduino IDE patching, but considering after the 1st firmware flashing you have everything setup and the rest will go smoothly, I am 100% sure it’s worth the effort.

All I used was:

Things that I found hard (or unknown from the cumbersome documentation):

  • Getting Flash Size: "1M (no SPIFFS)" because I didn’t know where the destination path would be: /Users/[user]/Library/Arduino15/packages/esp8266/hardware/esp8266/2.3.0/tools/sdk/ld
  • Flashing procedure: You have to unplug the USB, and the press the button on the Sonoff and KEEP IT PRESSED until you finish Uploading the firmware to your board! Everywhere they say just to put it in download mode, but you have to keep it pressed until it finishes writing.
  • Getting TX and RX correctly
  • Getting a view of the naming on the pins

I used this picture (modified from original to show extra hole):
1476781881988-image

is an FTDI and wiring required? bit confused about your picture above or do you just you need to find out where the program button is located?

what sonoff device did you use? I’m planning to use an S20 unit.

Yes, an FTDI is required to be able to write the firmware through serial if you use https://github.com/arendst/Sonoff-Tasmota. You might now need FTDI if you find some other firmware that you can upload using OTA on the original firmware, but I like very much how Tasmota firmware works.

See below the Sonoff I used:

This is how to connection was made. Please note the pins:
Black = Ground
Yellow = VCC
Orange = TX
Green = RX

I used the top part of the case so I could plug the cables in the holes and not have problems with them coming out (flat surface would push them back up).

Some extra notes (for Tasmota):

  • in user_config.h I changed #define PROJECT to “sonoff-switch-1” and plan to use -2 and -3 as I add more - Will rename them in home assistant to be user friendly
  • I commented out #define USE_IR_REMOTE so I don’t have to bother digging a compatible library, as I won’t be using IR functionality anyway
  • I set #define WIFI_CONFIG_TOOL WIFI_MANAGER (default is WIFI_WPSCONFIG) - This was VERY IMPORTANT for me so I get the AP functionality to setup everything I didn’t change from default
  • PROJECT is not necessary to change as you can do it from MQTT screen later on
  • Wifi details are not necessary to set as you can set them using WIFI_MANAGER later on

Thus is the standard way of flashing Sonoff.

Not for me

that’s different when SonOTA is used,

I have flashed the sonoff basic with windows, note that it didn’t work using raspbian on pi zero.

I just posted a proposal for a solution without firmware changes here:

This seems to be working