Sun Events (Zonnestanden) event creation in configuration and use of azimuth values

Good day,

I have a couple of questions about the Sun Events (Zonnestanden) app which for me are all related to each other.

I want to use this app to open my window roller screens when the sun is not shining on the window anymore, per window depending on the location of the window and the position of the sun.
The standard events in the app are too far away from what I need, even with the offset up to 60mins.

First some questions about events in the configuration.
I can create an event and I can use this event in a flow as a trigger, I assume.
I need to fill in a grade and then assign two names, one for “up” and one for “down”.

Some questions on this:

  1. How does the up and down work? Is the up triggered when it enters the value and down when it leaves the value?
  2. The range is -90 to 90. What does this mean for someone like me in the northern hemisphere? Does -90 mean exactly east, 0 south and 90 west? Or the other way around? Or does it mean something else?
  3. I cannot enter negative values via the Homey app in the field. How can I enter negative values? Or is it some setting on my Android phone perhaps and nothing to do with the Homey-Sun Events?

Second is about the Azimuth value. I thought I could find out the answer on my second question to see the current Azimuth values and follow them for a while.
I started with an event when Azimuth changes, but I guess that Homey doesn’t like that as it happens too often. So I changed the trigger to every 5 minutes. And then I push a notification in the app showing the current Azimuth value.
The Azimuth value does not seem to be the grade as the value started with 147 around 9:30am and is increasing to 180 around 12:15 and still increasing further at this moment.
So this does look like the Azimuth is going from 90 (East) to 180 (South) and 270 (West), or maybe even 0-180-360?
So how does Azimuth work?
And with these values it does not seem to be that Azimuth is the same value as grade in the events as I cannot fill in any value above 90. So is there another way to see the current grade?

It would be great if I could use the events, but it does not seem to work for me (minus sign issue).
It would be great if the azimuth would be the value in the event, but it does not seem to be.

Or am I doing something wrong here?

Thanks in advance for any help!
Johan Bakkers

Reply to myself.

I think I got it.
Azimuth is from 0/360 as exactly north (for us in the middle of the night), 90 is east, 180 is south, 270 is west.
Then there is also elevation, height. That can be 90 degrees (around 12am on the equator) or -90 (around 12pm on the equator).

Events can be created on grades. Grades are probably the elevation and not azimuth.

This implies that I can’t use the events from the app to use for my roller screens as I want azimuth for that. This also implies I need to use a time trigger and check the azimuth if it is bigger than a certain value AND the roller screens are not up yet. That’s a pity as it triggers a flow more often than needed.

I still do not know why I can’t enter negative values in the events, but for me that is not important as I won’t use it.

You can get azimuth and elevation with the api from Meteoserver for your city. You can get the actual situation and per hour for the next 4 days. You can make 500 calls per month and azimuth and elevation can be obtained with 1 call. I have made a Homey script to get the weatherdata automatically in variables. Today I have adjusted it for myself to get some extra data. This adjusted script also gets azimuth, elevation, sunshine in minutes per hour and sun strength in Watt per Hour.

1 Like

I’m not sure if your thoughts about the Sunevent App are too complicated. Or I don’t understand your requirement.
I also do not understand why you cannot enter negative values. For which event? And for what?
I understood your requirement like this:
Your blinds should be opened when the sun no longer shines on the window.

It would help (me) if you could give some more information about your requirements. In which conditions (time, temperature, lux, azimuth) should the blinds be closed and in which conditions should the blinds be opened again (azimuth only?)

To determine the current azimuth I use this app:

1 Like

Hi @Marcel_Ubels and @fantross,

First thanks for your replies! Ok, so let me explain thoroughly as you requested :wink:

The app of Sun Events does have the azimuth values. So I do not need another app to get the values.

And no, my thoughts are not too complicated in my opinion as the possibility is almost there, but not quite.

The Sun Events app does have some standard events built in for several positions of the sun. These events can be used in the IF section. You can even enter offset times in the IF statement up to 60 minutes before or after the event.
In the THEN section you can retrieve light, elevation and azimuth values in the app.
So all fine, great app for this.

But especially in the summer the time between the latest event in the morning and the highest position of the sun, and between the highest position of the sun and the first event of the evening, is too big. Therefore I need events “in between”. And Azimuth can help here, cause it is also independent of the season where gradient (elevation) values of the sun are depending on the season.

I have roller screens at three sides of my house. I want my roller screens to be closed/stay closed after waking up, when the sun is shining on the window to keep warmth outside, but to open roller screens when the sun is not shining on my window anymore to get some light and some fresh air in.

As I do know how my house is positioned in wind direction state, I can also figure out at which azimuth the sun is or is not shining on my windows, so I know when to open or close the roller screens.

The elevation, height or whatever you call it, is season depending and do differ on a daily basis from summer to winter and back to summer. So that does not help me.

In the Sun Events app in the configuration screen, it is possible to create your own events to be used in the IF statement. Great! Well, it does not use the azimuth values. You can only enter the elevation (height of the sun) values. So this great feature will not work for what I want. Therefore I have to read out the azimuth value between certain times of the day. Not a big issue, but the events would be better :laughing:
I am not sure if azimuths are always at the same time of day independent of the season. If so, I can read it out to test it and then set the rollers on time instead of azimuth values and problem will be solved too.

Besides this “issue” somehow I can’t enter any negative value in that grade field for “self-made” events. But as I will not use those events, it is not an issue (anymore) for me tbh.

Together with the azimuth I also need weather info like temperature and cloudiness, but that’s a different (and hardly trustable) thing which can be done with other apps. BTW: I am waiting for the moment Homey will go to v5 so the KNMI app will be available which I hope to be more trustworthy than the OpenWeatherMap app. But that’s also another thing :wink: .

On second thoughts…azimuth must be linked to time, taking into account summer time of course. So problem solved.

Thank you very much for the detailed explanation.

Yes, you’re right. The azimuth is independent of the season and the time (summer/winter time)
Quote from Wikipedia: The azimuth is counted either starting from south over west (south azimuth), so that a star in the south has an azimuth of 0° and a star in the west an azimuth of 90°, or from north over east (north azimuth).

I use the azimuth in combination with the brightness of the sun (cloudy / clear sky) also in flows to protect our aquarium from the sun. The blind will be closed when the brightness exceeds a certain value (25000). The blind will be opened again when the sun has disappeared behind clouds or the sun no longer shines through the window with the aquarium. As trigger I use the brightness and the azimuth is one of the conditions. This works without problems. There is no need to use the „own settings“ in the Sunevent App. This is what I meant with “thinking too complicated”.

Lux has changed
Lux < 15000
Lux > 15000
Azimuth >= 130
Open blind

To avoid a permanent raising and lowering of the shutter and unnecessary triggering of the RollerBlind modules I also use variables and timers.

1 Like

Thanks for the insight.

I want something similar, but thought I could use an azimuth trigger created in the app itself.

I also use Lux for sun screens elsewhere. But lux changes all the time. I have to take into account a single cloud or so creating temporarily shades, so I read three lux values in a row (every 5 mins) and when they are all three below a certain value, I assume it became cloudy so the screens go up again. And still there are days where the screens go up and down a lot.

So with my roller screens, I wanted to be less dependent on lux, also because I do not have lux sensors all around and I do not want to buy sensors for everything. Especially outside it is not a pretty thing to add to your house and there is already enough attached to the house. And I also think I can do without extra sensors.

I want it to be acting more on the position of the sun related to my windows. And also depending on the time of year (in winter sun is welcome), temperature and cloudiness via a weather app even though knowing it is also not trustworthy, but okay.
So the position of the sun is why I thought azimuth would give a sulotion. But I don’t want to check every 5 mins, that’s not needed if you have the option to create personal events inside the app. Unless, as it seems, the app only supports events created on elevation (grade) of the sun. So my idea does not work, unless I do check every x minutes.

But indeed, I came to my senses, azimuth is a fixed value at each time of the day. Where I live azimuth 180 (S) is always reached at 12:22 and 0, or 360, (N) at 0:22. So 90 (E) will be reached at 6:22 and 270 (W) at 18:22. That is in standard time, so Oct till Mar. In the summer it will be one hour later. If I know at which azimuth the sun is not shining on my window, I can calculate the exact time while it doesn’t have to be that exact. So I can work with time events instead of azimuth events. Problem solved.

Btw, the insight of the exact time of 180 and 0 was because of the Sun Events app.
Btw 2, although I do not need it, missing negative sign to enter grade value in the personal event is still strange.

This is exactly what I do also. And yes, the blinds goes up and down sometimes. But you can still adjust the values to reduce the up and downs.

You can use azimuth as trigger (Azimuth has changed). In the “And…” section you have to use a logic card with the azimuth value you need (is exact/is smaller than/is bigger than). In combination with a temperature or lux value in the “And…” section you can define when the flow should be triggert. You can also use an azimuth range:
Azimuth has changed
Logic card Azimuth >= 10
Logic card Azimuth <= 25
Temperature >= 25 °C

Every time the Azimuth value (in degrees) changes, the flow will be triggert and the conditions in the And… section will be proofed if they correspond or not.

But you can also go another way. Your main reason is to protect the house from warming up in the summer respectively at hot days. So you can use the temperature as trigger in combination with the azimuth and/or lux and the season. Even though the sun does not shine strongly, but it is still warm outside, closed roller shutters keep the heat out anyway. You can open the shutters at a certain time/azimuth or when the temperature drops. I open the shutters again when the temperature has dropped to a defined value or at the latest at a defined time/azimuth.

It is not absolutely necessary to install a light sensor on each wall of the house (each sun direction). It is only necessary to determine the limit values for each direction individually. From my experience I would even recommend a place where no direct sunlight hits the sensor. Online weather services like WU are too imprecise for me. Btw, is KNMI a special dutch weather service?
For outdoor applications I can recommend the Philips Hue Outdoor Sensor. Since a few months I have also installed a Xiaomi light sensor outdoors. This sensor is cheap, very small, should be waterproof and its temperature working range is between -10 to +50 °C. It survived the hot summer without damage. Wait and see if it will survive the winter without damage.

As mentioned in the description you can use negative values, but only in the range between -90 and 0 degree.

1 Like

Btw, the KNMI app is available in the Community App store.

1 Like

@fantross, you describe everything I wanted to do. But I used the IF azimuth changed trigger for learning purposes to see which values came out of it. But somehow Homey didn’t like it. It stopped the flow.

Anyhow, as said, I do not need the azimuth anymore. I have (I hope correctly) calculated when the sun does not shine on the window anymore. And yes, you’re right, also on cloudy but warm days the roller screens do have value to keep heath out. And no, I do know, placing strategically light sensors can do a lot with different values. But also that I can do without to reach my goal as it does not have to be 100% precise.

The KNMI app is indeed Dutch and indeed in the store, but it is in fact still in beta version and only working for Homey v5 which is also still in beta. I’ll wait for the full release. I do have hope, against knowing better, that a Dutch app will be more precise for me as Dutch residence than the OpenWeatherMap.
BTW: I use Buienradar to check rain, also a Dutch app, to lift my sun screens i our sun room or conservatory when it is going to rain in 10 minutes, and that is also absolutely not precise. So probably it will be false hope :grin:

Anyhow, thanks for sharing your insights!

1 Like

You are welcome. :+1:t3:

But now I am little bit curious. Why did the flow with “If the azimuth changes” not work? Was the flow triggered too often and therefore Homey disabled the flow? Or what was the problem/reason?

@fantross. My guess indeed was that it was triggered too often. There was an error message, not sure what anymore, and the flow was disabled.

I am not sure if it was related, but another app, Verisure, was also not working anymore since about that time. So maybe it was Verisure causing the error, but that was working properly for months and nothing changed and no related flows were disabled. So I think somehow it was the other way around. Not sure about this, but maybe the Verisure app is also polling at timed intervals and Homey closed all polling apps. Though, the Philips Hue motion sensors also do a kind of polling (every 5 mins) and these are still working fine. So not sure.

If the azimuth would be triggered by changing every full degree (this is what I guess), then a flow would be triggered only every 4 minutes. This should actually not be too often. I haven’t read anything about this problem in the forum either. But it is as it is and you have found a solution. :+1:t4:

1 Like