Skip to content

Shelly Plus 2PM

José Antonio Jiménez Campos edited this page Feb 1, 2025 · 2 revisions

Main Chip: ESP32 Dual Core.

Power Energy Meter Chip: ADE7953 I2C:

Datasheet:

Official Product Link

Connections

  • ADE7953:
    • I2C:
      • Speed: 100KHz
      • SCL Pin: GPIO 25
      • SDA Pin: GPIO 26
    • IRQ Pin: GPIO 27
  • Relays:
    • O1: GPIO 13
    • O2: GPIO 12
  • Inputs:
    • Built-in Button: GPIO 4
    • S1: GPIO 5
    • S2: GPIO 18
  • Status LED: GPIO 0

Flash

Only wired flash.

MEPLHAA Scripts

  • Relay switching by Zero-Cross Detection at GPIO 27.
    • Switching at 0V before positive wave.
    • Calibrated with oscilloscope by @TriderG75.
  • Built-in Button: Setup Mode holding it for 8 seconds.
  • Power Metering.
  • Internal temperature.

2 Switches

  • HomeKit switches at different rooms in Apple Home.
  • S1 and S2: physical switches.
  • Protections:
    • Overvoltage: 240V.
    • Per channel overcurrent: 10A.
    • Per channel overpower: 2200W.
    • Total overcurrent: 16A.
    • Total overpower: 3500W.
    • Overtemperature: 75°C.
{"c":{"zd":3.6,"io":[[[12,13,0],2],[[4],6,1],[[5,18],6,0,1],[[35],10,0,3],[[27],1]],"l":0,"b":[[4,5]],"ic":[[25,26,100]]},
"a":[
{"0":{"r":[[13,0,0,27,2]],"m":[[6,-1000000]]},"1":{"r":[[13,1,0,27,2]],"m":[[6,-1000000]]},"b":[[5],[5,0]],
"es":[{"t":75,"cd":1.5,"n":2,"dt":[0,56],"vf":0.0000382602,"vo":-0.068,"cf":0.00000949523,"co":-0.017,"pf":-0.006097560976,
"y0":[{"v":240,"r":1,"0":{"m":[[1,3]]}}],
"y1":[{"v":0,"m":[[7,-1000000]]},{"v":10,"r":1,"0":{"m":[[1,3]]}}],
"y2":[{"v":0,"m":[[8,-1000000]]},{"v":2200,"r":1,"0":{"m":[[1,3]]}}]}]},
{"0":{"r":[[12,0,0,27,2]],"m":[[6,-1000000]]},"1":{"r":[[12,1,0,27,2]],"m":[[6,-1000000]]},"b":[[18],[18,0]],
"es":[{"t":75,"n":3,"dt":[0,56],"vf":0.0000382602,"vo":-0.068,"cf":0.00000949523,"co":-0.017,"pf":-0.006097560976,
"y0":[{"v":240,"r":1,"0":{"m":[[1,3]]}}],
"y1":[{"v":0,"m":[[7,-1000000]]},{"v":10,"r":1,"0":{"m":[[1,3]]}}],
"y2":[{"v":0,"m":[[8,-1000000]]},{"v":2200,"r":1,"0":{"m":[[1,3]]}}]},
{"t":22,"h":2,"cd":0.5,"n":5,"g":35,"j":10,"y0":[{"v":75,"r":1,"0":{"m":[[1],[2]]}}]}]},
{"t":80,"h":0,"j":0,"n":20,"dt":[3,0],"ic":[0,56,2,46],"in":[[2,1,2,32,4],[2,2,44,16,128,0]]},
{"t":80,"h":0,"j":0,"n":5,"dt":[0,2,1,1,4,1],"y0":[{"v":16,"r":1,"m":[[1],[3]]}]},
{"t":80,"h":0,"j":0,"n":5,"dt":[0,2,2,1,4,2],"y0":[{"v":3500,"r":1,"m":[[1],[3]]}]}
]}

Modifications:

  • Use external push buttons on S1 and S2, instead switches:

Remove ,[5,0] and ,[18,0]

Window Covering

  • S1 and S2: physical switch.
  • Times:
    • Open: 18.3s
    • Close: 14.8s
  • Protections:
    • Overvoltage: 240V.
    • Per channel overcurrent: 3A.
    • Per channel overpower: 600W.
TO-DO

Modifications:

  • Use external push buttons on S1 and S2, instead switches:

Replace line:

``

with

``

  • Enable Virtual Stop feature:

Add ,"vs":1 after {"t":45

Clone this wiki locally