_Cyber_ wrote: ↑10 Nov 2019, 21:38
I am trying to use the rules-part to disable a relay after a specific time.
Basic commands are written in the first post in this thread.
All commands are documented inside the source code header:
https://github.com/enesbcs/ESPEasyPlugi ... Switch.ino
"ACT : SetSwitch r1:1" is debug information only, "relay" is the command that you used before...
List of commands :
- relay,[relay_number],[status]
Set specific relay (0-3) to status (0/1)
- relaypulse,[relay_number],[status],[delay]
Pulse specific relay for DELAY millisec with STATUS state, than return to inverse state
- ydim,[DIM_VALUE]
Set DIM_VALUE to Tuya dimmer switch (value can be 0-255, no range check!)
Of course, only the Tuya dimmer can do it... dim value can be read from plugin values.
There are no checks for is it state on or off.
Command 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,0,1,500
Set first relay to ON for 500ms, than stay OFF
- /control?cmd=relaypulse,0,0,1000
Set first relay to OFF for 1s, than stay ON
- /control?cmd=ydim,255
Set dimmer to MAX value
- /control?cmd=ydim,25
Set dimmer to ~10%