I wrote a Lua script that allows me to control my pool's chlorinator. Without going into details that are irrelevant here, I need to cut off its power for 10 seconds to reset it. The device that controls the power is "On" when the power is off, and "Off" to power the chlorinator. I would like to do this:
Code: Select all
commandArray[stop_electrolyseur] = "On" -- power off
10 second delay
commandArray[stop_electrolyseur] = "Off" -- power on
Could a kind soul tell me how to implement this sequence?