See Sonoff Pow/Pow2 page
⚠️️Special Attention ⚠️️
Do not connect AC power and the serial connection at the same time The Gnd connection of the S31 is connected to the live AC wire. Connecting serial with your PC will fry your PC and will electrocute you.
DO NOT CONNECT ANY SENSOR TO THESE DEVICES. Only use them as designed.
The GPIOs on this device are connected to AC power, therefore it is not possible to safely add sensors or displays to it.
The S31 is pretty easy to take apart.
- Pry off the gray cover on the end.
- Slide off the two rounded corner pieces to reveal the 3 screws.
- Unscrew the 3 screws.
- Lift off the cover.
- There are no through holes. You can solder a piece of header or you can fabricate something using pogo pins and just hold it for the duration of the flashing process. But, be aware that can get tiring if you need to do it multiple times.
- The pads are labeled, you need VCC, RX, TX, GND. There are two others that also have RX and TX on them. The ones next to the GND pin and not used for flashing.
- Connect to your serial converter and 3V3.
- You need to press the switch (GPIO0) before applying power to put into bootloader mode.
Verify RX and TX (and VCC and GND) are correct
- Use a terminal program (TeraTerm, putty are examples)
- Set it to the COM port that shows up, when you plug in the USB serial adapter.
- Configure for 115,200 baud
- Connect all 4 pins to the S31
- You should see garbage text show up on the terminal
- If you don't, try reversing RX and TX
- Make sure your voltage is good
- If you don't see text (will be garbage, since the first text that shows up is at a very high baud rate) you are unlikely to be successful in later steps, so figure out why it isn't working now
Now comes the fun part
- It helps to have 4 hands (or have soldered pins on).
- You must press the switch (GPIO0 to gnd) before applying power to start the bootloader.
- You can connect all four wires (while still keeping the switch pressed), or leave all but power connected and then press the switch and then apply the power.
- Now that it is in boot loader mode, you can flash the firmware.
- Follow the instructions in the rest of the Wiki for the method you are using.
External Info on S31
A link to someone's page about the internals of the S31 and how to flash another firmware. I have not yet tried this with Tasmota but will report back when I do.