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.

SunTracker - with moving ghost

Questions and comments specific to a particular plugin should go here.
barnabas1969
Experienced User
Posts: 133
Joined: Sat Feb 04, 2012 1:42 am

Re: SunTracker - with moving ghost

Post by barnabas1969 »

Walter,

I've read this entire thread, and I've also read the readme.txt file, but I cannot find this answer. Can you please explain the "moving ghost" feature?

Thanks,
Brian
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post by krambriw »

Hi, yes, I did not find a good description myself...sorry

The idea is that if your family is away from home, defined controls could randomly turn on/off lamps inside your home. Just like a ghost that is moving around and turning the lamps on and then off at random time and with random interval.

Your home would, from a potential burglar's perspective, look like if you are really at home.

I have added settings for the random limits for on/off before and after midnight (I thought that the on time would be longer before than after midnight). Here you can elaborate with the settings for the randomized intervals.
Image2.jpg
If you select 'local moving ghost' the function will only be active for the particular action. If you select 'global moving ghost...' it will be for all actions and you can then operate the feature on/off with dedicated actions using as example external switches (like a key switch or keypad for switching home/away mode).

Best regards, Walter
barnabas1969
Experienced User
Posts: 133
Joined: Sat Feb 04, 2012 1:42 am

Re: SunTracker - with moving ghost

Post by barnabas1969 »

If the "After midnight" settings are not zero, this would continue all night until sunrise?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post by krambriw »

Yes, this is the purpose.
Like a short visit to the toilet in the middle of the night (shorter interval but still needed :D )
barnabas1969
Experienced User
Posts: 133
Joined: Sat Feb 04, 2012 1:42 am

Re: SunTracker - with moving ghost

Post by barnabas1969 »

OK, thanks for the info. I have a few Insteon devices, but I don't have a powerline modem for them yet. I'm planning to expand them and add some control from a PC and also a dedicated controller (so that the PC doesn't need to remain powered on 24x7). Just out of curiosity, what kind of RF switches do you use, Walter?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post by krambriw »

I use these mostly:
http://www.nexa.se/System-Nexa.htm

but I think they are more or less the same as these:
http://www.intertechno.at/medien/katalo ... 012_EN.pdf

As a transceiver I have severals for testing and in operation. Best so far is this RFXtrx http://www.rfxcom.com/transceivers.htm#12103


Best regards, Walter
barnabas1969
Experienced User
Posts: 133
Joined: Sat Feb 04, 2012 1:42 am

Re: SunTracker - with moving ghost

Post by barnabas1969 »

Thanks again for the information, Walter. I'm in the USA, so those products will not help me. I like Insteon products, so I want to move forward with them. However, it seems that the only EG plugin for Insteon works with the Insteon 2412N Central Controller (see here) and the plugin does not seem to be in development anymore. I've never written anything in Python, but I've made some modifications to plugins that are already available. Python does not look very intimidating, so I'm planning to write my own plugin, based on the existing one (here) that will communicate with an Insteon 2413UH (or 2413S or 2413U).

I'm sorry if I'm taking this thread off topic. I'm sure I'll be here for help when I start writing my first plugin... and I'll start a new thread then.
bruinlax
Posts: 26
Joined: Thu Sep 29, 2011 4:31 pm

Re: SunTracker - with moving ghost

Post by bruinlax »

barnabas1969 wrote:Thanks again for the information, Walter. I'm in the USA, so those products will not help me. I like Insteon products, so I want to move forward with them. However, it seems that the only EG plugin for Insteon works with the Insteon 2412N Central Controller (see here) and the plugin does not seem to be in development anymore. I've never written anything in Python, but I've made some modifications to plugins that are already available. Python does not look very intimidating, so I'm planning to write my own plugin, based on the existing one (here) that will communicate with an Insteon 2413UH (or 2413S or 2413U).
Look into the ISY-99 series for your central controller. i just deployed an insteon system this year, and i'm using that to do a lot of the work, and then eventghost to interface it via a custom plugin i wrote. (i'll share it with you if you want) it has a rest interface which just allows to control things / get states based on simple http calls. also there is a good forum for it to. for the really cool stuff though, i try to do stuff in eventghost (but sending the commands via the rest interface).
bruinlax
Posts: 26
Joined: Thu Sep 29, 2011 4:31 pm

Re: SunTracker - with moving ghost

Post by bruinlax »

krambriw,

I'm trying to figure out why the sunrise / sunset events aren't firing for my setup.

I'm debuging it a little, and step 1:
my lat 34
and long -118
are getting passed to the sun class
and the __sunriset__ is passing through to the st variable in the main loop (13.01,26.66) (my tsouth value is 19.8 in the sun class)

i'm trying to solve if that's what's causing the event to never get fired (e.g. hour 26.6) - or if that's normal, and the problem is elsewhere
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post by krambriw »

Hi,
I put in some print statements in the code and my results for your location is:

Code: Select all

23:15:00   (12.982979315659218, 26.640811524255074)
23:15:00   SR 0558
23:15:00   SS 1938
Sunrise 0558, Sunset, 1938, I think they are ok?

Did you also set your timezone correctly (UTC -8) in the plugin settings?

Bets regards, Walter
bruinlax
Posts: 26
Joined: Thu Sep 29, 2011 4:31 pm

Re: SunTracker - with moving ghost

Post by bruinlax »

ok - well i guess the sunset sunrise times are right, timezone is set correctly.

it's definitely something to do with my trigtime. i'll get back to you.



Also,
Thanks for the plugin, it was super easy for me to pull temperature changes as events too.
I changed your weatherdata function to return a dictionary to "checkweathercondition" with the temperature and weather, and then threw in another eventtrigger like your weather condition in the main loop.

Just a thought for the next version. (also i made it so it only fired on changes.)
Lunatixz
Posts: 15
Joined: Wed Jul 07, 2010 7:16 pm

Re: SunTracker - with moving ghost

Post by Lunatixz »

can someone help me with this plugin... I would like to trigger a lighting event at sunset and sunrise... but I have no clue how this plug in works...
I added my gps info... and started the plugin but nothing... when I set the times in the plugin they are changed by the program to a random time?...
what I would like is to have the lights turn on during sundown, and when the weather is cloudy, etc... then turn off at a set time.
any help would be great..thanks
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post by krambriw »

Well, it is a bit unclear exactly how you prefer to control the lights but below is a typical setting to start working with.

Basic settings for the plugin itself.
Image2.jpg
Settings for the action that generates the events to be used to control lights.
Image3.jpg
Events (for lights to be turned ON) will be generated at sunset with a small weather compensation of max 15 min (cloudy, 15 min earlier, clear 15 min later).

Events (for lights to be turned OFF) will be generated at 23.00 Sunday - Thursday, at 23.59 on Fridays and 01.00 Sunday morning.

If you would like to set lights ON also in the mornings, change the time "11.00" to something earlier like "06.00".

If you are just interested in having events on sunrise/sunset, you can check the flag "Create events at sunset and sunrise" and use those in macros you design yourself. In this case you do not need to use a SunTracker action, the plugin is enough.

Best regards, Walter
Lunatixz
Posts: 15
Joined: Wed Jul 07, 2010 7:16 pm

Re: SunTracker - with moving ghost

Post by Lunatixz »

okay I have it working... but I have two more questions... I want to setup a night light... but when I setup the plugin I cannot get it to work...
and can you explain what the ghost function does?
thanks again...
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: SunTracker - with moving ghost

Post by krambriw »

The ghost function is actually described just a few replies above:
The idea is that if your family is away from home, defined controls could randomly turn on/off lamps inside your home. Just like a ghost that is moving around and turning the lamps on and then off at random time and with random interval.

Your home would, from a potential burglar's perspective, look like if you are really at home.

I have added settings for the random limits for on/off before and after midnight (I thought that the on time would be longer before than after midnight). Here you can elaborate with the settings for the randomized intervals.



If you select 'local moving ghost' the function will only be active for the particular action. If you select 'global moving ghost...' it will be for all actions and you can then operate the feature on/off with dedicated actions using as example external switches (like a key switch or keypad for switching home/away mode).

Regarding your night light, how do you mean it should work? Turn ON at sunset the day before and OFF at sunrise the next morning?

Best regards, Walter
Post Reply