Light not turning on automaticly


#1

1) Give a description of the problem
My so called ‘‘planeet’’ doesnt turn on. This is a smart light.

2) What is the expected behaviour?
What I am trying to create is that the light turns on 1 hour or longer before sunset when the house is in ‘home’ state.

3) What is happening/not happening?
Somehow the light doesnt turn on when the house in in home state. However when I enable it manually it works like I designed it. When I put it on away it goes of, back to home mode and it turns on again. Like I manually have to start it right now. Also when I put it in sleep modus the light turn off.

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
13-5-2020 20:36:40 +123ms
+1ms ╔Received event [Pisastraat 73].mode = Home with a delay of 39ms
+46ms ║RunTime Analysis CS > 18ms > PS > 5ms > PE > 22ms > CE
+48ms ║Runtime (39480 bytes) successfully initialized in 5ms (v0.3.110.20191009) (47ms)
+50ms ║╔Execution stage started
+88ms ║║Comparison (time) 74200178 is_between (datetime) 1589397780000 … (datetime) 1589428080000 = true (6ms)
+90ms ║║Time restriction check passed
+91ms ║║Condition #2 evaluated true (36ms)
+92ms ║║Condition group #16 evaluated true (state did not change) (37ms)
+95ms ║║Cancelling statement #19’s schedules…
+117ms ║║Executed physical command [Planeet].on() (17ms)
+118ms ║║Executed [Planeet].on (20ms)
+137ms ║║Executed physical command [Planeet].setLevel([100]) (13ms)
+138ms ║║Executed virtual command [Planeet].adjustLevel (17ms)
+144ms ║║Comparison (string) :3df1447924a0d97fd4a87ea8793edd1b: is (string) :ae9ed571a9e75952871a70155f4dca8c: = false (1ms)
+146ms ║║Cancelling condition #27’s schedules…
+146ms ║║Condition #27 evaluated false (5ms)
+147ms ║║Cancelling condition #26’s schedules…
+148ms ║║Condition group #26 evaluated false (state changed) (7ms)
+153ms ║║Comparison (string) :3df1447924a0d97fd4a87ea8793edd1b: changes_to (string) :eac49741ee044fffea9cbee6548c318c: = false (1ms)
+154ms ║║Condition #13 evaluated false (3ms)
+155ms ║║Condition group #12 evaluated false (state did not change) (5ms)
+157ms ║╚Execution stage complete. (108ms)
+158ms ╚Event processed successfully (158ms)
13-5-2020 20:36:34 +594ms
+1ms ╔Received event [Pisastraat 73].mode = Away with a delay of 39ms
+42ms ║RunTime Analysis CS > 17ms > PS > 5ms > PE > 20ms > CE
+45ms ║Runtime (39482 bytes) successfully initialized in 5ms (v0.3.110.20191009) (42ms)
+46ms ║╔Execution stage started
+78ms ║║Comparison (time) 74194645 is_between (datetime) 1589397780000 … (datetime) 1589428080000 = true (6ms)
+80ms ║║Time restriction check passed
+81ms ║║Condition #2 evaluated true (30ms)
+82ms ║║Condition group #16 evaluated true (state did not change) (31ms)
+85ms ║║Cancelling statement #19’s schedules…
+86ms ║║Skipping task 23 because of mode restrictions
+87ms ║║Skipping task 24 because of mode restrictions
+93ms ║║Comparison (string) :ae9ed571a9e75952871a70155f4dca8c: is (string) :ae9ed571a9e75952871a70155f4dca8c: = true (1ms)
+95ms ║║Cancelling condition #27’s schedules…
+96ms ║║Condition #27 evaluated true (6ms)
+97ms ║║Cancelling condition #26’s schedules…
+98ms ║║Condition group #26 evaluated true (state changed) (8ms)
+102ms ║║Cancelling statement #28’s schedules…
+108ms ║║Skipped execution of physical command [Planeet].off([]) because it would make no change to the device. (2ms)
+109ms ║║Executed [Planeet].off (4ms)
+114ms ║║Comparison (string) :ae9ed571a9e75952871a70155f4dca8c: changes_to (string) :eac49741ee044fffea9cbee6548c318c: = false (0ms)
+116ms ║║Condition #13 evaluated false (4ms)
+117ms ║║Condition group #12 evaluated false (state did not change) (5ms)
+120ms ║╚Execution stage complete. (73ms)
+121ms ╚Event processed successfully (121ms)

The log above is after the house changes from away to home. Then it works fine! But when its set home and turns dark it doesn’t work.

Hope you guys can help me out with my first Piston :slight_smile:


#2

Notice the trigger in the left margin…

This is what events will execute the piston.
(In your case, the piston will run any time Location mode changes at all)


To add a time trigger to this, you can change your first block to a timer:

Every day at 90 minutes before $sunset
    Do Turn on Dimmer 2
END EVERY

… and then add another mini-timer:

Every day at $sunrise
    Do Turn off Dimmer 2
END EVERY

With this method, both Location changes AND sun rise/set times will both affect the light


#3

You do not have a lightning bolt (trigger) to the left of your first IF. When spanning midnight, I like to use the NOT option…
IF Time is NOT between sunrise and 90 minutes to sunset

Give that a try and see if it works.


#4

Thanks I will try this! We will know tommorow if it works haha
Imgur


#5

Thanks for the tip! Now I kinda understand what the trigger does. However how do I set the trigger or maybe in my case remove the trigger completly?


#6

To create this logic:

add a new statement > Add a timer

Then set the popup like this:

pic


#7

@Don, at second glance, I don’t think my suggestion will work for you. @WCmore is the expert here and I would follow his suggestions.


#8

Tigger is still not at the right place, but this might work?


#9

Here is a piston that does everything that we have talked about:

Note:
Due to your “ONLY WHILE HOME” logic, if you come home late (after Sunset-90m), then the Dimmer is not programmed to come on.

If you want it to, then you can add a new block to the bottom:

IF Location mode changes to Home
Then
    IF Time is not between sunrise and sunset-90min
    Then
        Turn on Dimmer
    END IF
END IF

(that time condition is intentionally inverted)