1) Give a description of the problem
I am trying to control 3 dimmable, tunable white lights with 1 virtual switch. Things I’m trying to do with these lights:
- When the virtual switch turns on, do the following with all 3 lights:
a) Set light temp according to a global variable
b) Turn on
c) Set brightness level to 100% - If the virtual switch level changes, change the brightness level of all 3 lights.
This all generally works. However, when I try to issue an ‘on’ command immediately followed by a set level command, it only turns on the lights to 100% (the set level command doesn’t work). The set-level command 'waits at a semaphore for 10s, and doesn’t seem to be issued. If I issue a wait for 2s between the on and the set level commands, it works.
2) What is the expected behaviour?
Expected behavior is I can issue an on immediately followed by a set level command.
3) What is happening/not happening?
Issuing an on followed by a set level command only turns on the lights at 100% brightness. The set level command doesn’t succeed - it says waiting at a semaphore for 10s. I’m guessing this has to do with the fact that the trigger for switch on and level changed is in the same piston?
4) Post a Green Snapshot of the piston
5) Attach logs after turning logging level to Full
6/16/2019, 1:04:16 PM +984ms
+2ms +Received event [Switch (Virtual): Bedroom].level = 25 with a delay of 71ms
+10137ms ¦RunTime Analysis CS > 22ms > PS > 10065ms > PE > 50ms > CE
+10138ms ¦Piston waited at a semaphore for 10020ms
+10141ms ¦Runtime (39145 bytes) successfully initialized in 10065ms (v0.3.10c.20190522) (10138ms)
+10142ms ¦+Execution stage started
+10159ms ¦¦Cancelling condition #10's schedules...
+10160ms ¦¦Condition #10 evaluated false (12ms)
+10161ms ¦¦Cancelling condition #1's schedules...
+10163ms ¦¦Condition group #1 evaluated false (state changed) (14ms)
+10175ms ¦¦Cancelling condition #6's schedules...
+10176ms ¦¦Condition #6 evaluated false (10ms)
+10178ms ¦¦Cancelling condition #2's schedules...
+10179ms ¦¦Condition group #2 evaluated false (state changed) (14ms)
+10189ms ¦¦Comparison (integer) 25 changes = false (0ms)
+10190ms ¦¦Condition #38 evaluated false (7ms)
+10192ms ¦¦Condition group #37 evaluated false (state did not change) (8ms)
+10194ms ¦+Execution stage complete. (53ms)
+10196ms +Event processed successfully (10196ms)
6/16/2019, 1:04:16 PM +941ms
+1ms +Received event [Switch (Virtual): Bedroom].switch = on with a delay of 62ms
+111ms ¦RunTime Analysis CS > 21ms > PS > 40ms > PE > 51ms > CE
+114ms ¦Runtime (39070 bytes) successfully initialized in 40ms (v0.3.10c.20190522) (112ms)
+115ms ¦+Execution stage started
+128ms ¦¦Comparison (enum) on changes_to (string) on = true (1ms)
+130ms ¦¦Cancelling condition #10's schedules...
+132ms ¦¦Condition #10 evaluated true (9ms)
+133ms ¦¦Cancelling condition #1's schedules...
+134ms ¦¦Condition group #1 evaluated true (state changed) (13ms)
+137ms ¦¦Cancelling statement #33's schedules...
+157ms ¦¦Executed physical command [Light: Bedroom (Bathroom)].setColorTemperature([6500]) (9ms)
+158ms ¦¦Executed [Light: Bedroom (Bathroom)].setColorTemperature (12ms)
+169ms ¦¦Executed physical command [Light: Bedroom (Deck)].setColorTemperature([6500]) (7ms)
+170ms ¦¦Executed [Light: Bedroom (Deck)].setColorTemperature (10ms)
+180ms ¦¦Executed physical command [Light: Bedroom (Porch)].setColorTemperature([6500]) (7ms)
+181ms ¦¦Executed [Light: Bedroom (Porch)].setColorTemperature (9ms)
+194ms ¦¦Executed physical command [Light: Bedroom (Bathroom)].on() (10ms)
+195ms ¦¦Executed [Light: Bedroom (Bathroom)].on (12ms)
+206ms ¦¦Executed physical command [Light: Bedroom (Deck)].on() (9ms)
+207ms ¦¦Executed [Light: Bedroom (Deck)].on (11ms)
+218ms ¦¦Executed physical command [Light: Bedroom (Porch)].on() (9ms)
+219ms ¦¦Executed [Light: Bedroom (Porch)].on (11ms)
+232ms ¦¦Executed physical command [Light: Bedroom (Bathroom)].setLevel([100]) (8ms)
+233ms ¦¦Executed [Light: Bedroom (Bathroom)].setLevel (10ms)
+244ms ¦¦Executed physical command [Light: Bedroom (Deck)].setLevel([100]) (8ms)
+245ms ¦¦Executed [Light: Bedroom (Deck)].setLevel (11ms)
+256ms ¦¦Executed physical command [Light: Bedroom (Porch)].setLevel([100]) (9ms)
+257ms ¦¦Executed [Light: Bedroom (Porch)].setLevel (11ms)
+270ms ¦¦Condition #38 evaluated false (7ms)
+271ms ¦¦Condition group #37 evaluated false (state did not change) (10ms)
+274ms ¦+Execution stage complete. (159ms)
+276ms +Event processed successfully (275ms)