SunTracker - with moving ghost

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

Re: SunTracker - with moving ghost

Postby krambriw » Fri Jan 01, 2010 1:12 pm

I had to improve the error handling for the newly introduced Weather information retrievel.
Changes where made to the pywapi.py file where I now use try/except when opening the url
In addition, I also added control in SunTracker to check that the returned weather info was not empty

Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby Livin » Fri Jan 01, 2010 8:51 pm

Walter,
This is a sweet plugin... really great job and very much appreciated!

Any chance you want to turn this into a sprinkler controller 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 - with moving ghost

Postby krambriw » Sat Jan 02, 2010 8:38 am

Hi Livin,
Sure, I will work on it. However, here in Sweden is winter and a lot of snow. R U in such a dry location and need to sprinkler this time of the year???

Currently had to update a lot of my other plugins and combining with xmas celebration, beeing available to family and friends, was not easy ;)

Either I clone it into a new plugin or I will add a new action to the existing one. At this time I believe it might be cleaner to make a clone

Some questions for you:
Is it enough to generate events type "Sprinkler Zone_nbrX ON/OFF" and you then drag them to a macro that triggers the X10 device?
Is the device supported via X10 and therefore seen in EG with the standard X10 support?
Can you control the sprinkler from EG already today but manually?

Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby Livin » Sun Jan 03, 2010 6:50 am

I live in Arizona, it is very dry almost all year - even winter.

I figured you could use the SunTracker code as the basis but would clone it.

Below is a long list of feature ideas and I know some are "nice to have" but not "must haves". I figured I'd brainstorm what would make a fantastic plugin and see what you thought...

Schedules (per zone)
- Day of Week
- N times per week
- Even-Odd days
- Season : use a base time for each valve and + or - based on season (date range)

Zone Run Style
- asynchronous (all values run one at a time, in order)
- synchronous (all valves run a the same time)
- delay time between zones
- delay times between valves (per zone)

Support standard EG connections for sending valve on/off triggers: Serial, network, X10

Meter Support
- Rain meter
- if rain is detected do not water specific zones for X days
- Soil Moisture
- variability based on moisture X% detected
- Example: If X% cut zone water time by 50%. If Y% double water time

Weather forecast integration
- uses weather conditions to skip a schedule due to rainfall conditions (X% chance of rain or higher)
- weather forecast from web (might be used from different plugin)
- weather station integration (software or hardware)
- Example: do not water specific zones for X days if 50% or great chance of rain within the next 2 days.
- uses temperature to add variability to length of zone run time
- Example: Zone A, add 2 minutes of run time for every 10 degrees above 100 degrees in temp

Manual Controls (for each/all zones)
- "Skip Tomorrow"
- "Skip next scheduled"
- "Run Now" : triggers that zone to run immediately
- "Off" : stops normal schedule until "On" is triggered
- "On": starts normal schedule

Notifications
- email notifications when dynamic changes occur do to rain meter or forecast integration.
- Current Status: tracking of what zones are on currently (so we can display in a UI)
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 - with moving ghost

Postby krambriw » Sun Jan 24, 2010 9:48 am

I have received a question how to use the action "GetContentsOfVariable"

Firstly you can use it in a python script or from another plugin

Code: Select all
bSunStatus = eg.plugins.Suntracker.GetContentsOfVariable()


The call will return a bool (TRUE if sun is up, FALSE if sun is down)


Secondly, you can also use it in a macro in combination with the action "If successful Jump to" like in the picture below

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

Re: SunTracker - with moving ghost

Postby adrenarush » Tue Feb 09, 2010 4:48 am

Hello, trying to get this going on EG 0.3.7.r1387 on XP Media Center Edition with SP3. When it starts up, SunTracker seems to be giving errors.

8:38:04 PM ---> Welcome to EventGhost <---
8:38:05 PM Autostart
8:38:05 PM Plugin: Network Event Receiver
8:38:05 PM Plugin: CM11A
8:38:05 PM Plugin: SunTracker
8:38:05 PM Plugin started
8:38:05 PM SunTracker: "Landscape Light"
8:38:05 PM Main.OnInit
8:39:02 PM SunTracker Landscape Light: Daylight saving is FALSE
8:39:02 PM Pacific Standard Time - Timezone
8:39:02 PM Today is Monday. Sunrise will be at 0-851 and Sunset at 0102
8:39:02 PM Exception in thread Landscape Light:
8:39:02 PM Traceback (most recent call last):
8:39:02 PM File "threading.pyc", line 525, in __bootstrap_inner
8:39:02 PM File "C:\Program Files\EventGhost\plugins\SunTracker\__init__.py", line 1219, in run
8:39:02 PM File "C:\Program Files\EventGhost\plugins\SunTracker\__init__.py", line 817, in CheckMorningLightOn
8:39:02 PM File "C:\Program Files\EventGhost\plugins\SunTracker\__init__.py", line 548, in MorningLightON
8:39:02 PM ValueError: invalid literal for int() with base 10: '0-851'
8:39:02 PM


After reviewing the included README and this forum topic, I don't see this discussed. Sunrise and Sunset times given look to be incorrectly formatted. Seems I have something not configured correctly. Anyone able to identify what I am doing incorrectly? Thanks
adrenarush
 
Posts: 9
Joined: Thu Feb 04, 2010 3:02 am

Re: SunTracker - with moving ghost

Postby krambriw » Tue Feb 09, 2010 10:59 am

Hi, I think you need to review your settings for Latitude/Longitude. The picture below show settings for Los Angeles, California. To find your location you can use

http://www.satsig.net/maps/lat-long-finder.htm

Image1.jpg


This should help to get correct time values

I have however noticed that I do not get any weather data from Google with these settings. I'm considering to make an updated version so you can enter City/Country as location for the weather info

Best regards & hope it works, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby adrenarush » Tue Feb 09, 2010 6:20 pm

That was it, missed the "-" on the Long. Thanks
adrenarush
 
Posts: 9
Joined: Thu Feb 04, 2010 3:02 am

Re: SunTracker - with moving ghost

Postby krambriw » Tue Feb 09, 2010 8:06 pm

New version uploaded in the first post

This version uses country/city when retrieving weather data from Google

For some reason, I do not get any cities for United States in my list but you can select United States as country and type the city name as in the example in the picture
Image1.jpg

To migrate from previous version, open the settings for the plugin and change to your location (country/city) and click OK to save. Then open settings for all actions, just hit OK to save and you should be fine


Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby vuego » Wed Mar 03, 2010 5:26 pm

Thanks Walter! It's a great idea to include weather data in SunTracker.

I have a request. I'd like to only use negative values when weather compensating. For example if the sun sets at 17:45 I want it to trigger at 17:15 on Rain and 17:30 on Overcast but no later than 17:45 on other conditions. I've set the compensation to 30 min and it's perfect on Rain and Overcast but too late on Clear weather (18:15). I thought about setting an offset to -30 but that would make the trigger go off 1h earlier when Cloudy.

What do you think?
vuego
Experienced User
 
Posts: 66
Joined: Wed Jan 17, 2007 9:22 pm
Location: Sweden

Re: SunTracker - with moving ghost

Postby krambriw » Thu Mar 04, 2010 12:33 pm

Dear Vuego, thanks for your feedback!

The rules for the adjustments due to weather conditions are "hard-coded" in the python module itself and are currently not supported by individual settings

It might be as you say. Do you think this will be the case also in the summer?

The biggest problem is to make available space for more settings in the action setting form. It's so crowded already. I would need some advice to create a new tab or something similar where I could put all weather related settings. I need to investigate....

If you are interested, you could actually try to modify the python code, it's very easy. Below is a sample part modified to your needs. You could copy & paste this for testing purpose

Until I find a way to make an official release with all the settings organised...

Best regards, Walter


Code: Select all
            if (
                self.currCondition == "Sunny"
                or self.currCondition == "Clear"
            ):
                trigTimeSR = GetOffsetTimeSR(self.iOffset)
                trigTimeSS = GetOffsetTimeSS(self.iOffset)
                self.timeCompensation = self.iOffset
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby vuego » Thu Mar 04, 2010 6:14 pm

Thanks, it looks good!
Weather Condition: Clear, Total time compensation (negativ is ON earlier and OFF later): 0

You might be right on time compensation during the summer. I guess I'll find out in a couple of months :)

BTW It seems there are two conditions missing: Freezing Drizzle and Freezing Rain.
It's spelled "negative".
vuego
Experienced User
 
Posts: 66
Joined: Wed Jan 17, 2007 9:22 pm
Location: Sweden

Re: SunTracker - with moving ghost

Postby krambriw » Sat Mar 06, 2010 6:43 am

Vuego, thanks I will make adjustments to the next version

It will be interesting to see what you find out from the tests during the summer period

An idea I have here is to (depending on your test results) add settings for season. You enter May-August and during that summer season, different rules could be applied

Best regards, Walter
krambriw
Plugin Developer
 
Posts: 1144
Joined: Sat Jun 30, 2007 2:51 pm

Re: SunTracker - with moving ghost

Postby vuego » Wed Mar 10, 2010 4:54 pm

Today the weather changed during the compensation window which resulted in lights On, Off and then On again :)

2010-03-10 00:00:01 Today is Wednesday. Sunrise will be at 0641 and Sunset at 1803
2010-03-10 17:33:02 Lights_On, Weather Condition: Fog, Total time compensation (negativ is ON earlier and OFF later): -30
2010-03-10 17:42:01 Lights_Off, Weather Condition: Overcast, Total time compensation (negativ is ON earlier and OFF later): -15
2010-03-10 17:48:02 Lights_On, Weather Condition: Overcast, Total time compensation (negativ is ON earlier and OFF later): -15

I think it should stay On even if the weather changes.
vuego
Experienced User
 
Posts: 66
Joined: Wed Jan 17, 2007 9:22 pm
Location: Sweden

Re: SunTracker - with moving ghost

Postby krambriw » Wed Mar 10, 2010 6:21 pm

Flashlight...green solution...energy savings,,,,

Yeah, you are right, I will try to figure out how to handle this

BestR Walter
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: No registered users and 9 guests