Jump to content

Query a device every 10 minutes


MikeB

Recommended Posts

Posted

What's the best way to query a device every 10 minutes?

 

Would something like this be OK:

 

If
       From    12:00:00AM
       To      11:59:59PM (same day)

Then
       Repeat Every  10 minutes 
          Set 'OfficeLight' Query

Else
  - No Actions - (To add one, press 'Action')

 

..or am I missing something more efficient?

 

Anyone have any sample code they'd like to share?

 

EDIT: CORRECTED CODE

Posted

Correction. This is the code I am testing/using:

 

If
       From    12:00:00AM
       To      11:59:59PM (same day)

Then
       Repeat Every  10 minutes 
          Set 'OfficeLight' Query

Else
  - No Actions - (To add one, press 'Action')

Posted

Hi Mike,

 

What's the difference between the two codes? In both cases, this should work fine.

 

With kind regards,

Michel

 

Correction. This is the code I am testing/using:

 

If
       From    12:00:00AM
       To      11:59:59PM (same day)

Then
       Repeat Every  10 minutes 
          Set 'OfficeLight' Query

Else
  - No Actions - (To add one, press 'Action')

Posted
What's the best way to query a device every 10 minutes?

 

Mike,

Out of curiosity, what do you use this for? Do you do this with several devices or have you found this specific device to not stay consistent with what the ISY is seeing?

Posted

Hello Mike:

 

I've never tried this, but how about if you eliminate the conditional time statement entirely, and only keep the "Then" statement.

 

Then, in the Program Summary, you change the program to "Run" instead of enable? Once you do that, won't the program just keep running?

 

 

Best wishes,

Posted
Then, in the Program Summary, you change the program to "Run" instead of enable? Once you do that, won't the program just keep running?

 

Hey Frank -

 

Thanks for the suggestion. I think that would work, but then if the ISY were rebooted it would not start - unless I set it to 'run at reboot'.

 

Anyone have any opinions on whether or not this would be a 'cleaner' solution?

Posted

Hello Mike:

 

Actually, I was going to suggest that "Run at Reboot" be used. But I haven't tried it to see if that option is selected if the program will run anyway, without the need for reboot. I would think that it would just wait for the next reboot.

 

Maybe you could first select "Run", then after the program starts executing, you could change it to "Run at Reboot", and it would continue to keep chugging along anyway, since you had already told it to Run. Then it would also restart after rebooting.

 

 

 

Or, the logic of the ISY may be set such that if you just set it up as "Run", it inherently knows to restart it at reboot.

 

I think that "Run at Reboot" may be more for programs that only need to run "unconditionally" at reboot, such as a program that turns something on or off only after a power failure or other ISY reboot.

 

If a program is simply set to "Run" all the time, I would think that even if the ISY rebooted, it would restart the program automatically.

 

I'm certain that Michel will be able to clarify this for us.

 

Best wishes,

Posted

Good idea Frank!

 

I believe the program will begin to run as soon as it is Saved. It did with my holiday lights cycle program. If that is the case it certainly should Run at Reboot.

 

Give it a shot, it can't hurt.

 

Rand

Posted

I could certainly be wrong, but my understanding that setting a program to RUN simply tells it to start running now, but doesn't necessarily set it to ALWAYS run.

Posted

I confirmed that this seems to be correct. I can set it to run, and it will run and stay running (since the THEN statements are continuous). But, if the ISY is rebooted it needs to be started manually.

 

Setting the program to 'run at reboot' causes the ISY to re-start the program when the ISY is rebooted, and it works like I hoped.

 

Thanks for the suggestion Frank! This feels like a 'cleaner' solution than putting a time value under IF since I want the program to always run.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...