Feature description
In a scene, I want to be able to have a trigger « When the sun is at altitude 31°, azimuth 160° »
Feature description
In a scene, I want to be able to have a trigger « When the sun is at altitude 31°, azimuth 160° »
Hi @cce66 !
Can you detail a bit more functionally what you want?
A feature request should be clear and concise about what you’re asking for, focusing more on the what than on the technical implementation.
Example:
Title: Add a scene trigger based on the sun’s altitude
Description:
In a scene, I want to be able to have a trigger « When the sun is at altitude XXX ».
Thanks ![]()
That’s exactly it: « Add a scene trigger based on the sun’s altitude AND azimuth »
In a scene, the goal would be to be able to trigger the opening or closing of roller shutters depending on indoor/outdoor temperatures and, ideally, upcoming temperature forecasts (provided by OpenWeather).
For example, in a bedroom a northwest-facing window doesn’t receive sunlight in winter while the southeast-facing one does; since it’s the same room, during the day I would like to open the shutter receiving sunlight as soon as the sun is aligned with it and keep the shutter that doesn’t receive sunlight closed, and do the opposite in summer to avoid overheating the rooms. I reduce my electricity consumption if I have air conditioning (summer) or heating (winter)!
Possible based on this library (lib): https://github.com/mourner/sunc
So I edited your request @cce66 with the information you gave me
Let’s let people vote now!
On my side I’m trying to develop a heliotrope integration but it’s not easy, I want to get it working because that will then allow me to develop an integration for the IPX800V5. It’s true that there’s a lack of a good, complete summary doc a bit like ListToDo, there are things I still don’t get in the file structure but it’ll come eventually. For now I tried to do like in the dev integration live — my npm start on the front crashes I don’t know why… for experienced devs in this environment it works but for those who are starting or want to start it’s tough!!!
We should create a separate Gladys-dev folder that would contain only a copy of all the folders/files impacted by a new integration so we can refer to it because once we’ve made changes we don’t really know anymore where we made them or where to start checking if it doesn’t work. Right now I feel like I’m facing an overcomplicated, Russian-style contraption trying to do reverse-engineering rather than following a vade-mecum! ![]()
We already use the suncalc library in Gladys https://www.npmjs.com/package/suncalc
I think this should be part of the core and not a specific integration.
Cool, that means it shouldn’t be too difficult to implement and I think it would be a great help! ![]()
Sun position
SunCalc.getPosition(/Date/ timeAndDate, /Number/ latitude, /Number/ longitude)
Returns an object with the following properties:
altitude: sun altitude above the horizon in radians, e.g.0at the horizon andPI/2at the
Hello,
I’m bumping this thread because I need to retrieve (preferably without an external API) the sun’s altitude and azimuth in order to better manage (partial opening/closing) my roller shutters in scenes.
Would it be possible to add them to the Gladys core knowing that we use the suncalc function (from what I’ve read on the forum)?
EDIT: I’m copying some information from Lunarok’s docs for his heliotrope module for Jeedom (which I used before Gladys):
Définitions :
Azimut : angle absolu par rapport au nord (le nord étant à 0° et les valeurs augmentant en tournant dans le sens des aiguilles d’une montre, lorsqu’on regarde le sol depuis le ciel)
Altitude : angle sous lequel on voit le soleil, par rapport à l’horizon qui est la référence.
Il y a deux notations possibles pour l’azimut : azimut (de 0 à 180 puis de -180 à -0) ou azimut360 (de 0 à 360). Vous utiliserez celui qui vous convient le plus.
Exemples : Le soleil se couche à l’ouest, soit 270°. Le soleil à la verticale parfaite aura une altitude de 90°, un soleil qui a disparu sous l’horizon aura une altitude négative.