SmartThings Community

Device on for n minutes per hour?

I have a Peanut pocket socket that I bought primarily as a Zigbee relay.

Now I have an application where I’d like to turn the socket on for some number of minutes out of each hour. Exact schedule isn’t important, just an interval in each hour, 24 hours, 7 days a week.

It’s not obvious how I can do this.

I’m not sure what’s available in the new V3 app custom automation creator for this. There might be something there.

In the classic V2 app, it’s straightforward although there is a little setup to do. :sunglasses:. You just set up a virtual switch to act as a timer and then daisychain them.

So real switch comes on and you use the power allowance feature to have it turn itself off after seven minutes.

Then you have the real switch turning off trigger the virtual switch to come on, and set up a power allowance feature on the virtual switch to turn itself off after 53 minutes.

Then you have one more rule to have the real switch turn on when the virtual switch turns off.

This will create an infinite loop where virtual switch comes On for 53 minutes (with no result in the real world, it’s just acting as a timer). It turns itself off. Real switch comes on for seven minutes then turns itself off. Real switch turning off triggers the virtual timer to come back on for the next 53 minute period. And so on.

You could also use two virtual switches with the real switch mirroring only one of them which would then give you the option of turning the real switch on in other ways and leaving it on for more than seven minutes.

There are lots of other ways to do this, including webcore, so it just depends on what you want.

Or, like I said, it might be an option in the V3 app, I don’t know that one very well.

Here’s the wiki article on creating a virtual timer in the V2 app that should give you more ideas:

1 Like

Time to hit WebCore :slight_smile: Very easy to do. Here is my pool controller which has most of what you want; just delete what you don’t need. You can import this with the key in the picture.


Thanks, couple of things to try.

So far I haven’t had to resort to WebCore. So I’ll most likely use @JDRoberts’s suggestion.

1 Like

Webcore will give you a lot more options, but The daisychain should work as well if all you need is a cycling timer for a fixed interval. Up to you. :sunglasses: