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
-
prostetnic
- Posts: 28
- Joined: Fri Apr 18, 2008 6:52 pm
- Location: Sweden
Re: SunTracker plugin - with moving ghost
The link to the last two versions are broken. Something to do with the new server?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker plugin - with moving ghost
I think it is related to new web design maybe...
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker plugin - with moving ghost
I have made a small update of the Suntracker plugin
I needed a global flag (eg.globals.SunIsUp) that indicates if the sun is up or down at my location. The reason behind is that I wanted to start to use some rf devices now available on the market from suppliers like Nexa and others
There are several wireless IR detectors and magnetic door contacts available as example
To receive the rf signals from those devices, I have modified a Powermid Pyramid receiver (the RF->IR pyramid). I tap into the circuit using a capacitor in serial with a microphone cable that is connected to a usb sound card mic input
To analyze the signals received, I use a very nice java software, NetHomeServer, kindly developed by Stefan Stromberg, that has the capability to analyze and detect rf signals from several type of supplier products (http://wiki.nethome.nu/doku.php)
To communicate with NetHomeServer, I made a small plugin for EG that receives selected events and just converts them to standard EG events
All of this is still in a alpha state...soon I hope to be able to publish the plugin as well as some photos on how to modify the pyramid
The following picture shows a very simplified version of my own EG setup that is currently in testing in my house
As before, I have my SunTracker plugin running to control my outdoor lights using the USB-UIRT and a Powermid Pyramid transmitter (IR->RF). I wanted to add some alarm monitoring to EG
If someone is walking in my garden adjacent to my garage when the sun is down I would like that the lights are turned on. I therefore use the IR Motion detector signal that triggers a macro. The macro itself schedules another event that runs a second macro that turns out the lights again after a predefined time period
To check the status of the sun, I use two simple python scripts in the macros like the following
Check sun status DOWN
Check sun status UP
In addition I have played with triggering the new KeeneIR control to control some additional equipment
When the sun is up, the IR Motion detector signal is instead used to start a door bell (rf receiver)
Putting a magnetic contact at the door to your pool house would allow you to get notified if someone enters after sunset and you could of course also automatically turn on the lights in the pool
With the modified pyramid, I cover a circular area with an approximate radius of 30 metres, well enough for my house and garden
If you think about it, combining all available plugins, makes up for unlimited possibilities
Best regards, Walter
I needed a global flag (eg.globals.SunIsUp) that indicates if the sun is up or down at my location. The reason behind is that I wanted to start to use some rf devices now available on the market from suppliers like Nexa and others
There are several wireless IR detectors and magnetic door contacts available as example
To receive the rf signals from those devices, I have modified a Powermid Pyramid receiver (the RF->IR pyramid). I tap into the circuit using a capacitor in serial with a microphone cable that is connected to a usb sound card mic input
To analyze the signals received, I use a very nice java software, NetHomeServer, kindly developed by Stefan Stromberg, that has the capability to analyze and detect rf signals from several type of supplier products (http://wiki.nethome.nu/doku.php)
To communicate with NetHomeServer, I made a small plugin for EG that receives selected events and just converts them to standard EG events
All of this is still in a alpha state...soon I hope to be able to publish the plugin as well as some photos on how to modify the pyramid
The following picture shows a very simplified version of my own EG setup that is currently in testing in my house
As before, I have my SunTracker plugin running to control my outdoor lights using the USB-UIRT and a Powermid Pyramid transmitter (IR->RF). I wanted to add some alarm monitoring to EG
If someone is walking in my garden adjacent to my garage when the sun is down I would like that the lights are turned on. I therefore use the IR Motion detector signal that triggers a macro. The macro itself schedules another event that runs a second macro that turns out the lights again after a predefined time period
To check the status of the sun, I use two simple python scripts in the macros like the following
Check sun status DOWN
Code: Select all
if not eg.globals.sunIsUp:
print "Sun is down"
eg.StopMacro()
Code: Select all
if eg.globals.sunIsUp:
print "Sun is up"
eg.StopMacro()
When the sun is up, the IR Motion detector signal is instead used to start a door bell (rf receiver)
Putting a magnetic contact at the door to your pool house would allow you to get notified if someone enters after sunset and you could of course also automatically turn on the lights in the pool
With the modified pyramid, I cover a circular area with an approximate radius of 30 metres, well enough for my house and garden
If you think about it, combining all available plugins, makes up for unlimited possibilities
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker plugin - with moving ghost
Hi,
I have updated this plug-in to use the python module "calendar" to check weekdays. There was a problem reported with the old method I used. Hope this works better
Best regards, Walter
I have updated this plug-in to use the python module "calendar" to check weekdays. There was a problem reported with the old method I used. Hope this works better
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker plugin - with moving ghost
Thanks for all your work in this!
I'm not quite certain if I'm missing something but I can only input two numbers followed by four decimal points for my lat and long.
My lat is +50 and my long is -113 (plus some decimals). How can I enter the -113 into the configuration?
Thanks!
I'm not quite certain if I'm missing something but I can only input two numbers followed by four decimal points for my lat and long.
My lat is +50 and my long is -113 (plus some decimals). How can I enter the -113 into the configuration?
Thanks!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker plugin - with moving ghost
Hi, you mean like this?
Stepping up/down with the arrows takes too long time, agreed. Try to select/mark/highlight the values and start typing in your values instead
BestR Walter
Stepping up/down with the arrows takes too long time, agreed. Try to select/mark/highlight the values and start typing in your values instead
BestR Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker plugin - with moving ghost
Edit, I'm an idiot!
See next post.
Last edited by manxam on Tue Oct 06, 2009 1:04 am, edited 1 time in total.
Re: SunTracker plugin - with moving ghost
Ah hah! I just notice that you have longitude first, latitude second. I'm an idiot. I was trying to type lat into the long field and vice versa.
So much for reading the fields instead of just assuming the standard lat/long.
Cheers!
So much for reading the fields instead of just assuming the standard lat/long.
Cheers!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker plugin - with moving ghost
But you are right as well, if latitude/longitude is the standard order I can easily change in next version. It will anyhow be interesting to see if it works ok in your position (Calgary?)
Best regards, Walter
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker plugin - with moving ghost
Walter, it's really no big deal. One just needs to actually read the fields 
As for it working in Calgary, it appears to work just fine.
Thanks for all your work!
As for it working in Calgary, it appears to work just fine.
Thanks for all your work!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker plugin - with moving ghost
I have updated the SunTracker plug-in with a new feature and also made a small modification to how the threads are executed
The new feature is a weather condition compensation factor that is used to adjust the firing of ON and OFF events. The reason behind is that a clear day, lights could go ON a bit later than a day with clouds or rain
As source for weather information, Google is used so you need a permanent Internet connection for this to work
You can define the total amount of additional time to calculate with. Lets say you enter 45 minutes. The script will then, depending on actual weather conditions, calculate if time should be added or subtracted according to the built in rules.
The rules are as follows
"Cloudy"
"Fog"
"Rain"
"Light rain"
"Rain Showers"
"Drizzle"
Will give full prior compensation, means ON events will be fired specified time EARLIER and OFF events LATER
"Snow"
"Light snow"
"Mostly Cloudy"
"Partly Cloudy"
"Overcast"
Will give half prior compensation, means ON events will be fired half of the specified time earlier and OFF events later
"Sunny"
"Clear"
Will give full latter compensation, means ON events will be fired specified time LATER and OFF events EARLIER
I hope this was understandable
In the picture below I have inserted 45 minutes.
This value will also be used in combination with eventually defined offset value to calculate the total time compensation
After running this in test for the last 3 weeks, I feel that it works really fine and it is ready to be shared with you
The modification to the thread execution was made because I often had problems when multiple threads was hitting the same hardware device (in this case the USB-UIRT)
I therefore introduced a random delay between the thread executions. This did not solve the problem completely but it improved (in a separate thread I have also made a proposal to change the plug-in for the USB-UIRT to handle retries)
To install, close EG, just copy the two files from the zip to the SunTracker folder. When you start EG again you will get error messages because the actions need to be re-configured. Double click on them, change or leave the default value for weather compensation and save again.
Once done for all SunTracker actions, save the EG configuration and restart EG again. This time you should not get any errors
It is also possible to edit the xml-file directly if preferred
Best regards & good luck,
Walter
The new feature is a weather condition compensation factor that is used to adjust the firing of ON and OFF events. The reason behind is that a clear day, lights could go ON a bit later than a day with clouds or rain
As source for weather information, Google is used so you need a permanent Internet connection for this to work
You can define the total amount of additional time to calculate with. Lets say you enter 45 minutes. The script will then, depending on actual weather conditions, calculate if time should be added or subtracted according to the built in rules.
The rules are as follows
"Cloudy"
"Fog"
"Rain"
"Light rain"
"Rain Showers"
"Drizzle"
Will give full prior compensation, means ON events will be fired specified time EARLIER and OFF events LATER
"Snow"
"Light snow"
"Mostly Cloudy"
"Partly Cloudy"
"Overcast"
Will give half prior compensation, means ON events will be fired half of the specified time earlier and OFF events later
"Sunny"
"Clear"
Will give full latter compensation, means ON events will be fired specified time LATER and OFF events EARLIER
I hope this was understandable
In the picture below I have inserted 45 minutes.
This value will also be used in combination with eventually defined offset value to calculate the total time compensation
After running this in test for the last 3 weeks, I feel that it works really fine and it is ready to be shared with you
The modification to the thread execution was made because I often had problems when multiple threads was hitting the same hardware device (in this case the USB-UIRT)
I therefore introduced a random delay between the thread executions. This did not solve the problem completely but it improved (in a separate thread I have also made a proposal to change the plug-in for the USB-UIRT to handle retries)
To install, close EG, just copy the two files from the zip to the SunTracker folder. When you start EG again you will get error messages because the actions need to be re-configured. Double click on them, change or leave the default value for weather compensation and save again.
Once done for all SunTracker actions, save the EG configuration and restart EG again. This time you should not get any errors
It is also possible to edit the xml-file directly if preferred
Best regards & good luck,
Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker plugin - with moving ghost
krambriw,
You are really making this a very robust plugin - very nice!
Have you considered making a sprinkler (watering) plugin based on this that triggers X10 events to control a Rain8 device http://www.wgldesigns.com/rain8.html? I think it would take minimal additions to do it and would be a very cool plugin!
You are really making this a very robust plugin - very nice!
Have you considered making a sprinkler (watering) plugin based on this that triggers X10 events to control a Rain8 device http://www.wgldesigns.com/rain8.html? I think it would take minimal additions to do it and would be a very cool plugin!
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker plugin - with moving ghost
Dear Livin,
Thanks a lot for your kind words! I think your idea is very interesting and something extremely useful as well
Some first thoughts about interesting features
- during the day, capture weather conditions and create a weighted counter sum that will be used in calculation in frequency/length of the sprinkler intervals that will be started after sunset
- try to "look ahead" by using weather forecasts (makes no sense to start if the fore cast for tomorrow is rain)
- temperature measurement, to be used in determining the first start time for the first sprinkle (makes no sense to put out water on the grass if temp still is to high?)
- cost tariff support (if water is cheaper after a certain time?)
- individual zone support of the device with "shadow" compensation factor i.e. some zones might be more in shadow, thus requiring less watering
- etc
Kind regards, Walter
Thanks a lot for your kind words! I think your idea is very interesting and something extremely useful as well
Some first thoughts about interesting features
- during the day, capture weather conditions and create a weighted counter sum that will be used in calculation in frequency/length of the sprinkler intervals that will be started after sunset
- try to "look ahead" by using weather forecasts (makes no sense to start if the fore cast for tomorrow is rain)
- temperature measurement, to be used in determining the first start time for the first sprinkle (makes no sense to put out water on the grass if temp still is to high?)
- cost tariff support (if water is cheaper after a certain time?)
- individual zone support of the device with "shadow" compensation factor i.e. some zones might be more in shadow, thus requiring less watering
- etc
Kind regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: SunTracker plugin - with moving ghost
those would be great!krambriw wrote:Dear Livin,
Thanks a lot for your kind words! I think your idea is very interesting and something extremely useful as well
Some first thoughts about interesting features
- during the day, capture weather conditions and create a weighted counter sum that will be used in calculation in frequency/length of the sprinkler intervals that will be started after sunset
- try to "look ahead" by using weather forecasts (makes no sense to start if the fore cast for tomorrow is rain)
- temperature measurement, to be used in determining the first start time for the first sprinkle (makes no sense to put out water on the grass if temp still is to high?)
- cost tariff support (if water is cheaper after a certain time?)
- individual zone support of the device with "shadow" compensation factor i.e. some zones might be more in shadow, thus requiring less watering
- etc
Kind regards, Walter
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: SunTracker plugin - with moving ghost
EventGhost 0.4.0 update
I have updated the plugin with the mandatory GUID entry
I have also added a "getter action" to the plugin that allows you to request the sun status from other plugins or scripts. Typically such a python script could look like this
The function call returns a bool (True if sun is up)
I have updated the plugin with the mandatory GUID entry
I have also added a "getter action" to the plugin that allows you to request the sun status from other plugins or scripts. Typically such a python script could look like this
Code: Select all
bSunStatus = eg.plugins.Suntracker.GetContentsOfVariable()
if bSunStatus:
print "Sun is up"
eg.StopMacro()
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM