This object is in archive! 

What is the "value" of SUNSET?

Jan shared this question 7 years ago
Need Answer

Hello there,


I am trying to make my light smarter. I have created a Virtual Weatherstation, and would like to check with a rule if sunset has happened.


I tried "1", "TRUE" and "true" but without luck. I looked at the API (feels like hardcore hacking to me...), but all I read was 'string'. I think the values I tried would better be described as booleans. Then I tried to get the value via direct api access using the uuic and stuff, but the browser window was empty. I can get values from my devices using this technique, but not from the Virtual Weatherstation.


I hope you can help me. Thanks in advance!


ZF2EWoM

Replies (1)

photo
1

Maybe something like this is the value:


  1. { "hour": "16", "minute": "56" }


I guess it will be impossible to get something useful for my rule out of this string.


The only workaround that comes to my mind is a variable/virtual switch, and two more rules that change the value according a scheduler (SUNSET/SUNRISE). What a pity! I always try to have as few rules as possible...

photo
1

sunrise and sunset are generally used with the scheduler block.

photo
1

The value of sunrise and sunset in the virtual weather station is a time value in the form of a string, like "17:00". To turn this into a usable time value, use "time of (weather station[sunset])".

There's an extensive discussion on this here, with example rules:


https://community.zipato.com/topic/virtual-weather-station-cloudiness

photo
2

Short answer, there are basically two ways of doing this (using Zipato resources only, or you can ask David how to create VERY reliable and complex weather updates).

1. Short way is by using comparison IF TIME OF NOW BETWEEN TIME OF SUNRISE AND SUNSET THEN whatever on each rule you want to use it.

2. Using a few rules you turn ON/OFF a virtual sensor/switch based on DAYTIME/NIGHTIME using schedulers with astro function, and then use this sensor/switch in the rules you want.


My case is second. See attached, third rule is an hourly check I perform "just in case" and I also do the same when the zipabox restarts.

photo
2

Thank you very much Alberto & David. The "Time of SUNSET" did the trick.

photo
Leave a Comment
 
Attach a file