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.

Having trouble using SunTracker

Questions and comments specific to a particular plugin should go here.
Post Reply
Flyingsubs
Experienced User
Posts: 127
Joined: Sat Dec 29, 2012 11:26 pm

Having trouble using SunTracker

Post by Flyingsubs »

Hi All,

This forum has been really nice to me and I am doing a lot of good work on my home automation project. I just added motion sensors and now I am able to walk into my room and have things toggle on and off. My latest question is. I couldn't seem to figure out how to get the Suntracker Plugin working... It seems really complicated and was wondering if anyone had any tips. I would like to be able to set a time when my lights would automatically come on because it was getting dark outside. I know there is a function of get sunset for the day but I would like it to trigger an event 30 mins before sunset. Any ideas?

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

Re: Having trouble using SunTracker

Post by krambriw »

Just start with the basics. The plugin has additional features that you do not need, maybe later you will like to use them.

First step is to add and configure the plugin. Check the picture below, just modify with your longitude and lattitude etc. The yahoo weather location is not needed to change since we are not using weather conditions in this first setup.

Next is to add and configure an action, put it under 'Autostart' so it gets started automatically. Just insert settings as in the example. It will generate events 30 min before sunset and 30 min after sunrise. You can then use these events to trigger macros for turning on/off your lights.

The other functions we can discuss when you need them and when you got the basics up and running.
Image5.png
Image4.png
Flyingsubs
Experienced User
Posts: 127
Joined: Sat Dec 29, 2012 11:26 pm

Re: Having trouble using SunTracker

Post by Flyingsubs »

Thank you! I will try this. What is the 11:00am for? Also do i want to have the checkbox selected for create events at sunrise and sunset? My end goal is to not have to touch the light in my room and it will turn on automatically.

I am using this with other logic in my set up. My loigic is to flip a switch to preset the light and then have a motion sensor control it. My set up in my house is getting pretty complicated, but with all the new logic, makes everything work so much cooler!
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Having trouble using SunTracker

Post by krambriw »

Just do as in the settings in the pictures. The setting for 11.00 is needed just to get the logic thing going (could be other time setting, but at least one is needed),

You will get an event as I said below. For the moment you do not need any other checkboxes ticked.

How you use the events when tehy are triggered and what macros you then would run, is of course depending on you actual configuration.

Let's take it one step at a time
Flyingsubs
Experienced User
Posts: 127
Joined: Sat Dec 29, 2012 11:26 pm

Re: Having trouble using SunTracker

Post by Flyingsubs »

Great thank you. So i get an event at 11am. I call it SUN.on then i also got an event about an hour and a half later SUN.off. I need to check my longitude and latitude settings. Not sure why it happened an hour and a half later since sunset is like 6 hours later.

Thanks,
Flyingsubs
Flyingsubs
Experienced User
Posts: 127
Joined: Sat Dec 29, 2012 11:26 pm

Re: Having trouble using SunTracker

Post by Flyingsubs »

Just realized i didn't set the timezone correctly. I am going to check the settings tomorrow. I hate that testing this take a full day to do lol.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Having trouble using SunTracker

Post by krambriw »

You should get an event half an hour before sunset and half an hour after sunrise. You likely also get an event when you restart the plugin (for synchronization purpose). The time for 11.00 is just to make the logic work, I need one time setting for this. (At 11.00 the sun should be up and the lights would not be turned ON).

Of course you have to get your time zone and geo position sorted out, how on earth could the calculation otherwise match your location?

The trick to to test is that you can manipulate the windows date & time
Flyingsubs
Experienced User
Posts: 127
Joined: Sat Dec 29, 2012 11:26 pm

Re: Having trouble using SunTracker

Post by Flyingsubs »

It seems to be working nicely. Thank you! I am curious about the weather compensation. Do you know how to use that part of the plugin?
blaher
Experienced User
Posts: 487
Joined: Thu Nov 17, 2011 1:27 am

Re: Having trouble using SunTracker

Post by blaher »

Another way to use it is when the motion sensor is tripped, it triggers an event which uses Suntracker to GetSunState. If it's successful, (i.e. the sun is up), jump to an event which disables your lighting folder, or else enable that folder.

I use a trigger of XBMC starting to do the same thing, but the same method would work with a motion sensor trip instead. I haven't incorporated the weather thing though.
Attachments
Capture.PNG
Flyingsubs
Experienced User
Posts: 127
Joined: Sat Dec 29, 2012 11:26 pm

Re: Having trouble using SunTracker

Post by Flyingsubs »

Nice! My set up is complete and the sunset light works in my room! Once I get my own house I will add auto locks, camera, garage door. I might add auto blinds or start playing around with XBMC when i get some more cash.

-Flyingsubs
Flyingsubs
Experienced User
Posts: 127
Joined: Sat Dec 29, 2012 11:26 pm

Re: Having trouble using SunTracker

Post by Flyingsubs »

Anyone know what the weather compensation does? Also if i set the time to turn off suntracker it just turns suntracking off... It doesn't send an off command, correct?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Having trouble using SunTracker

Post by krambriw »

Actually, it works like this.

In a normal configuration the on/off events are only happening controlled by time settings and sunsets/sunrises.

In addition to this, it is possible to add offsets to sunsets/sunrises calculations. There are two types of offset functionality available:
Image2.png
Image2.png (1.15 KiB) Viewed 4983 times
1) Fixed offset setting (-120 ---- +120 minutes)
2) Weather compensated factor setting (0 ---- +120 minutes)

If you use the fixed offset settings, the events will be generated a fixed time either before or after actual sunsets/sunrises depending on the sign of the value you select. How much depends on the value itself.

If you instead use the weather compensated factor setting, the current weather condition in your location will be used to determine how much the offset shall be. Basically, in the example of using lights, bad weather makes so that lights will be turned on earlier than sunset and turned off later than sunrise. How much depends on the value you set and the classification of the various weather conditions (see the separate file weatherconditions.py you find in the SunTracker folder and you can maintain that on a personal need).

The two offsets can be used individually or combined (if combined, the values are used together in the calculation).

For the event creation, the plugin actions are not turning any lights on/off, only events are created that can be used to trigger macros. Inside the macros, you need to have other actions that are doing the actually light control and other stuff you want shall happen.

Best regards, Walter
Flyingsubs
Experienced User
Posts: 127
Joined: Sat Dec 29, 2012 11:26 pm

Re: Having trouble using SunTracker

Post by Flyingsubs »

Excellent! Thank you very much for the explanation. I think i might create a separate sun tracker for weather since it doesn't turn lights on. It just preset the the lights. The motion in my room sets the light on. I tried using the scheduler plugin and for some reason using it cause eventghost to get corrupt and i can not save. Ideally i would have my lights turn off when i go to sleep so that it keeps the logic correct and allows me to go on vacation and come back and have the lights still linked to the sunset. I know this sounds confusing but I have put a lot of work in and gotten my home automation stuff set up pretty well. Just need to make a few things more efficient and clean up bugs when i find them. Detecting motion in my room and outside my room is very complicated and probably needs to be tweaked.

Thanks,
Ben
Post Reply