Help troubleshooting a door knocking piston


#1

1) Give a description of the problem
I would like to eliminate phantom notifications every time the door opens.

2) What is the expected behaviour?
notify me if there are 2 acceleration events in 45 seconds except when the door opens

3) What is happening/not happening?
I am getting notifications almost every time the doors opens/closes

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full
|+1ms |╔Received event [Front Door].contact = closed with a delay of 260ms|
|—|---|
|+64ms |║RunTime Analysis CS > 12ms > PS > 4ms > PE > 48ms > CE|
|+66ms |║Runtime (41624 bytes) successfully initialized in 4ms (v0.3.110.20191009) (64ms)|
|+67ms |║╔Execution stage started|
|+78ms |║║Comparison (enum) active is (string) active = true (2ms)|
|+82ms |║║Condition #100 evaluated true (9ms)|
|+82ms |║║Cancelling statement #98’s schedules…|
|+83ms |║║Condition group #98 made progress up the ladder, currently at step 2 of 2|
|+84ms |║║Cancelling statement #98’s schedules…|
|+85ms |║║Cancelling condition #98’s schedules…|
|+86ms |║║Condition group #98 evaluated true (state changed) (15ms)|
|+87ms |║║Cancelling condition #97’s schedules…|
|+88ms |║║Condition group #97 evaluated true (state changed) (17ms)|
|+93ms |║║Comparison (dynamic) Front Door is_equal_to (dynamic) Front Door = true (1ms)|
|+95ms |║║Condition #102 evaluated true (5ms)|
|+99ms |║║Comparison (enum) closed is (string) closed = true (1ms)|
|+100ms |║║Cancelling condition #107’s schedules…|
|+101ms |║║Condition #107 evaluated true (5ms)|
|+102ms |║║Cancelling condition #101’s schedules…|
|+103ms |║║Condition group #101 evaluated true (state changed) (14ms)|
|+105ms |║║Cancelling statement #66’s schedules…|
|+121ms |║║Executed virtual command sendPushNotification (13ms)|
|+126ms |║║message Pushed|
|+127ms |║║Executed virtual command log (1ms)|
|+134ms |║║Comparison (enum) closed is (string) open = false (1ms)|
|+135ms |║║Cancelling condition #109’s schedules…|
|+136ms |║║Condition #109 evaluated false (5ms)|
|+137ms |║║Cancelling statement #108’s schedules…|
|+138ms |║║Cancelling condition #108’s schedules…|
|+139ms |║║Condition group #108 evaluated false (state changed) (9ms)|
|+140ms |║║Cancelling condition #29’s schedules…|
|+141ms |║║Condition group #29 evaluated false (state changed) (11ms)|
|+143ms |║╚Execution stage complete. (76ms)|
|+144ms |╚Event processed successfully (144ms)|

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

You may find some inspiration (or solutions) in this older thread


#3

I did.
I used that one for my first try, then i realized that closing/locking and unlocking/opening was being capture as triggers.

I modified it, following other examples until i couldn’t troubleshoot it anymore, due to my lack of knowledge.

it has the same principle, capture 2 variables, if var1 == var2, then send message, in this case i wanted to flush one of the variables when the door is open, and make it var1 != var2 and avoid the notification, to no avail.


#4

This has a lot of issues. Since you have no triggers, everything is a trigger. That means you have three identical triggers (lines 24, 27 & 44) in the same piston so they will all try to execute at the same time every time which is likely to act unpredictably.


#5

@guxdude
yes I agree with you.
Any tips on how to fix it / improve it?

I also noticed that it sends less notifications when I use the door, but I rather hunker down in a cave and build a Jarvis than tell my wife that she is using the door wrong. :slight_smile:

in the meantime I will install, as soon as possible, an event logger smartapp to analyze the data.


#6

LOL… Yes… Number one rule of Smart Home programming:

Keep the wife happy!