This is the start of an incomplete piston to control my IR controlled scene controller via a virtual dimmer and a logitech harmony hub.
I’m using dim levels to represent the presets, so level 1 = scene 1. The relevant logitech activity is switched on, sending the IR code for scene1. It’s then turned off, ready for another activation. No IR code is sent when the activity is turned off.
The piston seems to work ok, however I am confused by the log.
When changing the dim level to 1 when the switch is off, you see the VS turn on immediately. In the log, you see the change dim level, which works fine. Then you see the switch.on event, which I was sort of expecting and have coded to handle. However, the log shows the piston suspended for 10 secs after the on event, and then it evaluates that the switch was not switched on.
I thought the on event may cancel the dim change event to be cancelled, so was thinking I may need to set the TCP, but this doesn’t seem to be the case.
I could do with understanding what’s going on before I add more functionality.
21/09/2020, 19:40:32 +126ms
+1ms ╔Received event [Kitchen Lights].switch = on with a delay of 103ms
+10198ms ║RunTime Analysis CS > 19ms > PS > 10157ms > PE > 22ms > CE
+10199ms ║Piston waited at a semaphore for 10121ms
+10202ms ║Runtime (42019 bytes) successfully initialized in 10157ms (v0.3.110.20191009) (10200ms)
+10203ms ║╔Execution stage started
+10210ms ║║Comparison (enum) on changes_to (string) on = false (0ms)
+10211ms ║║Condition #2 evaluated false (4ms)
+10212ms ║║Condition group #1 evaluated false (state did not change) (6ms)
+10217ms ║║Comparison (enum) on changes_to (string) off = false (0ms)
+10219ms ║║Condition #9 evaluated false (4ms)
+10220ms ║║Condition group #8 evaluated false (state did not change) (5ms)
+10230ms ║║Cancelling condition #31’s schedules…
+10231ms ║║Condition #31 evaluated false (9ms)
+10232ms ║║Cancelling condition #30’s schedules…
+10233ms ║║Condition group #30 evaluated false (state changed) (11ms)
+10235ms ║╚Execution stage complete. (33ms)
+10236ms ╚Event processed successfully (10236ms)
21/09/2020, 19:40:32 +61ms
+1ms ╔Received event [Kitchen Lights].level = 1 with a delay of 61ms
+75ms ║RunTime Analysis CS > 18ms > PS > 38ms > PE > 19ms > CE
+77ms ║Runtime (41942 bytes) successfully initialized in 38ms (v0.3.110.20191009) (76ms)
+78ms ║╔Execution stage started
+90ms ║║Condition #2 evaluated false (7ms)
+91ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+100ms ║║Condition #9 evaluated false (6ms)
+101ms ║║Condition group #8 evaluated false (state did not change) (8ms)
+106ms ║║Comparison (integer) 1 changes = true (1ms)
+107ms ║║Cancelling condition #31’s schedules…
+108ms ║║Condition #31 evaluated true (4ms)
+109ms ║║Cancelling condition #30’s schedules…
+110ms ║║Condition group #30 evaluated true (state changed) (7ms)
+113ms ║║Cancelling statement #32’s schedules…
+118ms ║║Executed virtual command setVariable (2ms)
+131ms ║║Comparison (integer) 1 is_equal_to (integer) 1 = true (2ms)
+133ms ║║Cancelling condition #17’s schedules…
+135ms ║║Condition #17 evaluated true (7ms)
+136ms ║║Cancelling condition #16’s schedules…
+137ms ║║Condition group #16 evaluated true (state changed) (11ms)
+140ms ║║Cancelling statement #18’s schedules…
+277ms ║║Executed physical command [Ftrnx scn1 [Harmony Activity]].on() (132ms)
+278ms ║║Executed [Ftrnx scn1 [Harmony Activity]].on (134ms)
+281ms ║║Executed virtual command [Ftrnx scn1 [Harmony Activity]].wait (1ms)
+282ms ║║Waiting for 2000ms
+2593ms ║║Executed physical command [Ftrnx scn1 [Harmony Activity]].off() (307ms)
+2594ms ║║Executed [Ftrnx scn1 [Harmony Activity]].off (310ms)
+2602ms ║║Comparison (integer) 1 is_equal_to (integer) 2 = false (1ms)
+2603ms ║║Condition #23 evaluated false (6ms)
+2605ms ║║Condition group #22 evaluated false (state did not change) (7ms)
+2608ms ║╚Execution stage complete. (2529ms)
+2609ms ╚Event processed successfully (2610ms)