Jump to content

ISY construct, 'Wait Until' or time bomb?


larryllix

Recommended Posts

Currently we have a relative time Wait construct line. Adding an absolute time option to the Wait function would be a nice addition and should fit into the current pulldown menu styles ISY already possesses.

This would allow processes to continue at an absolute time within the same program logic.  An exception to previous application style would be to allow further processing if the absolute time is in the past. (do not wait forever for a past time event)

Eg: Notifications at more convenient times ( != sleeptime )

Program Heartbeat Failed [enabled]
If
        device.Heartbeat is switched On
      OR
        device.Heartbeat is switched Off
Then
       set $sHeartbeat_good = $cTRUE
       Wait 25 hours
       set $sHeartbeat_good = $cFALSE
       Wait Until 8:00 AM ( same  next day )
       send notification to Larry "Heartbeat failed"
Else
       ------

 

Another further option could be full calendar 'Wait Until'.
Eg:
    Wait Until 8:00 AM Dec 25, 2019
but I can see philosophical problems with keeping a variable stack full of 'Wait Until's to carry over through power failures, reboots, and perhaps DST problems. What happens if they miss event triggers, while the ISY is powered down? May be best handled with variables the long way by the ISY programmer, as needs may vary and be more dependant on each application.

 

Thanks!!

Link to comment

I do this by splitting into a few programs, it works well.  Maybe not as sleek of a program, but very effective.

I believe the reason for this restriction is due to the RTOS under the hood of the ISY, and that's exposed directly to the end user in the program functions being restricted in direct functionality.

Link to comment

I toyed with this idea with the original time node server (never ported to Polyglot 2) -- but couldn't figure out what value it added over just using an ISY schedule.  What use case do you have in mind that you can't do equally well with an ISY schedule in a program?

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...