Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
SunTracker - with moving ghost
Re: SunTracker - with moving ghost
I get an error when I try "GetSunStatusWeatherCompensated(0)".
Everything between 1 and 60 doesn't display an error so far.
Maybe I haven't understood exactly what that value means, except that it is counted in minutes.
Can you please clarify?
Everything between 1 and 60 doesn't display an error so far.
Maybe I haven't understood exactly what that value means, except that it is counted in minutes.
Can you please clarify?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
The main idea behind the various possible actions is to check if the sun is up or down and to use this variable in a script to execute something based on the condition.
The "normal" one to use is the 'GetSunState'. It will return the sun state based only on the actual sunrise and sunset in your location.
If you intend to control something based on the sun state, it might be that you also would like to consider the current weather in your location. Like when you are turning on lamps, in bad weather conditions, lamps need to be turned on earlier and left on longer. For this purpose you could use the 'GetSunStatusWeatherCompensated' and add the number of minutes that shall be used in the calculation.
As in your example, if you set 'GetSunStatusWeatherCompensated(60)', the calculation will use 60 minutes in total for calculation, depending on the programmed rules (you can see and actually change this in the separate python file 'weather_condition.py' where the various sections hold their specific sets of weather conditions).
So if the weather condition is one of those in section 'weather_conditions_dark' the full time (in your example 60 minutes) will be applied and the lights will be turned on 60 minutes before the actual sunset (and consequently turned off 60 minutes after actual sunrise). If the weather is fair, clear, sunny or something else in the section 'weather_conditions_bright' no time will be added or subtracted...and then there is a section for weather conditions in between where the time will be divided into half.
When you use this you shall not use the value = 0 because it makes no sense, it is the same as using 'GetSunState' instead. The error you see now will not be there when the print statements are removed in the final version
Best regards, Walter
The "normal" one to use is the 'GetSunState'. It will return the sun state based only on the actual sunrise and sunset in your location.
If you intend to control something based on the sun state, it might be that you also would like to consider the current weather in your location. Like when you are turning on lamps, in bad weather conditions, lamps need to be turned on earlier and left on longer. For this purpose you could use the 'GetSunStatusWeatherCompensated' and add the number of minutes that shall be used in the calculation.
As in your example, if you set 'GetSunStatusWeatherCompensated(60)', the calculation will use 60 minutes in total for calculation, depending on the programmed rules (you can see and actually change this in the separate python file 'weather_condition.py' where the various sections hold their specific sets of weather conditions).
So if the weather condition is one of those in section 'weather_conditions_dark' the full time (in your example 60 minutes) will be applied and the lights will be turned on 60 minutes before the actual sunset (and consequently turned off 60 minutes after actual sunrise). If the weather is fair, clear, sunny or something else in the section 'weather_conditions_bright' no time will be added or subtracted...and then there is a section for weather conditions in between where the time will be divided into half.
When you use this you shall not use the value = 0 because it makes no sense, it is the same as using 'GetSunState' instead. The error you see now will not be there when the print statements are removed in the final version
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
Thank you, now it makes sense.
After passing the 00:30 mark without any problem, I believe that you've fixed the problem completely.
Some requests/ideas:
Is there a way to get the next sunrise's timestamp from SunTracker into a variable, kinda like GetSunStateWithTimeStamp does for (next?) sunset?
Also is there a way to use "GetSunStatusWeatherCompensated()" with "Check if time now is inside calculated virtual range" action? (i.e. I don't see an option to select "Weather Compensated Sunrise/Sunset" at it's dropdown boxes).
After passing the 00:30 mark without any problem, I believe that you've fixed the problem completely.
Some requests/ideas:
Is there a way to get the next sunrise's timestamp from SunTracker into a variable, kinda like GetSunStateWithTimeStamp does for (next?) sunset?
Also is there a way to use "GetSunStatusWeatherCompensated()" with "Check if time now is inside calculated virtual range" action? (i.e. I don't see an option to select "Weather Compensated Sunrise/Sunset" at it's dropdown boxes).
The dialog shows and allows zero values, maybe needs a fix and also add some of the description you gave above to it just to spice it up for those not reading the fora?krambriw wrote:When you use this you shall not use the value = 0 because it makes no sense, it is the same as using 'GetSunState' instead.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Thanks, will change to allow 1-60, thats easy!The dialog shows and allows zero values
For the rest of your ideas, I think all is possible (with software), just more or less work for each of them.
What are the use cases you have in mind?
Do you want actions to pick the time for upcoming sunrise (and sunset) into a variable?get the next sunrise's timestamp from SunTracker into a variable
This one is a bit more heavy to implement, I need to look at the impact and how much effort it will take, maybe I can find an easy solution.Also is there a way to use "GetSunStatusWeatherCompensated()" with "Check if time now is inside calculated virtual range" action?
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
I am just trying an easy way to combine the power of "Compensated Weather" with adding a preset offset, as offered by the other functions.
If you have a better idea in mind to do this, please guide me!
If you have a better idea in mind to do this, please guide me!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
@saxtus
Attached is a new test version. It includes new features as discussed and understood.
I hope I understood it correctly,
Best regards, Walter
Attached is a new test version. It includes new features as discussed and understood.
This action is based on the one where you can check if within time range for the various twilight options and +/- X minutes offset setting and now in addition, with weather condition compensation. This action will return True or False depending on if all conditions are met or not.- Added a getter action 'Check if time now is inside calculated virtual range with weather compensated offset' to check dawn/dusk calculations for various twilight options and +/- X minutes offset setting with weather condition compensation.
This action will return a list with two strings, one for sunrise time and one for sunset time in the following format:- Added a getter action 'GetTimeFor_SunSet_SunRise' to retrieve current time stamps for todays Sunset and Sunrise"
Code: Select all
('Up|0839', 'Down|1507')I hope I understood it correctly,
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
If i want to power on when sunset is and turn off when sunrise is, power on during whole night, how do I set it up then.
I have tried with ---- on everything but nothing happens.
I have to add at least OFF time, then it works.
Any ideas?
I have tried with ---- on everything but nothing happens.
I have to add at least OFF time, then it works.
Any ideas?
Re: SunTracker - with moving ghost
I get "URL Error" every 2 minutes.
I got this error as soon as I added Suntracker plugin.
I have Tellstick DUO, Broadcast and scheduler plugins installed.
I got this error as soon as I added Suntracker plugin.
I have Tellstick DUO, Broadcast and scheduler plugins installed.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
It might be that your location settings are incorrect...I get "URL Error" every 2 minutes.
Try to set '1100' on all days like belowIf i want to power on when sunset is and turn off when sunrise is, power on during whole night, how do I set it up then.
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
Thank you very much but I can't understand where do I set the weather compensated offset.krambriw wrote:This action is based on the one where you can check if within time range for the various twilight options and +/- X minutes offset setting and now in addition, with weather condition compensation. This action will return True or False depending on if all conditions are met or not.- Added a getter action 'Check if time now is inside calculated virtual range with weather compensated offset' to check dawn/dusk calculations for various twilight options and +/- X minutes offset setting with weather condition compensation.
I only see the standard offset... (either I didn't understood it correctly)
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
Oh, yes, good point, it is the normal offset setting that is used. Like if you set 60 minutes, when weather compensated it might be changed before it is used in the calculation (same rules applies as for all weather condition based stuff), all depending on the weather condition...
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
I am still confused...
Maybe if you can give me an example with numbers, so I will understand how the offset is used in conjunction with good and with bad weather conditions?
Maybe if you can give me an example with numbers, so I will understand how the offset is used in conjunction with good and with bad weather conditions?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
The action will return true
- if you are within the time range (with the weather compensated offset applied) between the selected twilight options (e.g sunrise/sunset or something else)
The rules for recalculating the offset are the same as described earlier above:
- you select 'Civil Dawn' and 'Civil Dusk'
- you set the offset to 60 minutes
What will happen is that depending on the weather condition, a certain time will be added or subtracted to the actual time for 'Civil Dawn' and 'Civil Dusk' when checking if you are inside or not. If outside the return is of course FALSE. Note that this time adjustment might change many times during the day, in the early morning, time may be added, in the evening, time may be subtracted, all depending on the current weather condition when the check is performed.
BestR Walter
- if you are within the time range (with the weather compensated offset applied) between the selected twilight options (e.g sunrise/sunset or something else)
The rules for recalculating the offset are the same as described earlier above:
As example, assume you define an action and you would like this to return TRUE as long as you are inside the range.So if the weather condition is one of those in section 'weather_conditions_dark' the full time (in your example 60 minutes) will be applied and the lights will be turned on 60 minutes before the actual sunset (and consequently turned off 60 minutes after actual sunrise). If the weather is fair, clear, sunny or something else in the section 'weather_conditions_bright' no time will be added or subtracted...and then there is a section for weather conditions in between where the time will be divided into half.
- you select 'Civil Dawn' and 'Civil Dusk'
- you set the offset to 60 minutes
What will happen is that depending on the weather condition, a certain time will be added or subtracted to the actual time for 'Civil Dawn' and 'Civil Dusk' when checking if you are inside or not. If outside the return is of course FALSE. Note that this time adjustment might change many times during the day, in the early morning, time may be added, in the evening, time may be subtracted, all depending on the current weather condition when the check is performed.
BestR Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker - with moving ghost
What I fail to understand, is where do I set the weather compensation minutes offset.
Thank you for your patience with me!
Thank you for your patience with me!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker - with moving ghost
The offset you set will not be fixed, it will be weather compensated...you set the maximum or minimum value it is allowed to have.
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM