Hello,
I want to switch on the light for one minute using a PIR but only after sunset and before sunrise. How can I acconplish that?
Sunrise and Sunset Topic is solved
Moderator: leecollings
-
- Posts: 23
- Joined: Friday 16 November 2018 17:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
- Treve
- Posts: 107
- Joined: Thursday 05 November 2015 10:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v4.11474
- Location: Rotterdam, NL
- Contact:
Re: Sunrise and Sunset
It’s quite simple to do with a blockly.ChrisVH1982 wrote:Hello,
I want to switch on the light for one minute using a PIR but only after sunset and before sunrise. How can I acconplish that?
- make a variable ‘nighttime’
- make a blockly
“if time is sunset” “set Nighttime =on” and “if time is sunrise” “set Nightime =off”
If Pir is on and Nighttime is on set light=on for 1 minute
That’s all.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
-
- Posts: 265
- Joined: Monday 05 February 2018 8:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12467
- Location: Netherlands, near Haarlem
- Contact:
Re: Sunrise and Sunset
If [Time > Sunset] or [Time < Sunrise] and [Light = Off] and [PIR = On]
Set [Light = On for [1] minutes.
I used a dummy switch instead of a variable as Treve wrote. This Dummy switch was switched by timer. But this is not necessary for what you want to accomplish now.
Set [Light = On for [1] minutes.
I used a dummy switch instead of a variable as Treve wrote. This Dummy switch was switched by timer. But this is not necessary for what you want to accomplish now.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
- Treve
- Posts: 107
- Joined: Thursday 05 November 2015 10:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v4.11474
- Location: Rotterdam, NL
- Contact:
Re: Sunrise and Sunset
As far i know there are Time complications with calculations before 00:00 and after 00:00.AllesVanZelf wrote:If [Time > Sunset] or [Time < Sunrise] and [Light = Off] and [PIR = On]
That’s the reason I made use of a variable.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
-
- Posts: 265
- Joined: Monday 05 February 2018 8:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12467
- Location: Netherlands, near Haarlem
- Contact:
Re: Sunrise and Sunset
The complication you refer to is: If [Time > Sunset] and [Time < Sunrise]
That will never happen. That is why I used OR.
If [Time > Sunset] or [Time < Sunrise]
Then it is working.
That will never happen. That is why I used OR.
If [Time > Sunset] or [Time < Sunrise]
Then it is working.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
- Treve
- Posts: 107
- Joined: Thursday 05 November 2015 10:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v4.11474
- Location: Rotterdam, NL
- Contact:
Re: Sunrise and Sunset
Produce this solution every minute a ‘on’ signal?AllesVanZelf wrote:If [Time > Sunset] or [Time < Sunrise] and [Light = Off] and [PIR = On]
Set [Light = On for [1] minutes.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
Who is online
Users browsing this forum: Google [Bot] and 1 guest