Switch input - Serial MCU controlled switch

Control serial linked devices through ESP8266

Plugin details

Type: Gases

Name: Serial MCU controlled switch

Status: TESTING

GitHub: P091_SerSwitch.ino

Maintainer: enesbcs

Used libraries: .

Supported hardware

Compatible device list

  • Tuya Wifi Touch wall switch (originally controlled by Tuya Smart/Smart Life app)

  • Tuya Wifi Dimmer Switch (originally controlled by Tuya Smart/Smart Life app)

  • Sonoff Dual - v1 only! (R2 has no serial MCU!)

  • LCTECH compatible 5V WiFi relay 1,2 and 4 relay versions also supported.

.

Commands available

Command

Extra information

/control?cmd=relay,<relaynr>,<state>

Examples:

  • /control?cmd=relay,0,1 Switch on first relay

  • /control?cmd=relay,0,0 Switch off first relay

  • /control?cmd=relay,1,1 Switch on second relay

  • /control?cmd=relay,1,0 Switch off second relay

/control?cmd=relaypulse,<relaynr>,<state>,<duration>

Examples:

  • /control?cmd=relaypulse,0,1,500 Set first relay to ON for 500ms, then stay OFF

  • /control?cmd=relaypulse,0,0,1000 Set first relay to OFF for 1s, then stay ON

/control?cmd=ydim,<value>

Examples:

  • /control?cmd=ydim,255 Set dimmer to MAX value

  • /control?cmd=ydim,25 Set dimmer to ~10%

Change log

Changed in version 2.0:

added 2020-03-02