Action Request: "Execute Delayed Actions for Trigger/Device"

Posted on
Sat Apr 25, 2015 9:57 pm
SpencerJRoberts offline
User avatar
Posts: 256
Joined: Dec 09, 2012
Location: Mountain View, CA

Action Request: "Execute Delayed Actions for Trigger/Device"

Not sure if this has been requested before but the subject says it all, there are situations where instead of removing delayed actions I want to execute THEN remove delayed actions for a trigger. If anyone has a fancy way of doing this with scripting I'd love to hear it, but my novice programming brain can't figure one out :)

Posted on
Sun Apr 26, 2015 12:12 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Action Request: "Execute Delayed Actions for Trigger/Dev

Can you explain your scenario a bit?

I understand what your asking, but can't think of an immediate simple solution.

Once the Indigo API can modify schedules, you could use that - delayed actions are simply temporary schedules after all.

I've an idea from another thread but I don't think it applies in this scenario.

Posted on
Sun Apr 26, 2015 12:34 am
SpencerJRoberts offline
User avatar
Posts: 256
Joined: Dec 09, 2012
Location: Mountain View, CA

Re: Action Request: "Execute Delayed Actions for Trigger/Dev

My scenario is that I have scripting that runs random lights while the home is unoccupied and if it's dark out. These lights are turned on via python with the duration parameter so they auto-off after random timings. When someone arrives home I remove the delayed actions but depending on the timing, there may be lights on from the script, and now without the delayed actions they just stay on. By now you are probably thinking "just leave the delayed actions and let them take care of themselves!", but the problem is that then if we are in a room where a light was on from the script the light will just turn itself off sometime shortly after arriving while we are trying to...see things!

I realize that I could execute an "All Lights Off" command whenever anyone arrives home, before turning on the lights we DO want on when we arrive, but with 25+ lights that's not terribly fast over Insteon.

Posted on
Sun Apr 26, 2015 12:44 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Action Request: "Execute Delayed Actions for Trigger/Dev

Ok, two options spring to mind.

1) Use Python to iterate through all Lights-that-are-on and issue the Off command.

2) Use a virtual device/group (I can't recall which), add the lights which are controlled by the script to it, and Save its state with the lights in your desired position (ie mostly off). Send the TurnOn command to the virtual thing and it will put the lights into the saved state.

3) In the UI, you can overwrite a delayed action time with another; if you can do this in script, just overwrite the delay with one for a small number of seconds.

You say AllLightsOff will be slow - depending how many lights are in this script compared to your total number of lights, nothing is going to be very quick here - all we're ultimately doing is sending AllLightsOff but manually. It just depends how many we're talking about and which option you pick.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron