SunTracker - with moving ghost

Questions and comments specific to a particular plugin should go here.

Re: SunTracker plugin - with moving ghost

Postby prostetnic » Sun May 03, 2009 10:47 am

The link to the last two versions are broken. Something to do with the new server?
prostetnic
 
Posts: 28
Joined: Fri Apr 18, 2008 6:52 pm
Location: Sweden

Re: SunTracker plugin - with moving ghost

Postby krambriw » Sun May 03, 2009 7:42 pm

I think it is related to new web design maybe...


16.04.2009_SunTracker.zip
(65.25 KiB) Downloaded 102 times
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker plugin - with moving ghost

Postby krambriw » Fri May 22, 2009 4:28 pm

I have made a small update of the Suntracker plugin

22.05.2009_SunTracker.zip
(65.36 KiB) Downloaded 97 times


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
Image5.jpg
Image5.jpg (14.11 KiB) Viewed 2127 times



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

Image1.jpg


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()
   


Check sun status UP
Code: Select all
if eg.globals.sunIsUp:
    print "Sun is up"
    eg.StopMacro()
   


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
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker plugin - with moving ghost

Postby krambriw » Fri Jul 17, 2009 9:55 am

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




17.07.2009_SunTracker.zip
(65.37 KiB) Downloaded 119 times
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker plugin - with moving ghost

Postby manxam » Sun Oct 04, 2009 11:06 pm

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!
manxam
 
Posts: 10
Joined: Thu Sep 03, 2009 4:11 am

Re: SunTracker plugin - with moving ghost

Postby krambriw » Mon Oct 05, 2009 1:05 pm

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

Image1.jpg
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker plugin - with moving ghost

Postby manxam » Tue Oct 06, 2009 12:56 am

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.
manxam
 
Posts: 10
Joined: Thu Sep 03, 2009 4:11 am

Re: SunTracker plugin - with moving ghost

Postby manxam » Tue Oct 06, 2009 12:59 am

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!
manxam
 
Posts: 10
Joined: Thu Sep 03, 2009 4:11 am

Re: SunTracker plugin - with moving ghost

Postby krambriw » Tue Oct 06, 2009 4:37 am

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
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker plugin - with moving ghost

Postby manxam » Wed Oct 07, 2009 1:32 am

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!
manxam
 
Posts: 10
Joined: Thu Sep 03, 2009 4:11 am

Re: SunTracker plugin - with moving ghost

Postby krambriw » Fri Dec 04, 2009 11:00 am

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 :mrgreen:

In the picture below I have inserted 45 minutes.

Image.jpg


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

__init__.zip
(20.95 KiB) Downloaded 92 times
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker plugin - with moving ghost

Postby Livin » Sat Dec 12, 2009 2:52 am

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!
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
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: SunTracker plugin - with moving ghost

Postby krambriw » Sat Dec 12, 2009 5:13 pm

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
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker plugin - with moving ghost

Postby Livin » Wed Dec 16, 2009 12:55 am

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


those would be great!
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
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: SunTracker plugin - with moving ghost

Postby krambriw » Mon Dec 21, 2009 10:22 am

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

Code: Select all
bSunStatus = eg.plugins.Suntracker.GetContentsOfVariable()
if bSunStatus:
    print "Sun is up"
    eg.StopMacro()
   


The function call returns a bool (True if sun is up)
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: Google Adsense [Bot], jonib and 1 guest