Sonoff

Sonoff from ITEAD currently supported:

  • Sonoff and Sonoff SV

  • Sonoff RHT (relay, temperature, humidity)

  • Sonoff Dual

  • Sonoff Power

  • Sonoff T0US Touch V1 aka TX T3US1C, T3US2C, T3US3C (needs special handling)

To enter FLASH mode (for the base firmware flashing) hold down the button while plugging the USB adapter into the USB port.

Here's what you need to customize a Sonoff in addition to the items from Flashing Firmware.

  1. A soldering iron (you must solder a connector onto the card)

  2. A standard 4 pin header, male or female

  3. One or more Sonoffs from ITEAD

  4. Wires to join the programmer to the Sonoff card to the programmer

  5. A USB/UART programmer of some kind.

    1. I'm finding the PL2303 adapter drivers to be unstable and I've started using the CH340 based drivers instead: ESP01 programmer

    2. This works too, but I find less stable: USB To RS232 TTL Auto Converter

And the steps:

  1. Disconnect the card from the LINE IN / mains current!!!

  2. Pop the cover off of the 8266 card. The Sonoff cover is removed by running your fingernail along the seam at the bottom of the card.

  3. While it's open carefully note which pins should be used for the LOAD side. When installing, run the LINE in through the relay. Run the neutral on the other line (the pins furthest from the LED are for neutral).

  4. Remove the card from the case and solder a 4 pin header in place. For the Sonoff the connector goes on the 4 pins closest to the button. The 5th pin is connected to one of the GPIO pins and is handy if you want to add an external sensor (like a door relay).

  1. Pin 1 is the one closest to the Sonoff button and is +3V3, and pin 4 is ground.

Wire the Sonoff to the programmer like this (others will be similar):

    1. 3.3V to Sonoff pin 1 (3V3) - 3V3 is important, don't use 5V!

    2. TX to Sonoff pin 2 (RX) - TX/RX might be reversed on your programmer, try each.

    3. RX to Sonoff pin 3 (TX)

    4. GND to Sonoff pin 4 (GND)

  1. Plug the programmer into your USB port. Let windows install the drivers.

  2. To enter firmware flashing mode, unplug the programmer from the USB port, then while holding down the button, plug it back in.

  3. Go to Flashing Firmware and follow the steps to flash the base firmware. Note that some of these devices need different flash settings than the default. Newer Sonoff's need to be flashed in "DOUT" mode (see the "advanced" tab of the espflasher.exe). My new ones are marked YD QCPASS and the PCB labelled "Sonoff". Older ones were marked with Sonoff TH.

You can physically install the Sonoff now as you don't need it to be accessible to update the MppDevice extension.

NOTE: newer Sonoffs need to be flashed using DOUT mode rather than the default DIO (see the "advanced" tab). My new ones are marked YD QCPASS and the PCB labelled "Sonoff". Older ones were marked with Sonoff TH.

Sonoff Dual from ITEAD

The Sonoff Dual does not have a button to control the flashing nor the wifi status. To flash the card you must jumper the GPIO0 input to ground while powering the device on. Use a jumper from one of the ground output connectors to the GPIO0 side of the resistor as shown below.

I've yet to try it myself, but a jumper from the pin marked "Switch" to the GPIO0 resistor might allow easier flashing and restarts. Please let me know if you try it and it works, thanks!