Random & every other hour rule

Hi there,

I am looking for a way to turn one of my devices ON for an hour and OFF for an hour without having to write 12 rules to work only during the 12 hours of the day. Is there a way I can just make one rule to turn the device ON/OFF every other hour? A Random rule could also work for me. Like randomly the device comes on for 15/30 min at a time. Thanks!

Check out Tim’s Occupancy light Simulator, it might do what you need.
https://github.com/tslagle13/SmartThings/tree/master/Occupancy.Light.Simulator

1 Like

Thank you very much for your prompt response Dave. However, I am super new to this product. Where would I start learning where and how to add all this code you sent me? I can play around with it editing to my like, however, I need a head start. Where do I learn more about advanced programming on the hub?

You basically have to dive in and learn by trying it. Login in to the IDE, https://graph.api.smartthings.com, go to My SmartApps. Click on New SmartApp, then click on Code tab. Paste the source code there, and click on Create. Yes, you can edit it to customize it or modify it. After editing (if any), click on Save, and then Publish – For Me. The SmartApp will then be available in the mobile app under the + to add new things, slide all the way to the right to My Apps.

Also, there are many sample apps available by clicking Browse SmartApps in the upper right corner when the edit SmartApp window is open.

2 Likes
1 Like

Dave, I started adding the Nest using your link. And there’s a great set of instructions there, I did it all, up to the 5th step. I cannot, for the love of God, find the Preferences next to Edit on My Devices to add the nest serial number. Any ideas where I might be mistaken? Thanks!