This object is in archive! 

Using Sunset/Sunrise without scheduler

Bernd shared this question 7 years ago
Need Answer

Hello to everybody

As the scheduler doesn´t work with the cluster I am searching for a different method to trigger some virtual switches depending on sunrise / sunset.

I tried it with: when NOW = SUNSET and the other wise round when SUNSET = NOW

when TIME of NOW = TIME of SUNSET / when TIME of SUNSET = TIME of NOW

The rules were accepted but nothing happens with the virtual switches.

So has anybody a different idea or otherwise when will the scheduler function work within a cluster system?

Thanks

Bernd

Replies (7)

photo
1

You cannot do it like that in rules. I think you will need to use an external service like IFTTT maker channel, or any other service that can do HTTP GET, to set a virtual sensor on/off.

photo
1

use a light sensor such as the 4in1 or Fibaro to detect light levels outside instead. Or as Marius suggested, you could use the IFTTT and the maker channel that will link with a virtual sensor in zipato.

photo
1

I just posted this, which might be of interest:


https://community.zipato.com/topic/a-method-for-creating-manipulable-time-and-date-values


If you set up a rule that detects changes to the time value of the virtual meter, and compare the value to previously stored sunrise/sunset values, that would presumably work.

photo
1

Seems way overkill for this purpose, to have a virtual sensor with one scheduler and use that across the board will do more than that. I actually find zipato scheduler with astro function to be reliable enough, in case it does not work I have another scheduler based on time to set/reset this sensor in case the Astro one didn't work for any reason. Anyway, as always, your solution is impresive, you could for sure help Zipato finish their half-way developments for sure!!

photo
1

Hehe, yeah but apart from sunrise/sunset I use it for calculated elapsed time and so forth. Stuff you can't do with the Zipabox's date/time information.

photo
photo
1

Actually I use a different method right now. Rather than relying on a one-time only change of switch state (which is vulnerable to restarts or disconnections), I run rules every ten minutes to recalculate everything. First I work out whether it's daytime or not by looking at the sunrise/sunset values. Then I initialise four variables: MinutesUntilSunrise, MinutesSinceSunrise, MinutesUntilSunset, MinutesSinceSunset. Then I calculate those values using the sunrise/sunset times, and finally increment them in a rule that runs every minute. The first three parts run every ten minutes, so the system quickly recovers if the values are lost due to a reboot or whatever.


The third screenshot shows sunrise/sunset values imported from an external source (via a Google App Script), but actually I think you could use the Zipabox values just as easily.

photo
1

I think the first one should suffice along the one with the scheduler, I will actually do something like this instead of my plain scheduler backup rule. Thanks for sharing!

photo
photo
1

Do you have a virtual weather station set up already? Sunset/sunrise only works if you have at least one created.

photo
1

how can we use this values from the Zipatile ?

photo
1

Christian,


You have a few examples on this tread. If you would like to use sunset/sunrise in your system there are a few ways to do it;

1. Using new schedulers on each rule you want to use this values, selecting astro function and sunset/sunrise. You need at least one virtual weather station in your processor so this works.

2. Using a couple schedulers that turn ON/OFF a virtual sensor or switch and use this sensor through all your rules that require checking whether is day or night. You can use a "recovery" rule as David and I where discussing above.

3. If your rule doesn't need to be started by these events (sunset/sunrise) rather from another event but at this point you need to check whether is day or night, you could also use the combination of operators and variables; IF TIME OF NOW BETWEEN x AND y THEN....


Hope this helps.

photo
photo
2

As the scheduler doesn´t work (at least for cluster systems) I created the following rule:

5ae09a44dba27bfd6324319813f7c027

The whole rule is triggered by a change of at least one luminance value in a number of rooms. I take luminance as this is the only sensor which changes permanently during the day even if nobody is at home.

By any change of luminance I check the current time. If it is between sunrise and sunset from the virtual weather station I set the virtual switch day (Tag) to on and night (Nacht) to off. If it is not I set the switches vice versa.

With these two virtual switches I control everything what has to do with day and nicht

Nevertheless it would be great if the scheduler would work again ;-)

Bernd

Leave a Comment
 
Attach a file