This driver creates a device that can be used to (1) track the time (seconds, minutes, hours, days, weeks) that a switch is ON, and (2) implement a simple counter based on button presses (can increment or decrement).
This may be of help to those who are trying to move webcore pistons to standard SmartThings automations.
For further information on installation and use, see my README file.
My thanks to @mooch91 for the original request for this function, and to @Sakari and @blkwll for also testing and providing feedback.
Nice, thanks @TAustin . Do you know of an edge device that has a timer function that turns on every x minutes and then turns off and then repeats? I’m looking for something to duplicate having a device cycle on for 10 minutes, then stay off for 50, etc etc.
Hi @TAustin, I would like to have the ability to set a countdown option, “When turned on, turn off after X seconds/min/etc” but I want to set this value in automation as a dynamic value.
For example, I want to set the countdown value based on an expression I’m calculating in Sharptools, and for the switch to be “on” for that set time value.
Your timer driver is terrific! Works very well. My use case is to monitor the sump pump in my basement. I use leak sensors but the timer lets me see the past cycle time and determine if there could be a problem before I flood. I use a power monitor to know when my pump runs and then reset the timer. I capture the previous time using routines to compare to the current. If the cycle time changes too much I send an alert. If the ability to save the previous timer value before a reset was there my approach would be seamless and need only your driver to manage everything! I could simple compare the current value to the saved previous value in a routine. Ex) If previous<10 and current=30 ALERT. Not sure if a previous value is much use to others but would be great for me!!!