Sonoff Smart Stackable Power Meter DIN Relay (SPM)
Sonoff Smart Stackable Power Meter

Available from:


Install method:
USB to Serial

GPIO #Component
GPIO00 User
GPIO01 None
GPIO02 User
GPIO03 None
GPIO04 Serial Tx
GPIO09 None
GPIO10 None
GPIO12 User
GPIO13 User
GPIO14 User
GPIO15 None
GPIO16 Serial Rx
GPIO17 None
GPIO18 SHD Reset
GPIO19 None
GPIO20 None
GPIO21 None
GPIO22 None
GPIO23 SHD Boot 0
GPIO24 None
GPIO25 None
GPIO26 None
GPIO27 None
GPIO6 None
GPIO7 None
GPIO8 None
GPIO11 None
GPIO32 LedLink
GPIO33 User
GPIO34 User
GPIO35 Button 1
GPIO36 User
GPIO37 None
GPIO38 None
GPIO39 User
Configuration for ESP32
{"NAME":"Sonoff SPM (POC2)","GPIO":[1,0,1,0,3200,5536,0,0,1,1,1,0,3232,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,544,1,1,32,1,0,0,1],"FLAG":0,"BASE":1}
Flashing instructions for tasmota32 firmware.

Requires an ESP32 binary with Ethernet support. Download unofficial `tasmota32-ethernet.bin`development build.

Complete support under development!

All required pins for serial flashing are available and labelled!


Using latest development branch, compile tasmota32 firmware with:


and apply the template.


  • Bulk of the action is handled by ARM processors present in every unit communicating over modbus RS-485.
  • Each SPM-4Relay has 4 bistable relays with their own CSE7761 energy monitoring device handled by an ARM processor.
  • Green led is controlled by ARM processor indicating SD-Card access.
  • ESP32 is used as interface between eWelink and ARM processor in SPM-Main unit communicating over proprietary serial protocol.
  • Inductive/Capacitive loads are not reported correctly.
  • Power on sequence for two SPM-4Relay modules is 00-00-15-10-(0F)-(13)-(13)-(19)-0C-09-04-09-04-0B-0B

Implemented in Tasmota:

  • Up to 7 SPM-4Relay units supporting up to 28 relays.
  • Gui rotating energy display for 4 relays at a time.
  • Button on SPM-Main initiates re-scan of SPM-4Relay units.
  • Blue led equals Tasmota WiFi status.
  • Ethernet support
  • webUI display


  • Gui for Overload Protection entry (is handled by ARM processor).
  • Gui for Scheduling entry (is handled by ARM processor).
  • Yellow led functionality.
  • Interpretation of reset sequence on GPIO’s 12-14.

See GitHub Discussion for more info…