HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: portos31 on April 10, 2014, 03:33:51 PM

Title: Trouble concerning time in scheduler and
Post by: portos31 on April 10, 2014, 03:33:51 PM
Hi,
I am a newbie with HG
I'm using HG with Zwave and i try first to manage Shutters using FGRM 222 +HG on Raspberry + USB Zstick.
I configure modules within HG and everything is working well  that means I can open and close shutters with HG.
So next step , it is to schedule shutter regarding time: Sunrise, Sunset...
And at this step , I have a trouble.When I use scheduler with On @Sunrise Off  @Sunset . I have a delay of 2 hours between the order send to FGRM222 and real-time. For instance, @Sunrise is 7:20 and my shutter open at 9:20. When I look in Automation Scheduler I can see the right time: 7:20.
How can I solve this trouble?
Thanks in advance for your support and good job
Title: Re: Trouble concerning time in scheduler and
Post by: Gene on April 10, 2014, 03:59:38 PM
You have to set correct timezone on your server.
I suppose you're using Raspberry Pi, if so see this tutorial:

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-2-first-time-configuration/changing-timezone

To get to that screen, you've to run from a terminal the command:

sudo raspi-config

Cheers,
g.
Title: Re: Trouble concerning time in scheduler and
Post by: portos31 on April 10, 2014, 05:11:04 PM
Thank for your quick answer
I have set up the right time-zone on my Raspberry Pi and I will see if it is working now.
I have an other question regarding scheduler. I read  we can use ; for AND : for OR within expression .Can we use something like @Sunset-10 meaning sunset time - 10 mn.
 
Title: Re: Trouble concerning time in scheduler and
Post by: bkenobi on April 10, 2014, 08:18:15 PM
No, that has been requested but it is not possible now.  If you want to use an offset from a sunset/sunrise time, you can construct a custom scheduler item through code.  I would suggest looking at the new sunrise/sunset tool as it already has a lot of new schedule items and may even have something that will work for you out of the box.
Title: Re: Trouble concerning time in scheduler and
Post by: portos31 on April 11, 2014, 11:02:35 AM
So everything is working well now. Except for one FGRM , but I have to investigate why.
Regarding offset from sunset/sunrise , i'm not so expert to build a custom scheduler through code. What is the meaning of "looking at new sunrise/sunset tool". Where can i find this new tool within HG?
Again thanks for your help
Title: Re: Trouble concerning time in scheduler and
Post by: bkenobi on April 11, 2014, 04:54:33 PM
User Jan created a widget for sunrise/sunset in JavaScript and uploaded it in the App Contributions section:

http://www.homegenie.it/forum/index.php?topic=124.0 (http://www.homegenie.it/forum/index.php?topic=124.0)

The widget takes a latitude and longitude for the system and calculates a number of sun position related items.  In HG, go to the automation configuration and then Contrib section.  Enable the second item (jkutils I believe) and add it to your Dashboard (or wherever else is appropriate).  When you go to the control view, it will show the sun position as well as a number of different sunrise/sunset related times.  If you hover over the image, it will say which it refers to in the scheduler.  One of these will likely work for you but if not, it's easy to go into the code and add a new item with your desired offset.
Title: Re: Trouble concerning time in scheduler and
Post by: portos31 on April 12, 2014, 08:22:42 PM
Ok thanks  ;),I did it ,it is quite simple and it works . I have more than enough possibilities.
I go ahead in HG world  :P