Jump to content

iMeter Solo "query loop" has to be kickstarted...


TanerH

Recommended Posts

Posted

So, I was playing around with setting up a loop that will query my iMeter Solo every 5 min, so that there is always a fresh value, since I plan to set up a cacti monitor to poll its status via the REST interface, later...

 

But... it doesn't "start" unless I force it to run initially (right-click, Run (If))... Am I missing something? :-)

 

This is the program:

 

If
       Status  'iMeter Solo' is Responding

Then
       Set 'iMeter Solo' Query
       Wait  5 minutes
       Run Program 'iMeter Update' (If)

Else
       Wait  15 minutes
       Run Program 'iMeter Update' (If)

Keep the iMeter value freshly-updated.

I have the Else clause to just prevent a useless query if the Meter happens to be unplugged, with a slightly longer delay before it checks again.

 

Is the "is Responding" not a good condition for the 'If'? Does it not "trigger" except when there is a state change, or something? (Are the If statements only edge-triggered?)

 

I'm new to programming the ISY (but not new to programming, in general -- I'm a software engineer), so I may be missing something fundamental about how the If clauses work :-)

 

Thanks!!

 

-Taner

Posted

The "If Status" requires a change in Status to trigger a Program. Since the Status of the iMeter Solo is normally "is Responding" there is no change in Status to cause the Program to trigger. Setting the Program option to "Run at Startup" drives the Program when the ISY starts. Could also add a specific Time trigger to start the Program.

Posted

I have iMeters that I query at regular intervals. I do it like this:

 

If:

(nothing)

 

Then:

Repeat every 15 minutes

query iMeter

 

Else: Nothing

 

Set to run at startup.

 

 

That simple.

Guest
This topic is now closed to further replies.

×
×
  • Create New...