1) Give a description of the problem
AduroSmart ERIA Dimmer switch is firing off multiple events for each up/down button press
2) What is the expected behaviour?
One push, one event. One long push, one long event
3) What is happening/not happening?
The ERIA is a four-button zigbee switch. The buttons are: #1 on, #2 UP, #3 DOWN, #4 off. Each button should be firing off a single event for a quick press, and a separate event for a long press. Instead, the behavior I am seeing is that the ON/OFF button behave correctly, but the UP/DOWN buttons appear to fire off anywhere between 1 and 4 events. Additionally, some of these events get stuck in a buffer somewere and get re-inserted back into the event stream at random times causing nondeterministic behavior in the switch response. I’m hoping it is just my code causing the issues and not the switch, because I really like the physicality of the thing.
The logs I attached are the result of pressing the UP and DOWN buttons one time each.
**4) Post a Green Snapshot of the piston
5) Attach logs after turning logging level to Full
6/12/2020, 6:52:19 PM +41ms
+0ms â•”Received event [Bathroom Speaker Control].button = pushed with a delay of 59ms
+10199ms â•‘RunTime Analysis CS > 96ms > PS > 10072ms > PE > 32ms > CE
+10200ms â•‘Piston waited at a semaphore for 9762ms
+10203ms â•‘Runtime (48055 bytes) successfully initialized in 10072ms (v0.3.110.20191009) (10202ms)
+10204ms â•‘â•”Execution stage started
+10211ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (0ms)
+10212ms â•‘â•‘Condition #24 evaluated false (4ms)
+10216ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (0ms)
+10217ms â•‘â•‘Cancelling condition #26's schedules...
+10218ms â•‘â•‘Condition #26 evaluated false (4ms)
+10221ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = true (1ms)
+10224ms â•‘â•‘Cancelling statement #30's schedules...
+10229ms â•‘â•‘Executed virtual command setVariable (2ms)
+10230ms â•‘â•‘Condition #29 evaluated true (11ms)
+10231ms â•‘â•‘Condition group #1 evaluated true (state did not change) (24ms)
+10233ms â•‘â•‘Cancelling statement #22's schedules...
+10238ms â•‘â•‘Calculating (string) Button evaluated to + (string) 3 >> (string) Button evaluated to 3
+10241ms â•‘â•‘Button evaluated to 3
+10242ms â•‘â•‘Executed virtual command log (1ms)
+10250ms â•‘â•‘Executed virtual command setVariable (1ms)
+10255ms â•‘â•‘Calculating (string) Grabbing volume from speakers, not piston, which is + (string) 18 >> (string) Grabbing volume from speakers, not piston, which is 18
+10258ms â•‘â•‘Grabbing volume from speakers, not piston, which is 18
+10259ms â•‘â•‘Executed virtual command log (1ms)
+10262ms â•‘â•‘Evaluating switch with values [[i:5:null:0, v:[t:integer, v:3, vt:string]]]
+10264ms â•‘â•‘Comparison (integer) 3 is (integer) 1 = false (1ms)
+10267ms â•‘â•‘Comparison (integer) 3 is (integer) 2 = false (1ms)
+10270ms â•‘â•‘Comparison (integer) 3 is (integer) 3 = true (1ms)
+10272ms â•‘â•‘Cancelling statement #16's schedules...
+10278ms â•‘â•‘Calculating (integer) 18 - (integer) 2 >> (integer) 16
+10282ms â•‘â•‘Executed virtual command setVariable (2ms)
+10287ms â•‘â•‘Comparison (integer) 16 is_less_than_or_equal_to (integer) 0 = false (1ms)
+10289ms â•‘â•‘Condition #42 evaluated false (4ms)
+10290ms â•‘â•‘Condition group #41 evaluated false (state did not change) (5ms)
+10292ms â•‘â•‘Cancelling statement #18's schedules...
+10431ms â•‘â•‘Executed physical command [Bathroom speakers].setLevel([16]) (136ms)
+10432ms â•‘â•‘Executed [Bathroom speakers].setLevel (137ms)
+10437ms â•‘â•‘Cancelling statement #35's schedules...
+10441ms â•‘â•‘Executed virtual command setVariable (2ms)
+10443ms â•‘â•šExecution stage complete. (240ms)
+10444ms â•šEvent processed successfully (10444ms)
6/12/2020, 6:52:18 PM +981ms
+1ms â•”Received event [Bathroom Speaker Control].button = pushed with a delay of 74ms
+10219ms â•‘RunTime Analysis CS > 18ms > PS > 10171ms > PE > 29ms > CE
+10219ms â•‘Piston waited at a semaphore for 10027ms
+10222ms â•‘Runtime (48057 bytes) successfully initialized in 10171ms (v0.3.110.20191009) (10220ms)
+10223ms â•‘â•”Execution stage started
+10230ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (1ms)
+10231ms â•‘â•‘Condition #24 evaluated false (4ms)
+10235ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (1ms)
+10236ms â•‘â•‘Cancelling condition #26's schedules...
+10237ms â•‘â•‘Condition #26 evaluated false (5ms)
+10241ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = true (0ms)
+10243ms â•‘â•‘Cancelling statement #30's schedules...
+10248ms â•‘â•‘Executed virtual command setVariable (3ms)
+10250ms â•‘â•‘Condition #29 evaluated true (11ms)
+10251ms â•‘â•‘Condition group #1 evaluated true (state did not change) (24ms)
+10252ms â•‘â•‘Cancelling statement #22's schedules...
+10258ms â•‘â•‘Calculating (string) Button evaluated to + (string) 3 >> (string) Button evaluated to 3
+10261ms â•‘â•‘Button evaluated to 3
+10262ms â•‘â•‘Executed virtual command log (1ms)
+10269ms â•‘â•‘Executed virtual command setVariable (2ms)
+10275ms â•‘â•‘Calculating (string) Grabbing volume from speakers, not piston, which is + (string) 18 >> (string) Grabbing volume from speakers, not piston, which is 18
+10278ms â•‘â•‘Grabbing volume from speakers, not piston, which is 18
+10279ms â•‘â•‘Executed virtual command log (2ms)
+10281ms â•‘â•‘Evaluating switch with values [[i:5:null:0, v:[t:integer, v:3, vt:string]]]
+10284ms â•‘â•‘Comparison (integer) 3 is (integer) 1 = false (1ms)
+10287ms â•‘â•‘Comparison (integer) 3 is (integer) 2 = false (1ms)
+10290ms â•‘â•‘Comparison (integer) 3 is (integer) 3 = true (1ms)
+10292ms â•‘â•‘Cancelling statement #16's schedules...
+10298ms â•‘â•‘Calculating (integer) 18 - (integer) 2 >> (integer) 16
+10302ms â•‘â•‘Executed virtual command setVariable (3ms)
+10307ms â•‘â•‘Comparison (integer) 16 is_less_than_or_equal_to (integer) 0 = false (1ms)
+10309ms â•‘â•‘Condition #42 evaluated false (5ms)
+10310ms â•‘â•‘Condition group #41 evaluated false (state did not change) (6ms)
+10312ms â•‘â•‘Cancelling statement #18's schedules...
+10451ms â•‘â•‘Executed physical command [Bathroom speakers].setLevel([16]) (135ms)
+10452ms â•‘â•‘Executed [Bathroom speakers].setLevel (137ms)
+10456ms â•‘â•‘Cancelling statement #35's schedules...
+10460ms â•‘â•‘Executed virtual command setVariable (2ms)
+10462ms â•‘â•šExecution stage complete. (239ms)
+10463ms â•šEvent processed successfully (10463ms)
6/12/2020, 6:52:13 PM +957ms
+2ms â•”Received event [Bathroom Speaker Control].button = pushed with a delay of 95ms
+10044ms â•‘RunTime Analysis CS > 24ms > PS > 9986ms > PE > 34ms > CE
+10045ms â•‘Piston waited at a semaphore for 9764ms
+10047ms â•‘Runtime (48054 bytes) successfully initialized in 9986ms (v0.3.110.20191009) (10045ms)
+10048ms â•‘â•”Execution stage started
+10055ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (1ms)
+10057ms â•‘â•‘Condition #24 evaluated false (5ms)
+10061ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = true (0ms)
+10062ms â•‘â•‘Cancelling condition #26's schedules...
+10064ms â•‘â•‘Cancelling statement #27's schedules...
+10070ms â•‘â•‘Executed virtual command setVariable (3ms)
+10071ms â•‘â•‘Condition #26 evaluated true (14ms)
+10072ms â•‘â•‘Condition group #1 evaluated true (state did not change) (20ms)
+10074ms â•‘â•‘Cancelling statement #22's schedules...
+10080ms â•‘â•‘Calculating (string) Button evaluated to + (string) 2 >> (string) Button evaluated to 2
+10083ms â•‘â•‘Button evaluated to 2
+10084ms â•‘â•‘Executed virtual command log (1ms)
+10093ms â•‘â•‘Executed virtual command setVariable (3ms)
+10099ms â•‘â•‘Calculating (string) Grabbing volume from speakers, not piston, which is + (string) 18 >> (string) Grabbing volume from speakers, not piston, which is 18
+10103ms â•‘â•‘Grabbing volume from speakers, not piston, which is 18
+10104ms â•‘â•‘Executed virtual command log (1ms)
+10107ms â•‘â•‘Evaluating switch with values [[i:5:null:0, v:[t:integer, v:2, vt:string]]]
+10110ms â•‘â•‘Comparison (integer) 2 is (integer) 1 = false (1ms)
+10113ms â•‘â•‘Comparison (integer) 2 is (integer) 2 = true (1ms)
+10115ms â•‘â•‘Cancelling statement #12's schedules...
+10121ms â•‘â•‘Calculating (integer) 18 + (integer) 2 >> (integer) 20
+10127ms â•‘â•‘Executed virtual command setVariable (4ms)
+10133ms â•‘â•‘Comparison (integer) 20 is_greater_than_or_equal_to (integer) 100 = false (1ms)
+10135ms â•‘â•‘Condition #38 evaluated false (4ms)
+10136ms â•‘â•‘Condition group #37 evaluated false (state did not change) (6ms)
+10138ms â•‘â•‘Cancelling statement #14's schedules...
+10290ms â•‘â•‘Executed physical command [Bathroom speakers].setLevel([20]) (146ms)
+10291ms â•‘â•‘Executed [Bathroom speakers].setLevel (148ms)
+10295ms â•‘â•‘Cancelling statement #35's schedules...
+10301ms â•‘â•‘Executed virtual command setVariable (4ms)
+10303ms â•‘â•šExecution stage complete. (255ms)
+10305ms â•šEvent processed successfully (10304ms)
6/12/2020, 6:52:18 PM +778ms
+1ms â•”Received event [Bathroom Speaker Control].button = pushed with a delay of 76ms
+191ms â•‘RunTime Analysis CS > 14ms > PS > 143ms > PE > 34ms > CE
+194ms â•‘Runtime (47980 bytes) successfully initialized in 143ms (v0.3.110.20191009) (191ms)
+195ms â•‘â•”Execution stage started
+202ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (1ms)
+204ms â•‘â•‘Condition #24 evaluated false (4ms)
+207ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (1ms)
+209ms â•‘â•‘Cancelling condition #26's schedules...
+210ms â•‘â•‘Condition #26 evaluated false (5ms)
+214ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = true (0ms)
+215ms â•‘â•‘Cancelling condition #29's schedules...
+217ms â•‘â•‘Cancelling statement #30's schedules...
+223ms â•‘â•‘Executed virtual command setVariable (2ms)
+224ms â•‘â•‘Condition #29 evaluated true (14ms)
+225ms â•‘â•‘Condition group #1 evaluated true (state did not change) (26ms)
+227ms â•‘â•‘Cancelling statement #22's schedules...
+233ms â•‘â•‘Calculating (string) Button evaluated to + (string) 3 >> (string) Button evaluated to 3
+236ms â•‘â•‘Button evaluated to 3
+237ms â•‘â•‘Executed virtual command log (1ms)
+245ms â•‘â•‘Executed virtual command setVariable (2ms)
+251ms â•‘â•‘Calculating (string) Grabbing volume from speakers, not piston, which is + (string) 20 >> (string) Grabbing volume from speakers, not piston, which is 20
+254ms â•‘â•‘Grabbing volume from speakers, not piston, which is 20
+255ms â•‘â•‘Executed virtual command log (1ms)
+258ms â•‘â•‘Evaluating switch with values [[i:5:null:0, v:[t:integer, v:3, vt:string]]]
+261ms â•‘â•‘Comparison (integer) 3 is (integer) 1 = false (1ms)
+264ms â•‘â•‘Comparison (integer) 3 is (integer) 2 = false (1ms)
+266ms â•‘â•‘Comparison (integer) 3 is (integer) 3 = true (1ms)
+268ms â•‘â•‘Cancelling statement #16's schedules...
+275ms â•‘â•‘Calculating (integer) 20 - (integer) 2 >> (integer) 18
+279ms â•‘â•‘Executed virtual command setVariable (1ms)
+284ms â•‘â•‘Comparison (integer) 18 is_less_than_or_equal_to (integer) 0 = false (1ms)
+286ms â•‘â•‘Condition #42 evaluated false (5ms)
+287ms â•‘â•‘Condition group #41 evaluated false (state did not change) (6ms)
+290ms â•‘â•‘Cancelling statement #18's schedules...
+433ms â•‘â•‘Executed physical command [Bathroom speakers].setLevel([18]) (140ms)
+434ms â•‘â•‘Executed [Bathroom speakers].setLevel (140ms)
+438ms â•‘â•‘Cancelling statement #35's schedules...
+443ms â•‘â•‘Executed virtual command setVariable (3ms)
+445ms â•‘â•šExecution stage complete. (251ms)
+446ms â•šEvent processed successfully (446ms)
6/12/2020, 6:52:14 PM +7ms
+1ms â•”Received event [Bathroom Speaker Control].button = pushed with a delay of 75ms
+334ms â•‘RunTime Analysis CS > 17ms > PS > 283ms > PE > 34ms > CE
+337ms â•‘Runtime (47980 bytes) successfully initialized in 283ms (v0.3.110.20191009) (335ms)
+338ms â•‘â•”Execution stage started
+345ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (1ms)
+346ms â•‘â•‘Condition #24 evaluated false (4ms)
+350ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = true (1ms)
+352ms â•‘â•‘Cancelling statement #27's schedules...
+358ms â•‘â•‘Executed virtual command setVariable (2ms)
+359ms â•‘â•‘Condition #26 evaluated true (12ms)
+360ms â•‘â•‘Condition group #1 evaluated true (state did not change) (18ms)
+362ms â•‘â•‘Cancelling statement #22's schedules...
+367ms â•‘â•‘Calculating (string) Button evaluated to + (string) 2 >> (string) Button evaluated to 2
+371ms â•‘â•‘Button evaluated to 2
+371ms â•‘â•‘Executed virtual command log (1ms)
+380ms â•‘â•‘Executed virtual command setVariable (3ms)
+386ms â•‘â•‘Calculating (string) Grabbing volume from speakers, not piston, which is + (string) 20 >> (string) Grabbing volume from speakers, not piston, which is 20
+389ms â•‘â•‘Grabbing volume from speakers, not piston, which is 20
+482ms â•‘â•‘Executed virtual command log (93ms)
+484ms â•‘â•‘Evaluating switch with values [[i:5:null:0, v:[t:integer, v:2, vt:string]]]
+487ms â•‘â•‘Comparison (integer) 2 is (integer) 1 = false (1ms)
+490ms â•‘â•‘Comparison (integer) 2 is (integer) 2 = true (1ms)
+492ms â•‘â•‘Cancelling statement #12's schedules...
+499ms â•‘â•‘Calculating (integer) 20 + (integer) 2 >> (integer) 22
+503ms â•‘â•‘Executed virtual command setVariable (3ms)
+509ms â•‘â•‘Comparison (integer) 22 is_greater_than_or_equal_to (integer) 100 = false (1ms)
+511ms â•‘â•‘Condition #38 evaluated false (4ms)
+512ms â•‘â•‘Condition group #37 evaluated false (state did not change) (5ms)
+514ms â•‘â•‘Cancelling statement #14's schedules...
+758ms â•‘â•‘Executed physical command [Bathroom speakers].setLevel([22]) (240ms)
+759ms â•‘â•‘Executed [Bathroom speakers].setLevel (241ms)
+763ms â•‘â•‘Cancelling statement #35's schedules...
+768ms â•‘â•‘Executed virtual command setVariable (3ms)
+771ms â•‘â•šExecution stage complete. (432ms)
+772ms â•šEvent processed successfully (771ms)
6/12/2020, 6:52:13 PM +509ms
+2ms â•”Received event [Bathroom Speaker Control].button = pushed with a delay of 78ms
+239ms â•‘RunTime Analysis CS > 18ms > PS > 193ms > PE > 27ms > CE
+242ms â•‘Runtime (47981 bytes) successfully initialized in 193ms (v0.3.110.20191009) (239ms)
+242ms â•‘â•”Execution stage started
+249ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = false (1ms)
+251ms â•‘â•‘Condition #24 evaluated false (5ms)
+254ms â•‘â•‘Comparison (enum) pushed gets (string) pushed = true (1ms)
+256ms â•‘â•‘Cancelling condition #26's schedules...
+258ms â•‘â•‘Cancelling statement #27's schedules...
+263ms â•‘â•‘Executed virtual command setVariable (3ms)
+264ms â•‘â•‘Condition #26 evaluated true (13ms)
+265ms â•‘â•‘Condition group #1 evaluated true (state did not change) (19ms)
+267ms â•‘â•‘Cancelling statement #22's schedules...
+273ms â•‘â•‘Calculating (string) Button evaluated to + (string) 2 >> (string) Button evaluated to 2
+276ms â•‘â•‘Button evaluated to 2
+277ms â•‘â•‘Executed virtual command log (1ms)
+285ms â•‘â•‘Executed virtual command setVariable (2ms)
+291ms â•‘â•‘Calculating (string) Grabbing volume from speakers, not piston, which is + (string) 18 >> (string) Grabbing volume from speakers, not piston, which is 18
+294ms â•‘â•‘Grabbing volume from speakers, not piston, which is 18
+295ms â•‘â•‘Executed virtual command log (1ms)
+298ms â•‘â•‘Evaluating switch with values [[i:5:null:0, v:[t:integer, v:2, vt:string]]]
+300ms â•‘â•‘Comparison (integer) 2 is (integer) 1 = false (1ms)
+303ms â•‘â•‘Comparison (integer) 2 is (integer) 2 = true (1ms)
+305ms â•‘â•‘Cancelling statement #12's schedules...
+311ms â•‘â•‘Calculating (integer) 18 + (integer) 2 >> (integer) 20
+315ms â•‘â•‘Executed virtual command setVariable (2ms)
+321ms â•‘â•‘Comparison (integer) 20 is_greater_than_or_equal_to (integer) 100 = false (2ms)
+322ms â•‘â•‘Condition #38 evaluated false (4ms)
+323ms â•‘â•‘Condition group #37 evaluated false (state did not change) (6ms)
+326ms â•‘â•‘Cancelling statement #14's schedules...
+482ms â•‘â•‘Executed physical command [Bathroom speakers].setLevel([20]) (152ms)
+483ms â•‘â•‘Executed [Bathroom speakers].setLevel (154ms)
+487ms â•‘â•‘Cancelling statement #35's schedules...
+492ms â•‘â•‘Executed virtual command setVariable (2ms)
+494ms â•‘â•šExecution stage complete. (252ms)
+495ms â•šEvent processed successfully (495ms)