Edge device for tracking time duration or count

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.

6 Likes

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.

Nifty driver!

Couldn’t you do that with an edge driver with switch capability and a couple routines? I think all of those conditions run local on rules api now.

@johnconstantelo Yes @TAustin has virtual switch that does that. It has option to go to previous state after set time. In your case 600 seconds


Just add routine to turn it on after 10 minutes
You need only one routine.
This way is local

I always test with smaller time period, like 6 seconds, and then adjust to needed time

@Automated_House if you use delay in If condition it’s not local yet

1 Like

Happy to help, as always. And more I test more I learn.:blush:

This is awesome, thanks!

1 Like

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.

1 Like

This could be potentially added to Virtual Calendar by @Mariano_Colmenarejo

1 Like