"Time > Sunrise AND Time < Sunset" doesn't work

Moderator: leecollings

Post Reply
Feddan
Posts: 7
Joined: Wednesday 18 October 2017 16:04
Target OS: -
Domoticz version:
Contact:

"Time > Sunrise AND Time < Sunset" doesn't work

Post by Feddan »

I have two saved events, where I want to turn Off an outside lamp on Sunrise, and turn it On on Sunset.

Sunrise:
DomoBlockySunrise.PNG
DomoBlockySunrise.PNG (39.68 KiB) Viewed 5402 times

Sunset:
DomoBlockySunset.PNG
DomoBlockySunset.PNG (39.26 KiB) Viewed 5402 times

But it doesn't work! What am I missing?
CaesarPL
Posts: 104
Joined: Tuesday 08 November 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by CaesarPL »

Why blockly :) ? You can do it directly on the switch.
HW:Raspberry PiB+,Pi3,PiB,RFLink,FA20RF,DCS-930L,DCS-935L,Clarus switches,RF Temp sensors,Owl Micro+,Mi Flora,Kerui,Yeelight,Xiaomi,Broadlink RMM3,Alexa
SF:Jessie,Dmtcz 3.8153,Logitech Media srv,PiCorePlayers,Dashticz,Max2Play,InfluxDB,Grafana,HABridge
Feddan
Posts: 7
Joined: Wednesday 18 October 2017 16:04
Target OS: -
Domoticz version:
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by Feddan »

CaesarPL wrote: Wednesday 18 October 2017 16:25 Why blockly :) ? You can do it directly on the switch.
Oh, I did not know that. I will try that instead, thanks!
User avatar
jvdz
Posts: 2267
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by jvdz »

For the record: The SunSet blockly is never true as that is pretty impossible when you think about it! Maybe an OR relation would be better for that one. ;)

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
CaesarPL
Posts: 104
Joined: Tuesday 08 November 2016 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by CaesarPL »

Please check my example. When you press Timers, you can set time when you want to switch On or Off

Image
HW:Raspberry PiB+,Pi3,PiB,RFLink,FA20RF,DCS-930L,DCS-935L,Clarus switches,RF Temp sensors,Owl Micro+,Mi Flora,Kerui,Yeelight,Xiaomi,Broadlink RMM3,Alexa
SF:Jessie,Dmtcz 3.8153,Logitech Media srv,PiCorePlayers,Dashticz,Max2Play,InfluxDB,Grafana,HABridge
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by Derik »

you need to make a blockley more in this setup. because you use the extra if blockley...

Or you can use the base blockley.
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
olleman
Posts: 107
Joined: Thursday 01 January 2015 18:56
Target OS: Linux
Domoticz version:
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by olleman »

I'm having a similliar problem but my blockly is a bit more advanced so I can't solve it directly on the switch.

My first condition (this one triggers as expected)
is "If PIR on AND Time: >Sunset AND Time: <22.00
Set whatever Switch on for 2 minutes

Second condition (this one doesn't trigger)

"If PIR on AND Time: >Sunset AND Time: <Sunrise
Set whatever Switch on for 2 minutes

Any suggestions to what I'm doing wrong?
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by kuifje »

When its >sunset it is <sunrise, and the other way around. You dont need the <sunrise of the >sunrise. And you dont need the if/else blocky but the one without the blue thing.
Good luck.
Kuifje
Xztraz
Posts: 107
Joined: Tuesday 31 January 2017 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by Xztraz »

Set trigger on time and this works. (you'r script would trigger every minute between times)
Image
aDJa
Posts: 10
Joined: Monday 11 September 2017 10:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Friesland
Contact:

Re: "Time > Sunrise AND Time < Sunset" doesn't work

Post by aDJa »

Hi there,

I had the same challenge, but also wanted everything in de blockly with sunset sunrise.
unfortunately i still had to use a dummy switch but i got the rest in de blockly.

see attachement:
BlocklyActivatestairsDuringNight
BlocklyActivatestairsDuringNight
blocklytrappenhuis.jpg (97.91 KiB) Viewed 3203 times

p.s. the dummy has a sunrise and sunset timer but is also being turned off when the stairs are being turned off manually. (its not being turned on by the stairs)
OS: RPi4B, GH
ELECTRICITY: P1 Smart Meter USB
WATER: NPN inductive sensor
SOLAR: Omnik Inverter, PVOutput
LIGHTS: Philips HUE + GLEDOPTO + Yeelight
SENSORS: Xiaomi Temp + Humidity + Baro + Motion + HUE
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest