Page 10 of 38

Re: SunTracker - with moving ghost

Posted: Wed May 02, 2012 2:59 am
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

Re: SunTracker - with moving ghost

Posted: Wed May 02, 2012 1:13 pm
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

Re: SunTracker - with moving ghost

Posted: Wed May 02, 2012 1:43 pm
by barnabas1969
If the "After midnight" settings are not zero, this would continue all night until sunrise?

Re: SunTracker - with moving ghost

Posted: Wed May 02, 2012 3:12 pm
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 )

Re: SunTracker - with moving ghost

Posted: Wed May 02, 2012 3:29 pm
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?

Re: SunTracker - with moving ghost

Posted: Wed May 02, 2012 4:48 pm
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

Re: SunTracker - with moving ghost

Posted: Wed May 02, 2012 6:53 pm
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.

Re: SunTracker - with moving ghost

Posted: Fri May 04, 2012 6:00 pm
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).

Re: SunTracker - with moving ghost

Posted: Fri May 04, 2012 6:21 pm
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

Re: SunTracker - with moving ghost

Posted: Fri May 04, 2012 9:18 pm
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

Re: SunTracker - with moving ghost

Posted: Fri May 04, 2012 10:24 pm
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.)

Re: SunTracker - with moving ghost

Posted: Sat May 26, 2012 11:27 pm
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

Re: SunTracker - with moving ghost

Posted: Sun May 27, 2012 5:58 am
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

Re: SunTracker - with moving ghost

Posted: Fri Jun 01, 2012 12:42 am
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...

Re: SunTracker - with moving ghost

Posted: Fri Jun 01, 2012 5:42 am
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