Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Water feature random run times

Featured Replies

Posted

I've written a few simple programs for the ISY, but my knowledge is no where near some of yours. So I thought I would just ask for help instead of struggling to figure this out.

 

In a nutshell, we have a water feature in our backyard and I would like to have it run basically at random during the day.

 

So, for example, let's say:

* I only want it to run between 8 am and 10 pm

* Run times and off times are random

* When it does run, I want it to run at least 20 minutes, but no more than 60 minutes

* When it is off, I want it to stay off for at least 30 munutes, but no more than 90 minutes

* And, if possible, it only runs for a total of 4 hours a day (this is not that important, but thought I would throw it in as a wish list)

 

If someone could at least give me the basics as to how to approach this, I would really appreciate it.

If

       From    Sunset  + 20 minutes

       To       2:00:00AM (next day)

Then

       Wait  20 minutes  (Random)

       Set 'Bathroom Vanity' On

       Repeat Every  0 seconds

          Wait  20 minutes 

          Wait  20 minutes  (Random)

          Set 'Bathroom Vanity' Off

          Wait  20 minutes 

          Wait  20 minutes  (Random)

          Set 'Bathroom Vanity' On

Else

       Wait  15 minutes  (Random)

       Repeat 3 times

          Set 'Bathroom Vanity' Off

          Wait  2 seconds (Random)

 

I use this code to create the lived in look at my house. You could use similar code to control your water feature.

 

Just set the proper time parameters in the if.

 

The random wait times create your random feature. The wait times without random insure minimum runtimes.

 

 

Sent from my iPhone using Tapatalk

Very cool. If I may ask, why the 3 repeats in the "else"?

I have a bunch of those programs that run when I am in 'Away' mode. As such, the final off time is real important because I may not be home for a long time to see a light stuck on. If the command is missed because of a collision with another event etc. the light would stay on till the next night. As I am not home during this 'Off' event, I figured why not throw some repeats in there just to make sure. Mostly cause it is so easy.

  • Author

Thanks Illusion. That's probably WAY simpler than what I would have come up with. :D

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.