Please help me avoid getting spammed by notifications! :)


#21

As you know, I struggle with WAITS. SO, during a WAIT, I presumed that any events that act on a subscribed trigger would be ignored during that piston’s WAIT. So in the OP situation, the blinking light would be “ignored” during the WAIT. Then, once the WAIT was finished, if the trigger fired again (the light was still blinking), a PUSH and another WAIT would occur, and the process repeats until the light stops blinking.


#22

OK, I see how you are…

You like my silly example, but had no interest in my insightful and in-depth post above it.

LOL


All jokes aside, if a blink from his light triggers the piston once…
then every blink will trigger that piston
(no matter how the piston is worded)

This concept has nothing to do with waits really. Each time the “Device’s attribute changes”, the piston starts over at the top, and I drink another :coffee:.


Just to clarify… This does not happen!
Each event will fire again from the top regardless.
(even the opposite of the event will trigger at the top)


#23

Ok, yes, I did favor the espresso code…:grin: So what happens to the piston that has the wait when a new trigger comes in? It’s cancelled and the new execution takes its place?

Ie, the piston that is waiting is not placed into a queue and finish later. That execution is cancelled, and the “new” one (from the most recent trigger) takes its place. Of course unless the programmer codes for such an event.


#24

The same trigger always starts over at the top…

If you are asking what happens to the previous instance that was WAITING?

Well, that answer depends entirely on the wording of the code… and can easily be an hour long conversation, with exceptions to nearly every statement, LOL

But the quick & dirty answer usually lies with TCP settings.


#25

Even though it feels like exactly what I was using in a previous iteration, but I’m happy to try! Also testing out @Alwas 's solution at the same time. I thank you both very much.


#26

Sorry to get a bit off topic on your thread…


Please only test out one piston at a time.
All other related pistons should be paused when testing a new piston.
(so they don’t unintentionally step on each others toes)


#27

Oh by all means man… I found the grandfather’s clock very appropriate! :slight_smile: I really appreciate your help. Indeed, I am only testing one at a time… should have been more clear. Thank you!


#28

@vPeteWalker Apologies if I jump in again on your thread but @WCmore has made some quite extraordinarily definitive statements, so absolutist in their conviction, and contrary to my own, that I feel compelled to reply to them, luckily I’m not the litigious kind. :rofl:

So out of respect to you @WCmore I went to the trouble of making a video (edit-deleted) showing clearly how my above posted piston works, with the local variable {Volume_change} stays false for 5 minutes and works, even while clicking Switch 52 on/off and …

07/06/2020, 07:57:23 +192ms
+261ms	║Volume_change changed to true after 5 minutes
07/06/2020, 07:52:18 +532ms
+6349ms	║Done 9 to 1300
07/06/2020, 07:51:36 +176ms
+218ms	║Volume_change changed to true after 5 minutes
07/06/2020, 07:46:30 +39ms
+6347ms	║Done 9 to 1300

So using wait’s for local variables within pistons, like in my posted piston, or my suggestion to the OP works. Maybe we need the “Master of Disaster” to make a final pronouncement!


#29

LOL… I won’t make “extraordinarily definitive statements” without testing first…
(you will see my time stamps, but it feels silly trying to “prove” it to you)

… For the record, I never said the variable would change, I said the commands would not follow thru after the STAY… regardless of what the variable does.

Here is a simple piston, using your code…
(I normally code differently, but I wanted the test to be fair)

In this test, I flipped Switch 1, to start the piston normally. During the STAY time period, I flipped the totally unrelated Switch 2. (different device, different block of code, with nothing crossing over)

If you look closely, you will see no mentions of schedules after the :37:21 interruption.
(the second unrelated trigger was where it aborted)

I am not going to waste time showing screenshots of the other 3 scenarios, but I can assure you… Flipping either lightning bolt (Switch 1 OR Switch 2) will prevent the STAYS from following thru…

I think I will stand behind my earlier statement.


#30

:joy: Oh my goodness! I can’t actually believe it! Sticking to what we’ve been talking about (I feel introducing “similar” code, with ‘else’s’, is confusing and a distraction) and I don’t how to say this gently, but you’re wrong. And I won’t insist on an apology from you WCmore, because I understand how human relationships and even geopolitics can be destructive when people stick to certitudes of opinion, but an apology in private would not be mentioned again. :stuck_out_tongue_winking_eye:

In order for this not to go to the Supreme Court, I am openly and freely sharing the logs from my plus eighteen month piston that “doesn’t work”, where I continuously click switch 52, and the local variable stays doesn’t break.

07/06/2020, 09:32:31 +364ms
+0ms	╔Received event [Home].time = 1591515152141 with a delay of -777ms
+252ms	║Volume_change changed to true after 5 minutes
+257ms	║Volume_change changed to true after 5 minutes
+260ms	╚Event processed successfully (260ms)
07/06/2020, 09:32:21 +896ms
+1ms	╔Received event [Zzzzz MUTE MUTE].switch = off with a delay of 150ms
+256ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 9:32:32 AM CEST (in 9.99s)
+347ms	╚Event processed successfully (346ms)
07/06/2020, 09:31:43 +602ms
+2ms	╔Received event [Zzzzz MUTE MUTE].switch = on with a delay of 189ms
+304ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 9:32:32 AM CEST (in 48.236s)
+315ms	╚Event processed successfully (315ms)
07/06/2020, 09:30:19 +407ms
+1ms	╔Received event [Zzzzz MUTE MUTE].switch = off with a delay of 174ms
+349ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 9:32:32 AM CEST (in 132.386s)
+360ms	╚Event processed successfully (360ms)
07/06/2020, 09:29:18 +231ms
+0ms	╔Received event [Zzzzz MUTE MUTE].switch = on with a delay of 112ms
+255ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 9:32:32 AM CEST (in 193.655s)
+266ms	╚Event processed successfully (266ms)
07/06/2020, 09:28:44 +116ms
+1ms	╔Received event [Zzzzz MUTE MUTE].switch = off with a delay of 176ms
+391ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 9:32:32 AM CEST (in 227.635s)
+401ms	╚Event processed successfully (401ms)
07/06/2020, 09:28:07 +718ms
+1ms	╔Received event [Zzzzz MUTE MUTE].switch = on with a delay of 172ms
+284ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 9:32:32 AM CEST (in 264.14s)
+337ms	╚Event processed successfully (337ms)
07/06/2020, 09:27:25 +723ms
+1ms	╔Received event [Zzzzz MUTE MUTE].switch = off with a delay of 120ms
+2266ms	║Done 9 to 1300
+6382ms	║Done 9 to 1300
+6460ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 9:32:32 AM CEST (in 299.959s)
+6469ms	╚Event processed successfully (6469ms)

And if even more proof was needed, in my next post I’m going recreate exactly the same piston as the OP, with my suggestion’s of course, with logs, showing it working.


#31

And here are the logs, 1 minute wait, you can see I’m pressing the trigger button repeatedly during the wait, nothing happens, and the wait correctly changes the variable to false after 1 minute.

07/06/2020, 12:56:33 +388ms
+0ms	╔Received event [Home].time = 1591527393295 with a delay of 93ms
+152ms	║false variable changed to false
+155ms	╚Event processed successfully (155ms)
07/06/2020, 12:56:08 +955ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 159ms
+121ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:56:33 PM CEST (in 24.219s)
+139ms	╚Event processed successfully (138ms)
07/06/2020, 12:55:55 +212ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 157ms
+124ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:56:33 PM CEST (in 37.959s)
+135ms	╚Event processed successfully (134ms)
07/06/2020, 12:55:49 +144ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 774ms
+186ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:56:33 PM CEST (in 43.966s)
+200ms	╚Event processed successfully (201ms)
07/06/2020, 12:55:43 +348ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 117ms
+113ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:56:33 PM CEST (in 49.835s)
+124ms	╚Event processed successfully (124ms)
07/06/2020, 12:55:33 +165ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 200ms
+123ms	║(Variable Test #3) Dehumidifier FULL!
+134ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:56:33 PM CEST (in 59.997s)
+141ms	╚Event processed successfully (141ms)
07/06/2020, 12:55:27 +223ms
+0ms	╔Received event [Home].time = 1591527327175 with a delay of 47ms
+119ms	║false variable changed to false
+121ms	╚Event processed successfully (121ms)
07/06/2020, 12:55:05 +917ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 118ms
+107ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:55:27 PM CEST (in 21.151s)
+119ms	╚Event processed successfully (119ms)
07/06/2020, 12:54:49 +532ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 114ms
+106ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:55:27 PM CEST (in 37.537s)
+116ms	╚Event processed successfully (115ms)
07/06/2020, 12:54:43 +167ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 177ms
+215ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:55:27 PM CEST (in 43.793s)
+226ms	╚Event processed successfully (226ms)
07/06/2020, 12:54:36 +358ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 323ms
+110ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:55:27 PM CEST (in 50.707s)
+122ms	╚Event processed successfully (122ms)
07/06/2020, 12:54:27 +42ms
+1ms	╔Received event [Zzzz Remote Futon].button = pushed with a delay of 750ms
+126ms	║(Variable Test #3) Dehumidifier FULL!
+137ms	║Setting up scheduled job for Sun, Jun 7 2020 @ 12:55:27 PM CEST (in 59.996s)
+147ms	╚Event processed successfully (146ms)

#33

I have worked with STAYS for years, and have seen hundreds of variations…
Everything I said above is true, and I have seen time and time again…
(and you can import my piston, if you doubt me)

… but I can see now that your wall is up… There is no getting thru to you.

Sooo… I will not be wasting any more time chatting with you @Alwas,

I don’t want ego or arguments in my life…

Please, feel free to continue to believe whatever you like.


#34

If anyone is curious about the discrepancy…

  • The command STAYS is a trigger
  • Local variable changes can NOT be a trigger

By combining the two into one statement, it is treated as a condition.
(meaning that changing the variable will NOT trigger the piston)

You can see this more clearly if the STAY command was moved to the top.
(it would only function on the second run after a change)


#35

@vPeteWalker
Get the damn device start manually man:()))))
or lets get a drink:)))))
WebCore War III is about to start…:rofl::rofl::rofl::rofl:


#36

Thank you all very much for your help. I have been testing the solution from WCmore first (I flipped a coin) and it seems to be working perfectly. I watched and it only notified me once every X minutes. I’m so happy. I’m going to test Alwas’ solution next. Appreciate you all so much!


#37

I know you are joking, but I don’t understand! Clue me in, @ike2018!


#38

I will choose de-escalation over a war any day…


#39

You are the man… uhh… man! :slight_smile: Appreciate your help here, clearly you know what you are doing, and you have no idea what a monumental PIA this was for us. Thanks for diving in, and spending so much time going over this.


#40

Hi everyone. Hope you are all having a great week thus far!

Running into issues lately, and @WCmore I could use your help here, bud. I’ve changed zero since this started, not even looked at this piston sideways! The dehumidifier has been running, but I’ve walked by it several times in the past few days just doing other things in the basement, and noticed it was full but never notified me. I’ve been getting notifications from everything else via SmartThings without issue, it’s just this one thing that isn’t working. Here is everything I was able to copy/paste from the log window. I’m hoping this gives some insight as to why this is happening. If I should reduce the log setting from Full, please let me know. Thank you so much!

https://file.io/4iGFcTaZ


#41

pic

Please post logs in pure text here so I can see what you see…

(I’d probably also need to see a green snapshot of the piston as it was during the log events)