Page 1 of 1

Behave different on between x and x time

Posted: Monday 14 May 2018 10:45
by bartmolk
Basically i'm trying to make this led panel function different at night for when someone wakes up and needs to go to the toilet.
Don't look at the time, it was set like that just for testing.

When I am running this script the panel is not even going off anymore. I've tried multiple things and so far unsuccessful.
Running Domoticz on Beta, don't know exactly which version.

Added an image with what I actually want but doesn't work for me.

Thanks in advance.

Re: Behave different on between x and x time

Posted: Monday 14 May 2018 14:18
by Venzent
Is this the way to setup? An if within an if?
I normally do an if with an and statement and else if:
If motion is on and time is between x and x do this.
elsif motion is on and time is between x and x do that.
elsif motion is off set this off.

ps. be aware of you timings, time < 4:00 and > 14:52 can never happen in my opinion, because the time can never be before 4:00 AND after 14:52, this should be or.....

Re: Behave different on between x and x time

Posted: Monday 14 May 2018 17:21
by Egregius
I also don't think you need to send the ON signal, the level should be enough (at least when using the json api).

Re: Behave different on between x and x time

Posted: Wednesday 16 May 2018 15:56
by bartmolk
Venzent wrote: Monday 14 May 2018 14:18 Is this the way to setup? An if within an if?
I normally do an if with an and statement and else if:
If motion is on and time is between x and x do this.
elsif motion is on and time is between x and x do that.
elsif motion is off set this off.

ps. be aware of you timings, time < 4:00 and > 14:52 can never happen in my opinion, because the time can never be before 4:00 AND after 14:52, this should be or.....
Yep, this was what I had before indeed you can only see the time until 24:00.
Had it before but wasn't working on that way tested this new function and seem to be working correctly now.
So it's the time span that made the script to be not working. Thanks anyway!