Piston problem, cant find the error


#1

1) Give a description of the problem
(Will turn on the light, but not off)

2) What is the expected behaviour?
(Turn on the light when entering room and turn of depending on time)

3) What is happening/not happening?
(Turn on but not off)

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full

+1ms ╔Received event [Hue Motion Sensor native].motion = inactive with a delay of 51ms
+45ms ║RunTime Analysis CS > 16ms > PS > 4ms > PE > 26ms > CE
+48ms ║Runtime (43080 bytes) successfully initialized in 4ms (v0.3.111.20210130) (45ms)
+49ms ║╔Execution stage started
+56ms ║║Comparison (enum) inactive changes_to (string) active = false (1ms)
+58ms ║║Cancelling condition #2’s schedules…
+59ms ║║Condition #2 evaluated false (5ms)
+83ms ║║Comparison (time) 69630677 happens_daily_at (datetime) 1612422000000 = false (1ms)
+85ms ║║Condition #45 evaluated false (24ms)
+86ms ║║Cancelling statement #45’s schedules…
+90ms ║║Requesting time schedule wake up at Fri, Feb 5 2021 @ 8:30:00 AM CET
+93ms ║║Cancelling condition #1’s schedules…
+94ms ║║Condition group #1 evaluated false (state changed) (41ms)
+97ms ║╚Execution stage complete. (48ms)
+98ms ║Setting up scheduled job for Fri, Feb 5 2021 @ 8:30:00 AM CET (in 47369s)
+109ms ╚Event processed successfully (109ms)

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


#2

all your IFs are blank plus a few other oddities… i see you used minutes and seconds again :slight_smile:

i am wondering if the timer block may be better use in certain cases.

every day at blah blah
do this action


#3

Thanks.
Lots to get hold on. Ill make some changes.


#4

No i made i new one.
Still not working. It turns on and i see the timer start count down from 2:5 min but after 10-15 sec time timer change the count to 10:35:23 ant the light does not turn of. So the wait command is on workning


#5

time conditions get confused when you cross the midnight boundary. I suggest you change your second condition to time is NOT between 06:30 and 23:00. It works out the same but avoids the date change confusion. Not sure if that is causing your trouble, though. Also, not sure why you are using ‘only when’ rather than ‘if…then’. Might work the same but personally, I never us ‘only when’ constraints. Keeping the logic all within the ‘if’ conditions is much more straightforward.

my $0.02


#6

It could easily just be the motion changing back to inactive during the wait intervals. You probably just need to set the Task Cancellation Policy to Never Cancel on the long waits (either edit the wait actions or the with tasks that enclose them).


#7

Now everything turns on och off with the Motion detection, but not The last If.
Why?


#8

try using “turn off” instead of “turn all off”

you may also consider using the timer block instead of the if block…

every day
at 30 minutes past sunrise


#9

Thanks

Now it works.

How do i close this case?