Behave different on between x and x time

Post Reply
bartmolk
Posts: 2
Joined: Monday 14 May 2018 10:34
Target OS: Raspberry Pi
Domoticz version:
Contact:

Behave different on between x and x time

Post by bartmolk » Monday 14 May 2018 10:45

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.
Attachments
Schermafbeelding 2018-05-14 om 09.26.08.png
Schermafbeelding 2018-05-14 om 09.26.08.png (66.47 KiB) Viewed 401 times

Venzent
Posts: 29
Joined: Sunday 15 April 2018 13:00
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Re: Behave different on between x and x time

Post by Venzent » 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.....

User avatar
Egregius
Posts: 2678
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Behave different on between x and x time

Post by Egregius » Monday 14 May 2018 17:21

I also don't think you need to send the ON signal, the level should be enough (at least when using the json api).

bartmolk
Posts: 2
Joined: Monday 14 May 2018 10:34
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Behave different on between x and x time

Post by bartmolk » Wednesday 16 May 2018 15:56

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!
Attachments
working-blocky-time.jpg
working-blocky-time.jpg (158.58 KiB) Viewed 347 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest