Setting up some timers to control an exhaust fan. Have made 2 action groups that set the timer duration and
start the fan, one for 2 min. and the other for 5 min. Have two buttons on the control page to start the timers.
All works and I can restart a running timer by clicking the control page button. With the 2 min timer running
hitting the the 2 min button the duration resets to 2 mins. With the 2min running hitting the 5min resets
the duration to 5 min and shuts down the fan as expected.
However with the longer 5min timer running hitting the 2 min button the timer goes inactive the duration
goes to 5 min. Hitting the 2min button a second time the timer starts with the duration of 2 min.
Here is the script I use to set the timers, the only difference between the two actions is the duration
setting. Have tried the startTimer and resumeTimer and restartTimer but have not got it to work.
#STOP TIMER
tId = "com.perceptiveautomation.indigoplugin.timersandpesters"
timerPlugin = indigo.server.getPlugin(tId)
if timerPlugin.isEnabled():
timerPlugin.executeAction("stopTimer", deviceId= 1759204718)
#SET TIME
tId = "com.perceptiveautomation.indigoplugin.timersandpesters"
timerPlugin = indigo.server.getPlugin(tId)
if timerPlugin.isEnabled():
timerPlugin.executeAction("setTimerStartValue", deviceId= 1759204718, props={'amount':'2', 'amountType':'minutes'})
#START TIMER
tId = "com.perceptiveautomation.indigoplugin.timersandpesters"
timerPlugin = indigo.server.getPlugin(tId)
if timerPlugin.isEnabled():
timerPlugin.executeAction("startTimer", deviceId= 1759204718)
Thanks for you help
Elwood