Turn light when is open door in night Topic is solved

Moderator: leecollings

Post Reply
Morfeus
Posts: 4
Joined: Sunday 28 October 2018 13:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Turn light when is open door in night

Post by Morfeus »

Hello everyone,

This is my first topic on this page, I hope don't make big confusion.

I try made blockly for my garage gate if will be open and if only will be dark on outside then will be turn on lights on outside home.
I haven't lux sensor on outside and I try made from time sunrise and sunset but don't work.
I was looking everywhere information about this topic but found nothing.
Below you can find screen with my blockly, who knows what I made wrong?

I will be grateful for your helps!
Attachments
domoticz.PNG
domoticz.PNG (41.29 KiB) Viewed 1208 times
Cybertom
Posts: 10
Joined: Tuesday 13 October 2015 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Turn light when is open door in night

Post by Cybertom »

that will not work because time is not compared with the same day. Make a dummy switch (isdark) and let it switch with a new blocky:
if time = sunset then switch dummyswitch (isdark) = "on"
if time = sunrise then switch dummyswitch (isdark) = "off"

and then compare this dummy switch with your blocky.
if (door sensor) = "open" and (isdark) = "on" then ......
or you can do it with a variable instead of a dummy switch
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Turn light when is open door in night

Post by tozzke »

This'll work perfectly as long as you use the correct time conditions....
In your blockly you're saying it to only trigger when later than sunrise and earlier than sunset (so when the sun is up), change that to '[time < sunrise] or [time > sunset]' ('or' because with time based events there isn't a single moment on a day that it's later than sunset AND earlier than sunrise (just as Cybertom mentioned))
Morfeus
Posts: 4
Joined: Sunday 28 October 2018 13:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Turn light when is open door in night

Post by Morfeus »

Now is working perfect, tozzke thank you very much for help.
Cybertom, I was thinking about this way, but I wanted use sunrise and sunset + blockly.

Thank you very much for help and quick answers! ;) :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests