more G-Labs products

Author Topic: No Sunset Sunrise Program?  (Read 1874 times)

November 17, 2016, 07:41:45 PM
Reply #15

jmcgee

  • **
  • Information
  • Jr. Member
  • Posts: 26
Thanks Dani, indeed it was in Switches, not Lights.  So I picked that and the correct module.  Now, how does it know what to do to the switch?  Where do I tell it to turn it on, turn it off, dim it. etc.

November 18, 2016, 01:28:06 AM
Reply #16

jmcgee

  • **
  • Information
  • Jr. Member
  • Posts: 26
More info. I was fumbling around and realized a package called scheduled on/off was not installed.  I installed it and for some time saw it listed when I edited module. 

but now it is not there.   I went to configure/Programs/Scheduling and it is listed with red button.   I click on it and see this:

Program.Status = "Stopped"
Thu Nov 17 2016 18:25:36 GMT-0600 (CST)

Runtime.Error = "CR: Input string was not in a correct format."
Thu Nov 17 2016 18:25:36 GMT-0600 (CST)

November 18, 2016, 11:38:14 AM
Reply #17

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
For this question :
http://www.homegenie.it/forum/index.php?topic=1833.msg11148#msg11148
After you have selected the modules click on Script and then open the list box [Add code snippet] to open the default list of code.

For the Runtime error I don't know. Which version of HG are you using. Normaly with the default installation we don't need to install any  more program.
« Last Edit: November 18, 2016, 11:41:44 AM by dani »

November 18, 2016, 11:48:38 AM
Reply #18

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Ok, I found what you did. But with the new scheduler you don't need to install that program. I think it's better to uninstall. Otherwise try to recompile it.

November 18, 2016, 04:52:59 PM
Reply #19

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
The old scheduler is different and I don't have experience with the new one.  The old one was utilized by setting up "scheduled on/off" as you found.  When you had it installed and enabled, there was a tab on each compatible module that would let you enter a cron expression for both the on and off activity.  The new scheduler is different and should be much better overall.  I need to update, but since I have a very reliable setup that hasn't needed touching in months I'm hesitant to change anything.

November 19, 2016, 02:51:04 PM
Reply #20

jmcgee

  • **
  • Information
  • Jr. Member
  • Posts: 26
Ok, almost there.  For some reason the sunset and sunrise in scheduler are not the sunrise and sunset times Wunderground widget has.  Where do they get their time?




November 19, 2016, 05:53:29 PM
Reply #21

jmcgee

  • **
  • Information
  • Jr. Member
  • Posts: 26
I'll add I found that latitude and longitude were incorrect in Maintenance, location.  Entered correct numbers, hit set and it showed my location.   Restarted homegenie service but scheduler still showing wrong time.

November 20, 2016, 04:04:51 PM
Reply #22

jmcgee

  • **
  • Information
  • Jr. Member
  • Posts: 26
I stumbled around some more, read some more, and figured it out.

(@SolarTimes.Sunset+10 )

This is showing I think 10 minutes after sunset at the correct time when I hover over it in calendar view.
No idea what the difference between @Sunset and @Solartime.Sunset is.

A wiki would be a GREAT thing.

November 21, 2016, 04:31:44 PM
Reply #23

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
The Weather Underground uses what WU publishes for the sunrise/sunset times given the latitude/longitude you supply.  HG calculates it's own times based on it's algorithm.  If you look at the jkUtils Solar Altitude app, you will see that there are a number of calculations for sunrise/sunset based on who you ask.  Civil is different than maritime which is different than...  The difference is when the sun is officially up/down.  If you use the angle when the sun has officially reached the horizon, that will be different than if you look at first light (well below the horizon).

TL;DR different sources of sunrise/sunset time will never match.  Pick one and go with it as they will all be within 10 minutes of each other and good enough for the most part.  If you want something based on light, maybe invest in a luminescence sensor.

November 21, 2016, 05:33:34 PM
Reply #24

jmcgee

  • **
  • Information
  • Jr. Member
  • Posts: 26
Thanks. The problem was the home genie calculated sunset was hours off from WU. And I had correct lat long in settings.

November 22, 2016, 04:40:55 PM
Reply #25

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
That's not good.  I don't know what would drive that, but there should be at most a few minutes difference.  Definitely less than hours.  My guess would be that the lat/long is set for Italy by default.  Perhaps you need to change that in your setup to get your location.

November 22, 2016, 07:26:53 PM
Reply #26

jmcgee

  • **
  • Information
  • Jr. Member
  • Posts: 26
No like I said, they are correct coordinates.  Put them into Google maps and went right to my house.

November 22, 2016, 08:41:29 PM
Reply #27

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544

SunSet/SunRise is (was) create by the EarthTool program. But the website (used by this program) doesn't seems to work fine now :
But "SolarAltitude" created by the program "jkUtils - Solar Altitude" have real value (and no need to have internet connection ;)).

November 22, 2016, 09:05:04 PM
Reply #28

jmcgee

  • **
  • Information
  • Jr. Member
  • Posts: 26
Thank you for explanation of where sunrise sunset gets time. I like the no Internet solution of solar. Altitude.

November 23, 2016, 03:34:30 AM
Reply #29

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
That's why I'm using Solar Altitude.  I have an internet connection, but I don't want to rely on it to have my lights work correctly.