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

If you have a feature you'd like to see in Indigo, post it here. Others can refine the idea if they like. Please keep each topic to one feature or a closely related set of features and don't add other unrelated requests to an existing topic. Use the Hardware Support Requests forum below to request support for some bit of hardware - but be sure to check the 3rd Party Plugins Forum first though to make sure there isn't already a plugin for it.
User avatar
SpencerJRoberts
Posts: 256
Joined: Sun Dec 09, 2012 12:07 pm
Location: Mountain View, CA

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

Post by SpencerJRoberts »

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 :)
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

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

Post by howartp »

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.
User avatar
SpencerJRoberts
Posts: 256
Joined: Sun Dec 09, 2012 12:07 pm
Location: Mountain View, CA

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

Post by SpencerJRoberts »

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.
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

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

Post by howartp »

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.
Post Reply

Return to “Feature Requests”