Skip to content

Sonoff Devices

José Antonio Jiménez Campos edited this page Jan 21, 2025 · 3 revisions
Model Chip Functions GPIOs and notes MEPLHAA script
Sonoff Basic R1 R2 R3/SV/Mini/TH/POW ESP8266 Switch {"c":{"io":[[[12,13],2],[[0],6]],"l":13,"b":[[0,5]]},"a":[{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0]]}]}
Sonoff BASICR4 ESP32C3 Switch It works with "Magic Switch" function {"c":{"io":[[[4,6],2],[[5],6,0,2,1,2000],[[9],6]],"c":1,"l":6,"b":[[9,5]]},"a":[{"0":{"r":[[4]]},"1":{"r":[[4,1]]},"b":[[5],[9]]}]}
Sonoff Basic R1 ESP8266 Switch with external switch 14: External switch {"c":{"io":[[[12,13],2],[[0],6],[[14],6,1]],"l":13,"b":[[0,5]]},"a":[{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0],[14],[14,0]]}]}
Sonoff Basic R1/SV/TH10/TH16 ESP8266 Heater and Humidity sensor 14: DHT22 sensor {"c":{"io":[[[12,13],2],[[0],6]],"l":13,"b":[[0,5]]},"a":[{"t":25,"s":5,"g":14,"0":{"r":[[12]]},"1":{"a":0},"3":{"r":[[12,1]]},"5":{"m":[[0,0.02]]}}]}
Sonoff Basic R1/SV/TH10/TH16 ESP8266 Switch and Temperature sensor 14: DS18B20 sensor {"c":{"io":[[[12,13],2],[[0],6]],"l":13,"b":[[0,5]]},"a":[{"t":22,"g":14,"n":3},{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0]]}]}
Sonoff S20/S26/S55 ESP8266 Outlet {"c":{"io":[[[12,13],2],[[0],6]],"l":13,"b":[[0,5]]},"a":[{"t":2,"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0]]}]}
Sonoff Mini ESP8266 Switch with external switch {"c":{"io":[[[12,13],2],[[0,4],6]],"l":13,"b":[[0,5]]},"a":[{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0],[4],[4,0]]}]}
Sonoff Basic R1 ESP8266 Garage Door Working 18 seconds, 14: close sensor, with stop-step. Dry relay connected to action garage door button {"c":{"io":[[[12,13],2],[[0],6],[[14],6,1]],"l":13,"b":[[0,5]]},"a":[{"t":40,"d":18,"f3":[[14,0]],"f4":[[14]],"0":{"r":[[12,1,0.5]]},"1":{"a":0},"2":{"r":[[12,0,1.5],[12,1,0.5],[12,1,2]]},"3":{"a":2}}]}
Sonoff SV ESP8266 Garage Door with additional switch to emergency stop Working 18 seconds, 14: close sensor, 4: open sensor, with stop-step. Dry relay connected to action garage door button {"c":{"io":[[[12,13],2],[[0],6],[[4,14],6,1]],"l":13,"b":[[0,5]]},"a":[{"t":40,"d":18,"f3":[[14,0]],"f4":[[14]],"f2":[[4,0]],"f5":[[4]],"0":{"r":[[12,1,0.5]]},"1":{"a":0},"2":{"r":[[12,0,1.5],[12,1,0.5],[12,1,2]]},"3":{"a":2},"10":{"a":0},"es":[{"i":1,"1":{"m":[[-1,2]]}}]}]}
Sonoff 2CH ESP8266 Switch Same room {"c":{"io":[[[5,12,13],2],[[0,9,10],6]],"l":13,"b":[[10,5]]},"a":[{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0,0]],"es":[{"0":{"r":[[5]]},"1":{"r":[[5,1]]},"b":[[9,0]]}]}]}
Sonoff 2CH ESP8266 Switch Different rooms {"c":{"io":[[[5,12,13],2],[[0,9,10],6]],"l":13,"b":[[10,5]]},"a":[{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0,0]]},{"0":{"r":[[5]]},"1":{"r":[[5,1]]},"b":[[9,0]]}]}
Sonoff 2CH ESP8266 Window covering with external push buttons Opening 18.3 seconds, closing 14.8 seconds, non-lineal correction 70% {"c":{"io":[[[5,12,13],2],[[0,9,10],6]],"l":13,"b":[[10,5]]},"a":[{"t":45,"o":18.3,"c":14.8,"f":40,"0":{"r":[[12,1],[5]]},"1":{"r":[[12],[5,1]]},"2":{"r":[[12],[5]]},"3":{"r":[[12,0,0.2],[5]]},"4":{"r":[[12],[5,0,0.2]]},"f3":[[0,0]],"f4":[[9,0]]}]}
Sonoff 3CH ESP8266 Switch Different rooms {"c":{"io":[[[4,5,12,13],2],[[0,9,10],6]],"l":13,"b":[[0,5]]},"a":[{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0]]},{"0":{"r":[[5]]},"1":{"r":[[5,1]]},"b":[[9]]},{"0":{"r":[[4]]},"1":{"r":[[4,1]]},"b":[[10]]}]}
Sonoff 3CH ESP8266 Switch with interlocks Different rooms {"c":{"io":[[[4,5,12,13],2],[[0,9,10],6]],"l":13,"b":[[0,5]]},"a":[{"0":{"r":[[12]]},"1":{"r":[[12,1]],"m":[[2],[3]]},"b":[[0]]},{"0":{"r":[[5]]},"1":{"r":[[5,1]],"m":[[1],[3]]},"b":[[9]]},{"0":{"r":[[4]]},"1":{"r":[[4,1]],"m":[[1],[2]]},"b":[[10]]}]}
Sonoff 4CH ESP8266 Switch {"c":{"io":[[[4,5,12,15,13],2],[[0,9,10],6],[[14],6,1]],"l":13,"b":[[0,5]]},"a":[{"0":{"r":[[15]]},"1":{"r":[[15,1]]},"b":[[14]]},{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0]]},{"0":{"r":[[5]]},"1":{"r":[[5,1]]},"b":[[9]]},{"0":{"r":[[4]]},"1":{"r":[[4,1]]},"b":[[10]]}]}
Sonoff 4CH ESP8266 Irrigation System with 4 zones {"c":{"ct":28,"io":[[[4,5,12,15,13],2],[[0,9,10],6],[[14],6,1]],"l":13,"b":[[0,5]]},"a":[{"t":20,"w":1,"0":{"r":[[15]]},"1":{"r":[[15,1]]},"b":[[14]],"es":[{"t":20,"w":1,"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0]]},{"t":20,"w":1,"0":{"r":[[5]]},"1":{"r":[[5,1]]},"b":[[9]]},{"t":20,"w":1,"0":{"r":[[4]]},"1":{"r":[[4,1]]},"b":[[10]]}]}]}
Sonoff Basic R1 ESP8266 Switch, motion sensor 14: Motion sensor {"c":{"io":[[[12,13],2],[[0],6],[[14],6,1,1]],"l":13,"b":[[0,5]]},"a":[{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0]]},{"t":12,"i":10,"f1":[[14,0]]}]}
Sonoff iFan02 ESP8266 Fan and Switch RF remote does not work {"c":{"io":[[[4,5,15,12,13],2],[[0],6]],"l":13,"b":[[0,5]]},"a":[{"t":65,"0":{"r":[[15],[4],[5]]},"y0":[{"v":1,"0":{"r":[[15,1,0.5],[4],[5,0,0.6]]}},{"v":33,"0":{"r":[[15,1,0.5],[4,0,0.6],[5,0,0.6]]}},{"v":67,"0":{"r":[[15,1],[4],[5]]}}],"b":[[9]],"es":[{"0":{"r":[[12]]},"1":{"r":[[12,1]]},"b":[[0]]}]}]}
Sonoff iFan03/iFan04 ESP8266 Fan and Switch With RF remote support {"c":{"io":[[[9,12,14,15,13],2],[[0],6]],"z":12,"r":[{"n":10,"s":9600,"l":[8,8]}],"l":13,"b":[[0,5]]},"a":[{"t":65,"0":{"r":[[15],[12],[14]]},"y0":[{"v":1,"0":{"r":[[15,1,0.5],[12],[14,0,0.6]]}},{"v":33,"0":{"r":[[15,1,0.5],[12,0,0.6],[14,0,0.6]]}},{"v":67,"0":{"r":[[15,1],[12],[14,1]]}}],"es":[{"s":1,"1":{"r":[[9]]},"0":{"r":[[9,1]]},"b":[[0]]}]},{"t":80,"h":0,"n":24,"pt":[["AA",5]],"dt":[2,0],"y0":[{"v":260,"r":1,"0":{"m":[[7002,1]]}},{"v":517,"r":1,"0":{"m":[[7002,1]]}},{"v":6,"r":1,"0":{"m":[[7001,1],[-2]]}},{"v":263,"r":1,"0":{"m":[[7001,1],[-2,30],[-2,101]]}},{"v":520,"r":1,"0":{"m":[[7001,1],[-2,60],[-2,101]]}},{"v":777,"r":1,"0":{"m":[[7001,1],[-2,100],[-2,101]]}},{"v":1034,"r":1,"0":{"m":[[7001,1],[-1,4]]}},{"v":265,"r":1,"0":{"m":[[7004,1]]}},{"v":266,"r":1,"0":{"m":[[7003,1]]}}]},{"h":0,"i":0.1,"1":{"u":[{"v":"AA550104000005"}]}},{"h":0,"i":0.1,"1":{"u":[{"v":"AA550101000002"}]}},{"h":0,"i":0.1,"1":{"u":[{"v":"AA550107000008"}]}},{"h":0,"i":0.1,"1":{"u":[{"v":"AA550106000007"}]}}]}
Clone this wiki locally