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.

How to use From Last Run Time?

Featured Replies

Posted

I'm a long-time ISY Admin Console user struggling with the "From Last Run Time" statement. This is the first time I've tried using it. I'm trying to create a simple program that sets a variable to 1 for half an hour and then 0 for the next half hour. Repeat every hour all day. I've tried different variations of the following code but it doesn't behave I think it would. Or I don't know how this works in plain English. The current version (below) turns on for 30 minutes and then off for 60 minutes.

DEHUM Toggle - [ID 0062][Parent 0057]

 If

        From    Last Run Time for 'DEHUM Toggle' +  1 hour

        For      30 minutes

 

Then

        $sDehumidifierOn  = 1

        $sDehumidifierOn Init To $sDehumidifierOn

 

Else

        $sDehumidifierOn  = 0

        $sDehumidifierOn Init To $sDehumidifierOn

A previous version, shown below, sets the variable to 1 and just leaves it that way forever. I can see from the status log that the program runs every hour, but never sets the variable to 0.

Can anybody please explain the thinking on how this "From Last Run TIme" is supposed to work? In the past I had just hard coded all the half hour intervals, but I thought I could come up with something shorter and more succinct. Alas it is fighting me. No combination of times in the command seems to work.

(For those that are curious, I like to run my dehumidifier for just half of every hour so that it has time to defrost between runs.)

Thanks in advance!

Edited by IndyUDIuser

  • Author

Sorry, forgot to post the previous version:

DEHUM Toggle - [ID 0062][Parent 0057]

 

If

        From    Last Run Time for 'DEHUM Toggle' +  30 minutes

        For      30 minutes

 

Then

        $sDehumidifierOn  = 1

        $sDehumidifierOn Init To $sDehumidifierOn

 

Else

        $sDehumidifierOn  = 0

        $sDehumidifierOn Init To $sDehumidifierOn

A separate program turns the dehumidifier on or off based on the value of $sDehumidifierOn.

Create an account or sign in to comment

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.