[APP][Pro] Sun Events (Update SDK3)

There’s a bunch of interesting things I can do with that approach, it can replace those curves above, I can calc that off the altitude, and then I am back on real data instead of a simulated curve.
On the other hand azimuth and altitudes have no when cards, only and cards, so no triggering. That puts me back to periodic checking, which is one of the things I am trying to avoid.
But if ya’ll say there ain’t no triggering possible with the flexibility I need, I’ll take that route anyway, even though it’s uncouth :slight_smile:

Edit: Oh, and thank you!
Edit2: I was wrong - see next reply.

Found this oldish topic on the same question. This How to start a flow at a spesific time stored in variabel, with built in functions (Solution - Check every 60 minutes) - #42 by Philippe_Mucher sort of sums it up.

Edit1: Hold on! There IS an Azimuth and Altitude trigger card - I was mistaken!!
Gonna see how they work right away!

Holy cow, a trigger for every degree shift!!!


OK, question before I disappear into my workshop :slight_smile:
Altitude is the angle from the sunlight hitting me right? Or not? If so, going from + to - is sunset, from - to + is sunrise? What happens during the day? It climbs to what before it starts declining? The highest altitude in the day means Zenith? (In that case the change in Zenith across days, with the accompanying changing day lengths, IS the expression of seasonal change…) The lowest negative value at night is Nadir?
How do I get from Azimuth to my time (EXcluding DST)?

See? Whole bunch of questions :grin:

Edit1: Hold on again. Post wiki here :slight_smile: Looks I was right on Altitude. But I didnt undestand Azimuth very well, I thought it just did a 360 with the rotation of the planet. But it looks like it is the rotational direction of the sun towards the observer.
Sooooo…

Altitude:

  • In winter: shorter period of positive Altitude (day time) and a lower top altitude (lower sun, max about 15 degrees up in the sky in NL)
  • In summer: longer period of positive Altitude (day time) and a higher top altitude (higher sun, max about 62 degrees up in the sky in NL)
  • In NL we live too northerly to ever have the sun pass directly over our heads (the earth doesn’t tilt that far - 23.5 degrees and NL is up at 52 degrees north) so Altitude never crosses 90 degrees. But if I would live in say, Addis Abeba, I would see the sun climb to 90 Altitude and then, as it crosses into the northern hemisphere of my sky,… drop back down again or continue into the 180 direction?

Azimuth:

  • what is the seasonal variation there? Its still just a 360 degree rotation, but it must happen differently because of the change in angle towards the solar equatorial plane, at least, the pacing should be different. Or not? Do we have exactly the same Azimuth progression every day, does it “just tell time”? I am so confused.

Edit 2: Hmmm this makes kind of sense… Azimuth functions kind of like time, but you can see the blue time lines “curve” across the red Azimuth angles, especially mornings and evenings in the summer. See? It does have seasonal behavior. But I am still confused.

Edit 3: An on top of that, just now I was reminded of this:


Those degrees, is that Altitude?

Edit 4:
I recognize that B1 event - that’s Nadir. So 0 Azimuth is Nadir? That would make 180 Azimuth Zenith?
image
Also, the Altitude just stops triggering somewhere during the night?

It’s azimuth. Sun events app is mostly about the position of the sun towards the earth.

Altitude comes in handy when f.i. the sun shines right through your window in winter time, (low altitudes), and isn’t “that annoying” during the summer (high altitude). You can use it to control the shades in a smart way, next to azimuth, which determines the position of the sun, from left to right so to speak.

Also, azimuth === regular interval.
It takes 4 minutes to shift a degree, no matter what season.
In other words, when you want a trigger on every azimuth change, you could use the “every 4 minutes” trigger as well.

Hi @Peter_Kawa , great that you come back and help me out!

360/(24*60)=0.25 - yeah that holds. That’s earths rotational speed in degrees/minute. 15 degrees per hour.
But your claim that this means a equivalent linear progression for AZ doesn’t hold I think, consider what happens at 52 north (NL) in summer:


I thought that AZ===time or AZ===“Earths rotation angle” would hold during equinox, but even that doesn’t seem to hold.
This is Singapore seasonal chart (almost on the equator!) - you can see the “warp” is biggest during solstice and flat at equinox:

and here is that same site giving me the values at autumn equinox:

Here I imported a Singapore year in Excel. See the quick Azimuth changes around the 12h/13h?

Let me see, hmmm. more pictures then :slight_smile:

I mean am I going mad here?

Edit1: Any math geeks can make any sense of this?
Science stuff on azimuth calculation

Edit 2:
Yes - I am crazy. When I draw it out I get this - rotational angle of the earth equal to the suns angle towards the surface plane.


So, so confused…

Wow, you are taking a deep dive into the subject. I am afraid that I am not knowledgeable enough to answer your questions or advice you better than you do yourself.

I use azimuth and altitude for controlling my sun screens. Using a compass I first determined the orientation (azimuth) of my windows. From that I determined the azimuth- range when those screens should be lowered (or can be rised again).

What you see is that at a fixed time the azimuth is the same each day. Sunrise is the moment the altitude is zero. Sunrise at an earlier time means the the sun rises at lower azimuth (more to the east).

The altitude is used by me only at the end of the day: when the altitude is too low the sun is blocked bij trees and buildings at the horizon, so the screens are rised. I estimated the limiting altitude by just looking at the sun.

After some optimizing bij tweaking the azimuth an altitude windows I have a very stable situation now that adapts itself to the season.

Regards,
Paul

1 Like

I will try something similar I think, thanks you for that!! I will probably start playing around with the custom events since those are based on Azimuth. Thank you for the idea.

So enough theory, let’s stick to something practical: testing with Sun Events itself.

That linear interval of 4 minutes? definitely not true. Here’s what happens when I analyse Sun Events AZ trigger logging. The top is AZ progression, the middle a scatter chart of the time difference between a trigger and the previous one, using the log (Simple Log) timestamps. Something is pacing these triggers, trying to make them appear with full minute distances - but its not working. I don’t know what is happening under the hood there.

And when you zoom into the AZ progression graph you will see it looks linear - but it’s not.


Here is a longer one, you can see the sinoid wobble.

Combined with scattergraph of time between triggers: you can see a lot of (exactly!) 3 minutes and 4 minutes, but - especially in areas where the graph climbs faster - also 5 minutes.

Things just got a whole lot weirder.
Edit01:
Why are there 361 degrees of Azimuth?
image