Not activating LIFX scenes


#1

1) Give a description of the problem
I have a piston for the bathroom that should activate 1 of 2 Lifx scenes. It seems to turn on the Lifx lights but defaults to the last scene it was on rather than the correct scene.

2) What is the expected behaviour?
When I close, the door, the lights turn on and based on the time of day, should activate either bright (daytime) or night (nighttime).
3) What is happening/not happening?
The lights turn on to the last state they were in. Not either scene.

**4) Post a Green Snapshot of the piston! https://dashboard.webcore.co/piston/:08c635468ba30229ae5f3411c44bb6d5:

5) Attach logs after turning logging level to Full
6/22/2019, 7:41:30 AM +359ms
+1ms ╔Received event [bathroom door sensor].contact = open with a delay of 90ms
+3131ms ║RunTime Analysis CS > 21ms > PS > 3079ms > PE > 32ms > CE
+3133ms ║Piston waited at a semaphore for 3008ms
+3136ms ║Runtime (42006 bytes) successfully initialized in 3079ms (v0.3.108.20180906) (3133ms)
+3137ms ║╔Execution stage started
+3150ms ║║Comparison (enum) open is (string) closed = false (2ms)
+3152ms ║║Cancelling condition #2’s schedules…
+3153ms ║║Condition #2 evaluated false (9ms)
+3155ms ║║Cancelling condition #1’s schedules…
+3156ms ║║Condition group #1 evaluated false (state changed) (13ms)
+3166ms ║║Comparison (enum) open is (string) closed = false (2ms)
+3168ms ║║Condition #5 evaluated false (8ms)
+3169ms ║║Condition group #4 evaluated false (state did not change) (10ms)
+3178ms ║║Comparison (enum) open changes_away_from (string) closed = true (1ms)
+3180ms ║║Cancelling condition #14’s schedules…
+3181ms ║║Condition #14 evaluated true (8ms)
+3334ms ║║Comparison (decimal) 73.0 did_not_change = true (39ms)
+3336ms ║║Condition #15 evaluated true (154ms)
+3337ms ║║Cancelling condition #13’s schedules…
+3338ms ║║Condition group #13 evaluated true (state changed) (165ms)
+3341ms ║║Cancelling statement #24’s schedules…
+3373ms ║║Executed physical command [Bathroom].off() (26ms)
+3374ms ║║Executed [Bathroom].off (28ms)
+5833ms ║║Executed physical command [Floor Lights].off() (2456ms)
+5834ms ║║Executed [Floor Lights].off (2458ms)
+5837ms ║╚Execution stage complete. (2701ms)
+5839ms ╚Event processed successfully (5839ms)
6/22/2019, 7:41:23 AM +163ms
+2ms ╔Received event [bathroom door sensor].contact = closed with a delay of 115ms
+122ms ║RunTime Analysis CS > 23ms > PS > 72ms > PE > 27ms > CE
+125ms ║Runtime (41930 bytes) successfully initialized in 72ms (v0.3.108.20180906) (121ms)
+126ms ║╔Execution stage started
+137ms ║║Comparison (enum) closed is (string) closed = true (2ms)
+139ms ║║Cancelling condition #2’s schedules…
+140ms ║║Condition #2 evaluated true (8ms)
+155ms ║║Comparison (time) 27683305 is_between (time) 18000000 … (time) 0 = true (10ms)
+156ms ║║Time restriction check passed
+158ms ║║Condition #3 evaluated true (17ms)
+160ms ║║Cancelling condition #1’s schedules…
+161ms ║║Condition group #1 evaluated true (state changed) (29ms)
+164ms ║║Cancelling statement #10’s schedules…
+196ms ║║Executed physical command [Bathroom].on() (27ms)
+197ms ║║Executed [Bathroom].on (30ms)
+2880ms ║║Executed physical command [Floor Lights].on() (2679ms)
+2882ms ║║Executed [Floor Lights].on (2681ms)
+8288ms ║║Executed virtual command [Bathroom, Floor Lights].lifxScene (5402ms)
+8297ms ║║Comparison (enum) closed changes_away_from (string) closed = false (1ms)
+8300ms ║║Cancelling condition #14’s schedules…
+8301ms ║║Condition #14 evaluated false (9ms)
+8303ms ║║Cancelling condition #13’s schedules…
+8304ms ║║Condition group #13 evaluated false (state changed) (12ms)
+8314ms ║║Comparison (enum) closed changes_away_from_any_of (string) closed = false (3ms)
+8316ms ║║Condition #17 evaluated false (9ms)
+8318ms ║║Condition group #16 evaluated false (state did not change) (11ms)
+8322ms ║╚Execution stage complete. (8196ms)
+8323ms ╚Event processed successfully (8323ms)Preformatted text


#2

Can you attach an image of your piston instead of the link which no one has access to?


#3


#4

Sorry, not sure what I am doing with the pic upload but I think I got it this time.


#5

I don’t use Lifx actually I don’t use anyting but WebCore.
What you want above is very simple to accomplish in Webcore.
A draft would be:

IF contact sensor changes to OPEN
       IF Time is between X and Y (IF block within IF block)
       Then do this do that with the light bulbs.
       IF time is between A and B
       Then do this do that with the light bulbs.

IF contact sensor changes to CLOSE
      Do this do that.

#6

I am using webcore. It’s not activating the correct scene in the webcore code (see attached pic of the code). Lifex is a smart light brand.

Thanks, Lisa


#7

Let me try to understand your piston…
What is line 26 is doing?
What is it activating?
And also line 38?


#8

I wonder if the turn on is needed when activating a lifx scene. If it is needed, try adding a Wait 1 second between the turn on and activate scene.