Help with Lights off with power plug


#1

1) Give a description of the problem
The lights aren’t turning off after the room turns to vacant and the TV has been off for at least a minute

2) What is the expected behavior?
When the room is vacant and nobody is using the TV, the lights should go off.

3) What is happening/not happening?
Lights aren’t turning off.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
+0ms ╔Starting piston… (v0.2.101.20171227)
+502ms ║╔Subscribing to devices…
+527ms ║║Subscribing to Basement Motion Sensor.motion…
+546ms ║║Subscribing to Basement Stairs Motion.motion…
+562ms ║║Subscribing to Basement TV Room Motion.motion…
+698ms ║║Subscribing to Basement…
+699ms ║║Subscribing to Basement Stairs…
+700ms ║║Subscribing to Bottom of Stairs…
+700ms ║║Subscribing to Desk…
+701ms ║║Subscribing to TV Table Light…
+702ms ║║Subscribing to TV Room…
+703ms ║╚Finished subscribing (223ms)
+737ms ║Comparison (decimal) 0.0 is_equal_to (integer) 0 = true (4ms)
+1147ms ║Comparison (decimal) 0.0 was_equal_to (integer) 0 = false (381ms)
+1157ms ║Comparison (string) vacant is (string) vacant = true (1ms)
+1166ms ╚Piston successfully started (1166ms)
1/8/2018, 6:50:15 PM +302ms
+1ms ╔Starting piston… (v0.2.101.20171227)
+353ms ║╔Subscribing to devices…
+365ms ║║Subscribing to Basement Motion Sensor.motion…
+378ms ║║Subscribing to Basement Stairs Motion.motion…
+391ms ║║Subscribing to Basement TV Room Motion.motion…
+473ms ║║Subscribing to Basement…
+474ms ║║Subscribing to Basement Stairs…
+475ms ║║Subscribing to Bottom of Stairs…
+475ms ║║Subscribing to Desk…
+476ms ║║Subscribing to TV Table Light…
+477ms ║║Subscribing to TV Room…
+477ms ║╚Finished subscribing (145ms)
+512ms ║Comparison (decimal) 0.0 is_equal_to (integer) 0 = true (6ms)
+601ms ║Comparison (decimal) 0.0 was_equal_to (integer) 0 = false (58ms)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2
  1. dont use else if make that part its own if
  2. either change motion changes to active to motion is active or change power was equal to 0w for at least 1 minute to power stays equal to 0w for 1 minute

#3

OK I tried this but the lights still won’t shut off.

1/9/2018, 7:27:09 AM +668ms
+1ms ╔Received event [Basement Stairs Motion].motion = inactive with a delay of 1003ms
+205ms ║RunTime Analysis CS > 17ms > PS > 59ms > PE > 130ms > CE
+208ms ║Runtime (40746 bytes) successfully initialized in 59ms (v0.2.101.20171227) (206ms)
+209ms ║╔Execution stage started
+222ms ║║Comparison (decimal) 0.0 is_equal_to (integer) 0 = true (2ms)
+223ms ║║Condition #15 evaluated true (9ms)
+236ms ║║Comparison (enum) inactive changes_to (string) active = false (0ms)
+238ms ║║Cancelling condition #3’s schedules…
+239ms ║║Condition #3 evaluated false (15ms)
+240ms ║║Cancelling condition #1’s schedules…
+240ms ║║Condition group #1 evaluated false (state changed) (27ms)
+253ms ║║Comparison (string) occupied is (string) vacant = false (1ms)
+254ms ║║Condition #19 evaluated false (11ms)
+255ms ║║Condition group #16 evaluated false (state did not change) (12ms)
+257ms ║╚Execution stage complete. (49ms)
+258ms ╚Event processed successfully (258ms)
1/9/2018, 7:26:59 AM +963ms
+1ms ╔Received event [Basement Stairs Motion].motion = active with a delay of 1008ms
+225ms ║RunTime Analysis CS > 19ms > PS > 68ms > PE > 139ms > CE
+227ms ║Runtime (40744 bytes) successfully initialized in 68ms (v0.2.101.20171227) (225ms)
+228ms ║╔Execution stage started
+242ms ║║Comparison (decimal) 0.0 is_equal_to (integer) 0 = true (2ms)
+243ms ║║Condition #15 evaluated true (10ms)
+258ms ║║Comparison (enum) active changes_to (string) active = true (1ms)
+259ms ║║Cancelling condition #3’s schedules…
+260ms ║║Condition #3 evaluated true (16ms)
+261ms ║║Cancelling condition #1’s schedules…
+262ms ║║Condition group #1 evaluated true (state changed) (28ms)
+264ms ║║Cancelling statement #11’s schedules…
+281ms ║║Executed physical command [Basement Stairs].on() (13ms)
+282ms ║║Executed [Basement Stairs].on (13ms)
+300ms ║║Executed physical command [Bottom of Stairs].on() (16ms)
+301ms ║║Executed [Bottom of Stairs].on (16ms)
+316ms ║║Executed physical command [Desk].on() (13ms)
+317ms ║║Executed [Desk].on (14ms)
+332ms ║║Executed physical command [TV Table Light].on() (12ms)
+333ms ║║Executed [TV Table Light].on (14ms)
+347ms ║║Executed physical command [TV Room].on() (12ms)
+348ms ║║Executed [TV Room].on (12ms)
+362ms ║║Executed physical command [Basement Stairs].setLevel([100]) (11ms)
+363ms ║║Executed [Basement Stairs].setLevel (13ms)
+376ms ║║Executed physical command [Bottom of Stairs].setLevel([100]) (12ms)
+377ms ║║Executed [Bottom of Stairs].setLevel (14ms)
+390ms ║║Executed physical command [Desk].setLevel([100]) (12ms)
+391ms ║║Executed [Desk].setLevel (12ms)
+404ms ║║Executed physical command [TV Table Light].setLevel([100]) (11ms)
+404ms ║║Executed [TV Table Light].setLevel (13ms)
+417ms ║║Executed physical command [TV Room].setLevel([100]) (12ms)
+417ms ║║Executed [TV Room].setLevel (12ms)
+425ms ║║Executed physical command [Basement Stairs].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (5ms)
+426ms ║║Executed [Basement Stairs].setColor (7ms)
+433ms ║║Executed physical command [Bottom of Stairs].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (6ms)
+434ms ║║Executed [Bottom of Stairs].setColor (6ms)
+442ms ║║Executed physical command [Desk].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (6ms)
+443ms ║║Executed [Desk].setColor (7ms)
+449ms ║║Executed physical command [TV Table Light].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (5ms)
+450ms ║║Executed [TV Table Light].setColor (7ms)
+456ms ║║Executed physical command [TV Room].setColor([[hex: #FFFFFF, hue:0, saturation:0, level:100]]) (5ms)
+457ms ║║Executed [TV Room].setColor (7ms)
+472ms ║║Comparison (string) occupied is (string) vacant = false (2ms)
+473ms ║║Cancelling condition #19’s schedules…
+474ms ║║Condition #19 evaluated false (14ms)
+475ms ║║Cancelling condition #16’s schedules…
+475ms ║║Condition group #16 evaluated false (state changed) (15ms)
+477ms ║╚Execution stage complete. (249ms)
+478ms ╚Event processed successfully (478ms)


#4

OK, I finally got it to work. Had to change the Room sensor to “changes to” vacant. Thanks for your help!