Creating a switch action that toggles relay N number of times. #2118
-
Hi, I'm attempting to configure one of the relays on a Shelly Plus 2PM to simulate setting a specific color mode on a light by switching the relay on/off N number of times with about a second between each toggle, where different values for N show different color modes. I've looked at the the following garage example action: Is this possible with HAA and is there documentation I can read on how to fully utilize binary output actions? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Answered my own question. Turns out the inching time for binary outputs represents an overall timeline in seconds from 0 in which the level reverts back to previous state. So for example if you wanted to rapidly toggle a relay three times and ending in the off position you would need something like the following:
Where the GPIO pin being toggled is 12, and the toggle occurs every quarter of a second. |
Beta Was this translation helpful? Give feedback.
Answered my own question. Turns out the inching time for binary outputs represents an overall timeline in seconds from 0 in which the level reverts back to previous state. So for example if you wanted to rapidly toggle a relay three times and ending in the off position you would need something like the following:
{"r":[[12,1,0.25],[12,0,0.5],[12,1,0.75],[12,0,1],[12,1,1.25]]}
Where the GPIO pin being toggled is 12, and the toggle occurs every quarter of a second.