Page 5 of 38

Re: SunTracker - with moving ghost

Posted: Mon Aug 16, 2010 6:42 pm
by krambriw
OK, I see, I could add that the plugin shall send an event with weather compensation as well. (normally it is each actions responsibility, you have individual settings for it where the weather and offset settings are used together in the calculation)

I believe we would also need settings for the weather compensation factor then???

Best regards, Walter

Re: SunTracker - with moving ghost

Posted: Tue Aug 17, 2010 4:00 am
by vuego
Hmmm we should not make the configuration too complicated. I don't think there's need for another weather compensation setting.

Let me give an example. Let's say that the sun sets at 21:00 but it's cloudy and weather time compensation is set to 60 min (I'm only using one action).
Currently SunTracker would trigger an event at 20:00 but GetContentsOfVariable will return True until 21:00.

This is my main problem. If GetContentsOfVariable would return False at the same time as SunTracker trigger the On event, all would be fine.

Re: SunTracker - with moving ghost

Posted: Tue Aug 17, 2010 11:46 am
by krambriw
Hi Vuego,
Below is a new beta version with a new action added (no configuration needed). Could you try it?

Use it as example in a python script like this:

Code: Select all

bSunStatus = eg.plugins.Suntracker.GetSunStatusWeatherCompensated(15)
print bSunStatus
Edit/correction:
15 is the number of minutes for the compensation, same as in the main actions (should be 0-60 min), same rules as well. Use the same number of minutes you used for your projector action you defined already

You might be right on time compensation during the summer. I guess I'll find out in a couple of months :)
How did this work out for you during this summer? Here at my house it seemed to be a good solution.

Best regards, Walter
__init__.py
(132.5 KiB) Downloaded 370 times

Re: SunTracker - with moving ghost

Posted: Wed Aug 18, 2010 6:27 pm
by vuego
Walter, you're the man!
This new action seems to work just as intended (I've just tried it today so far:)).

Regarding the summer settings I'm not really sure what it does. I haven't configured the Summer Season settings but my lights have gone on/off with -60, -30 or 0 minutes of weather compensation and I think it has worked out very well.

Thanks again :D

Re: SunTracker - with moving ghost

Posted: Mon Aug 23, 2010 6:04 am
by krambriw
Good to hear!

I have tried it as well and I think it works fine

In addition I found a small snag that still could allow that lights could go off or on due to late weather changes. I have now adjusted this as well and tried it for a couple of days. I have also tried to clean up the code, mainly to avoid duplicated code sections to ease maintenance

The new complete version is as usually in the first post

Best regards, Walter

Re: SunTracker - with moving ghost

Posted: Tue Aug 24, 2010 8:44 am
by jaaahaaa
I've got some problems to set it up. I want my lights to turn off 1h after sunrise. Then in the evening I want them to turn on 1h before sundown. How do I set that up?

I'm a bit embarresed to ask but I did go through the readme :S
Thx for a cool plugin

Re: SunTracker - with moving ghost

Posted: Thu Aug 26, 2010 5:52 am
by krambriw
Hi, yes this is not so obvious how to set it up but you can do it in the following way as shown in the picture below

- We need to set a time for the function to start (I put in ON at 11 but if the sun is up, lights will not be turned on until later anyway) ;)
- With an offset of -60 minutes the lights will be turned ON one hour before sunset and stay ON until one hour after sunrise next day

(If you start to use weather data as well, that time setting compensation will start to work together with the offset setting dynamically depending on the weather conditions)

Best regards, Walter
Image3.jpg

Re: SunTracker - with moving ghost

Posted: Thu Aug 26, 2010 10:47 pm
by jaaahaaa
Thanks seems to work really neat now!

Re: SunTracker - with moving ghost

Posted: Tue Nov 09, 2010 12:01 pm
by krambriw
Uploaded a modified version. I made some small bug fixes

# 2010-11-01 Fixed a bug in logging function daylight savings True/False
# 2010-08-30 Fixed a bug in the weather data compensation

(Just replace the __init__.py file if you have the previous version installed)

Best regards, Walter

Re: SunTracker - with moving ghost

Posted: Wed Nov 24, 2010 6:33 pm
by vuego
Hello Walter.
I'm using your latest version of SunTracker_09.11.2010 and I was wondering why my log keeps getting filled up with SunTracker: Daylight saving is FALSE and W. Europe Standard Time - Timezone every minute.

I haven't seen this behavior before. I've unchecked "Print normal loop information". Any ideas?

Re: SunTracker - with moving ghost

Posted: Thu Nov 25, 2010 9:16 am
by krambriw
:oops:
I uploaded the wrong version (without the fix for that problem)....The correct version is there now

Best regards, Walter

Re: SunTracker - with moving ghost

Posted: Sat Feb 19, 2011 6:13 pm
by dt1000
Quick question:
What is the "Sunstate" action supposed to do?

I assumed it would create an event with the sun state in it, but it doesn't seem to do anything...

Thanks,
Dan

Re: SunTracker - with moving ghost

Posted: Sat Feb 19, 2011 7:19 pm
by krambriw
The idea was to allow you to use the current sun status from "outside" of the SunTracker plugin. Like in a script, where you can make a decision based on "if statements", what to do if the sun is up or down

To use the actions you can do like this example in a script

Code: Select all

bSunStatus = eg.plugins.Suntracker.GetContentsOfVariable()
print bSunStatus

bSunStatusWeatherCompensated = eg.plugins.Suntracker.GetSunStatusWeatherCompensated(15)
print bSunStatus
You will see that it prints True or False

The first alternative will give you an answer if the the sun is up (True) or down (False). The second shows basically the same but with weather compensation (15 minutes in this case) depending if it is cloudy, sunny, foggy etc. The weather compensation concept is described earlier in this thread

Best regards, Walter

Re: SunTracker - with moving ghost

Posted: Wed Jul 20, 2011 8:32 pm
by piert
krambriw wrote: bSunStatus = eg.plugins.Suntracker.GetContentsOfVariable()
print bSunStatus


... will give you an answer if the the sun is up (True) or down (False).....
Hi Walter,

Is it possible to also get just the sun up/sun down request with an offset value?

I would like to use the command in a Python command to get an 'instant offset sunset value'. I thought maybe I could use the parenthesis that you use for the weather offset, but if I add an offset value of -20 between the parenthesis (like: GetContentsOfVariable(-20)) it does not work.

Thanks,
Perry

Re: SunTracker - with moving ghost

Posted: Wed Jul 20, 2011 8:58 pm
by krambriw
Hi Perry,

Just to be sure I have understood you correctly:

You want to have the possibility to ask for the offset relative sunrise/sunset. I understand that you would like to send a request like

sunSetOffset = GetSunSetStateOffset()

this would return a value +/- how many minutes left/passed since last sunset

Similar

sunRiseOffset = GetSunRiseStateOffset()

would return the same for sunrise


Lets say it is 1 hour 20 minutes left to sunset: GetSunSetStateOffset() would then return a value of +80


Have I understood you correctly?

Do you want to have the possibility also to add a value in the call for weather compensation? Like GetSunSetStateOffset(15)



Best regards, Walter