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.

Is there a countdown timer function in the isy ?

Featured Replies

Posted

I want to be able to start a timer and read it's status in a small program.

satwar-

 

No. But this functionality can be achieved with a few small programs depending on the resolution you are looking for. Anything more granular than 1 second is unlikely. Minutes are easy.

 

Here is an example:

 

Define a state var for your timer value

 

s.Timer = 10

 

Program: Timer Countdown

 

If s.Timer > 0

Then
  wait 1 minute
  s.Timer =- 1

Else

 

The value of s.Timer will decrement once per minute.

 

Program: Timer Expired

 

If Status LampLincDimmer is On
  And s.Timer =0

Then
  Set LamplincDimmer Off

Else

 

-Xathros

satwar-

 

I should point out that the Wait function is really a countdown timer but unless used in conjunction with a counter variable as in the example above, there is no way to check on it's progress. I could have achieved the same result with:

 

If Status LamplincDimmer is not Off

Then 
  Wait 10 minutes
  Set LampLincDimmer Off

Else

 

Only difference here is that we can't tell how much of the timer remains during the 10 minute delay.

 

-Xathros

  • Author

Your first example was perfect for my project. I run a macro in mControl which writes a starting value (60 minutes) for S.Timer in ISY. ISY executes the countdown function. ISY uses countdown timer value to make further decisions.

 

Worked perfectly.

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.