Piston dosnt execute completely! stop when it want


#1

1) Give a description of the problem
I have a piston and today I notice that execute only 50%, after 2 hour ejecute again and dont execute completely about 90%… after an hour I test it again and works fine, now I test again and works fine, someone can help me?.
I see the log and I notice that there are some execution , is like the piston execute part by part, it happens on ohters too, from one part and the rest are about 11 seconds.

Attach the piston:

Log


#2

A wait of less than five seconds (*) is implemented as a busy wait, that is to say the code just loops around eating up time. A wait of five seconds or more is implemented by scheduling a wake-up and exiting the piston. When the piston wakes up it fast forwards and continues from where it left off. So when you have waits of e.g. ten seconds in your piston you will see a new task being scheduled for ten seconds time and the piston exiting and a new one starting. You have to be aware of this as when it wakes up it is a new instance, so for example it will reinitialise variables.

(*) It can be less than five seconds if there would be less than ten seconds of execution time available after the wait.

I haven’t read your piston, but it looks like your log probably starts with a wake up after a ‘wait’, then shows another wake up after a ten second wait, where it looks like the piston runs to completion, and then shortly after that is triggered again by changes to the value of a global variable which only requires a brief execution of the piston.


#3

not sure 100% but I’d split this single piston into 3-4 pistons.
Too much is happening for a single piston.

At least in my home, ever since I started using more pistons but each simple and doing less, efficiency went from 75-80% to 95%