Piston will not resume from paused state after set time


#21

Also, one tip for testing is you can reduce that 3 minute wait to 15 seconds or so…
This makes testing much faster, and you can put it back where you want it when you are happy with it.


#22


#24

You right corrected above
Sorry :innocent:


#25

This is current screen shot after all those changes above


#27

Next to the WITH… the Task Cancellation Policy should be Never (N)…
Not C/P


#28

Yes, Keypad 8 is Zigbee button and Motion sensor is Zigbee as well, they are about 24" a part


#30

Thank you, corrected ( had hard time to change it, didn’t want to save for some reason)
Will test
Thanks

EDIT: THAT DID IT !!! :grin:

Now I would love to know why it refused to cooperate, but I’m afraid that explanation would be way too complicated :wink:


#31

Quick explaination about Task Cancellation Policy here:
https://wiki.webcore.co/Task_Cancellation_Policy


#32

Got it working using WCmore’s help but not sure what did you mean ? What other piston?


#33

Long story short:
The latter part of that block of code stopped running because the button was no longer being pressed


#34

That sounds easy! …now I just have to remember to use it when I have problem next time :slight_smile:

THANKS TO ALL OF YOU FOLKS!


#35

I was wondering if you had a link to the Zigbee button you use?
I am looking to add a few around my place


#36

Sure, using bunch of Xiaomi zigbee aquara devices with custom device handlers from the ST forum
Purchased buttons for about $10 from BestGear but they are available from other surces as well.
Device handlers


#37

Well, I followed your link and read the first 100 posts, but I cannot find any reference to an 8 button “Xiaomi zigbee aquara device”

Nothing on the BestGear website either


#38

Here :slight_smile:
https://www.gearbest.com/aqara-_gear/
But look around, you can get these dirt cheap, prices change often
Device handlers can be found here

Using these for over a year with great success.


#39

Hmmm, looks like there is another problem
If you leave the bathroom before the Auto light pistons resumes, then after it does resume without anyone there the light will never turn off until someone enters the bathroom and triggers the motion sensor, only after that the count down delay starts again to turn the light off.


#40

I wonder if you could switch around your “Bathroom Basement Auto Light” piston like this:

IF Motion sensor is inactive
THEN WITH Bulb
DO Wait 90 seconds
Turn off
END With
ELSE WITH Bulb
DO Set level to 28%

I have not tried this inverted logic, but it looks like it would work


#41

Will give it a try
Thanks!

EDIT:
No difference :frowning:

Logs

‎4‎/‎2‎/‎2018‎ ‎1‎:‎00‎:‎38‎ ‎PM +636ms
+1ms
╔Starting piston… (v0.3.104.20180323)
+293ms
║╔Subscribing to devices…
+458ms
║║Subscribing to Basement Bath Motion.motion…
+835ms
║║Subscribing to Bath Basement Light…
+836ms
║╚Finished subscribing (560ms)
+902ms
║Comparison (enum) inactive is (string) inactive = true (10ms)
+907ms
║Cancelling condition #9’s schedules…
+909ms
║Cancelling condition #1’s schedules…
+924ms
║Comparison (enum) inactive is (string) active = false (2ms)
+926ms
║Cancelling condition #5’s schedules…
+927ms
║Cancelling condition #2’s schedules…
+940ms
╚Piston successfully started (938ms)
‎4‎/‎2‎/‎2018‎ ‎12‎:‎56‎:‎38‎ ‎PM +882ms
+107ms
╔Stopping piston…
+203ms
╚Piston successfully stopped (96ms)
4‎/‎2‎/‎2018‎ ‎12‎:‎56‎:‎34‎ ‎PM +91ms
+1ms
╔Received event [Basement Bath Motion].motion = active with a delay of 124ms
+113ms
║RunTime Analysis CS > 14ms > PS > 36ms > PE > 63ms > CE
+115ms
║Runtime (37399 bytes) successfully initialized in 36ms (v0.3.104.20180323) (113ms)
+116ms
║╔Execution stage started
+127ms
║║Comparison (enum) active is (string) inactive = false (2ms)
+129ms
║║Cancelling condition #9’s schedules…
+129ms
║║Condition #9 evaluated false (7ms)
+130ms
║║Cancelling condition #1’s schedules…
+131ms
║║Condition group #1 evaluated false (state changed) (9ms)
+138ms
║║Comparison (enum) active is (string) active = true (2ms)
+140ms
║║Cancelling condition #5’s schedules…
+140ms
║║Condition #5 evaluated true (6ms)
+141ms
║║Cancelling condition #2’s schedules…
+142ms
║║Condition group #2 evaluated true (state changed) (9ms)
+145ms
║║Cancelling statement #3’s schedules…
+159ms
║║Executed physical command [Bath Basement Light].setLevel([25]) (8ms)
+160ms
║║Executed [Bath Basement Light].setLevel (10ms)
+165ms
║╚Execution stage complete. (49ms)
+166ms
╚Event processed successfully (166ms)


#42

Would it make sense to ad turning off the light if there is no motion just after the lin where it resumes the auto light piston, or this would later override rules in that piston?


#43

I was originally thinking something like that, but I didn’t suggest it because your piston “Bath Basement Light 100% override” ends with the light at 28%… We might have to rethink our entire logic.

Although, before starting over, I would love it if you tried my suggestion in post #40 above. You added an extra IF statement that might be messing with it.

Here is my test for “Bath Basement Auto Light”

IF Motion sensor is inactive
THEN WITH Bulb
DO Wait 90 seconds
Turn off
END With
ELSE WITH Bulb
DO Set level to 28%

Notice the only IF is at the beginning. In the ELSE section is is simply:
WITH Bulb
DO Set level to 28%

It is not a guarantee, but I do the inverted version of this all the time, and it works like a charm.