1) Give a description of the problem
Just looking for feedback on my first attempt to create a Piston
2) What is the expected behavior?
I have a Door Open/Close Sensor with a Motion Sensor on the inside. I want to turn on the light if I come in, but not do anything when I leave. I have a separate device with a luminance sensor that I am using to see if it is dusk/dark.
3) What is happening/not happening?
It seems to be working - I am just looking for feedback as to whether it could be improved.
4) Post a Green Snapshot of the piston
5) Attach any logs (From ST IDE and by turning logging level to Full)
’ |+2ms|╔Received event [Front Entry].contact = closed with a delay of 71ms|
| — | — |
|+167ms|â•‘RunTime Analysis CS > 17ms > PS > 134ms > PE > 15ms > CE|
|+169ms|â•‘Runtime (38866 bytes) successfully initialized in 134ms (v0.3.109.20181207) (166ms)|
|+170ms|â•‘â•”Execution stage started|
|+181ms|â•‘â•‘Comparison (enum) closed changes_to (string) open = false (1ms)|
|+183ms|║║Cancelling condition #2’s schedules…|
|+184ms|â•‘â•‘Condition #2 evaluated false (7ms)|
|+186ms|║║Cancelling condition #1’s schedules…|
|+187ms|â•‘â•‘Condition group #1 evaluated false (state changed) (11ms)|
|+190ms|║╚Execution stage complete. (19ms)|
|+191ms|╚Event processed successfully (191ms)|
|1/14/2019, 6:31:19 PM +991ms|
|+1ms|â•”Received event [Front Entry].contact = open with a delay of 82ms|
|+144ms|â•‘RunTime Analysis CS > 17ms > PS > 114ms > PE > 13ms > CE|
|+146ms|â•‘Runtime (38871 bytes) successfully initialized in 114ms (v0.3.109.20181207) (144ms)|
|+147ms|â•‘â•”Execution stage started|
|+158ms|â•‘â•‘Comparison (enum) open changes_to (string) open = true (1ms)|
|+160ms|║║Cancelling condition #2’s schedules…|
|+161ms|â•‘â•‘Condition #2 evaluated true (8ms)|
|+162ms|║║Cancelling condition #1’s schedules…|
|+163ms|â•‘â•‘Condition group #1 evaluated true (state changed) (10ms)|
|+178ms|â•‘â•‘Comparison (enum) inactive is (string) inactive = true (2ms)|
|+180ms|â•‘â•‘Condition #5 evaluated true (12ms)|
|+181ms|â•‘â•‘Condition group #4 evaluated true (state did not change) (14ms)|
|+193ms|â•‘â•‘Comparison (integer) 0 is_less_than_or_equal_to (integer) 150 = true (2ms)|
|+195ms|â•‘â•‘Condition #8 evaluated true (11ms)|
|+196ms|â•‘â•‘Condition group #7 evaluated true (state did not change) (14ms)|
|+198ms|â•‘â•‘Condition group #3 evaluated true (state did not change) (31ms)|
|+201ms|║║Cancelling statement #9’s schedules…|
|+660ms|â•‘â•‘Executed physical command [Entry].on() (455ms)|
|+662ms|â•‘â•‘Executed [Entry].on (457ms)|
|+666ms|║╚Execution stage complete. (519ms)|
|+668ms|╚Event processed successfully (668ms)|’ indent preformatted text by 4 spaces