Sonoff S31: convert it to a local ESPHome device

  • The goal is clear: use an ESPHome configuration for Sonoff S31, reduce dependence on the vendor cloud and connect it to a local system such as Home Assistant.
Fallback Smart-home hardware; not a photo of this project or exact deviceFallback · not project imagery
Fallback visual: Smart-home hardware; hardware context only, not project imagery or compatibility evidence. View image source ↗
HardwareSonoff S31
  • Record D076
  • Sources reviewed 2026-10-22
  • Hands-on status No KitAgain hands-on hardware test
Not yet rated
  • 1/5 dimensions have verifiable sources
  • The current review supports only docs/community. Other dimensions remain null, so fewer than three evidenced dimensions means this route is not yet rated.

Compare device routes

Exact-model review

  • Hardware ESP8266 with 4 MB flash, one relay, button, LEDs and CSE7766 metering.
  • Installation route Tuya-convert is not supported; remove the cover, use the serial header and hold the button at power-on for bootloader mode.
  • Expected result Provides local plug control plus current, voltage, power, power factor and energy readings.
  • Boundary Upstream requires board: esp12e to expose all 4 MB and warns that a web server may destabilize the slower ESP8266.
  • Recovery and stop condition Keep the relay ALWAYS_OFF for initial flashing and change power-restore behavior only through OTA; never attach a load while powered by the programmer.
  • Upstream revision b4479b1b9673a0843caf749d842fcef3c644746a

Decide before you build

  • Current stage An exact-model upstream configuration or maintainer record was read, raising this route to E1; KitAgain still has not tested the hardware.
  • Practical readiness Provides local plug control plus current, voltage, power, power factor and energy readings. The model boundary on this page still applies.
  • User value ESP8266 with 4 MB flash, one relay, button, LEDs and CSE7766 metering. Tuya-convert is not supported; remove the cover, use the serial header and hold the button at power-on for bootloader mode.
  • Follow-up recommendation Keep the relay ALWAYS_OFF for initial flashing and change power-restore behavior only through OTA; never attach a load while powered by the programmer.

Device fit and limits

Known fit or worth checking

  • Devices whose exact model is Sonoff S31
  • ESPHome users prepared to verify the chip, PCB and flashing route

Not established or unsuitable

  • Lookalike products whose controller cannot be identified
  • Mains devices without a safe disassembly and isolation setup

Gaps, next step, and risk

  • What E1 still does not prove An exact-model configuration or maintainer record was read, but KitAgain did not flash, measure or run the hardware long-term, and upstream evidence cannot guarantee an identical current retail revision.
  • Next review step Match the physical model, PCB and controller against the source, then begin with the lowest-risk validation step. Keep the relay ALWAYS_OFF for initial flashing and change power-restore behavior only through OTA; never attach a load while powered by the programmer.
  • Risk and stop condition Disconnect mains-powered devices before opening them and never probe an exposed energized device. Identical product names may hide different chips or PCBs.

What each link contains

  • ESPHome device configuration page ↗device-configuration-page
    The upstream device-database entry for this model. Its presence was confirmed; KitAgain has not treated it as hands-on verification.https://devices.esphome.io/devices/Sonoff-S31/
  • KitAgain read this exact-model source and summarized hardware, installation, capabilities and stop conditions here; no hands-on test was performed.https://github.com/esphome/devices.esphome.io/blob/main/src/docs/devices/Sonoff-S31/index.md
← Back to all field leads