Piston Not Running When It Should?


#21

For the record, what I usually do is:

I only check the status of doors and windows at specific times or events…
(leaving the house… going to bed… before turning on the AC… etc)

I usually avoid making each open/close on/off into a trigger as you have done…
(IE: Mine only runs at a time I designate, or when I ask for a status)

This keeps all 10+ devices AWAY from being a trigger.


#22

This is why my earlier suggestions was to keep each piston at the quickest possible execution time. IE: The faster the piston completes the last line of code, the quicker the global variable is updated.

Time is also saved because you do not need to process the status on the doors when a light or fan changes… and you don’t need to check all the lights each time a door opens or closes.

Keeping triggers separate does wonders for speed and reliability!


#23

Thanks for the advice. I have split the device update IF statements into 2 pistons ( lights and fans are together as for now I only have 1 fan, and doors is the second one). I noticed another issue which I have resolved. If the If is set to switch is on, then it never empties the global variable. I have it setup now with an IF that checks for a switch change, then if it is on it saves it into a local, and sets it to a global. I also pulled out the part about the notify when in vacation and added it to this as well under the switch changes trigger. Then it looks to see if vacation mode is active and lets me know.

It does seem to be a lot more reliable so far, though we shall see what happens.
Thanks again for the advice, as a first time poster it has been helpful!