more G-Labs products

Author Topic: Trouble concerning time in scheduler and  (Read 3099 times)

April 10, 2014, 03:33:51 PM
Read 3099 times

portos31

  • *
  • Information
  • Newbie
  • Posts: 4
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

April 10, 2014, 03:59:38 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
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.
« Last Edit: April 10, 2014, 04:04:45 PM by Gene »

April 10, 2014, 05:11:04 PM
Reply #2

portos31

  • *
  • Information
  • Newbie
  • Posts: 4
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.
 

April 10, 2014, 08:18:15 PM
Reply #3

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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.

April 11, 2014, 11:02:35 AM
Reply #4

portos31

  • *
  • Information
  • Newbie
  • Posts: 4
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

April 11, 2014, 04:54:33 PM
Reply #5

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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

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.

April 12, 2014, 08:22:42 PM
Reply #6

portos31

  • *
  • Information
  • Newbie
  • Posts: 4
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