Sunrise and Sunset time info Control page

Posted on
Tue Jul 30, 2013 1:28 pm
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sunrise and Sunset time info Control page

Are you sure the script is running? I'd expect it to be exactly an hour off if it were a DST issue...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jul 30, 2013 2:20 pm
bmcgowan13 offline
Posts: 67
Joined: Jan 13, 2013

Re: Sunrise and Sunset time info Control page

No. I changed the name of the variable sometime (sunset v TheSunset) to the script (when I ran it) had an error. All set now and everything on the Control Page is updated.

I've been living with this error since the spring. Should have asked for help earlier.

Once again....thanks....

Posted on
Tue Jul 30, 2013 6:26 pm
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sunrise and Sunset time info Control page

Another benefit to scripting in Python - use IDs rather than names so you can change names without breaking scripts... ;)

Code: Select all
nextSunrise = indigo.server.calculateSunrise()
indigo.variable.updateValue(SUNRISEVARIDHERE, value=nextSunrise.strftime("%H:%M"))
nextSunset = indigo.server.calculateSunset()
indigo.variable.updateValue(SUNSETVARIDHERE, value= nextSunset.strftime("%H:%M"))


Sets each value to HH:MM sunrise/sunset.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Aug 08, 2013 10:43 am
btassias offline
Posts: 48
Joined: Apr 18, 2011

Re: Sunrise and Sunset time info Control page

Nice control page, Ive been trying to build some for my Ipad but having
some issues with sizing the icons and button to fit on the ipad. What
did you do? Did you build them with the Sweethome3d software?
Thanks

Posted on
Wed Aug 14, 2013 1:50 pm
btassias offline
Posts: 48
Joined: Apr 18, 2011

Re: Sunrise and Sunset time info Control page

I Like your control page :) One question on your Garage door
open/close button how did you get a button to display the
open/close status on the control page? the sunrise/sunset
script works great.

Posted on
Tue Feb 10, 2015 2:20 pm
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: Sunrise and Sunset time info Control page

jay (support) wrote:
Another benefit to scripting in Python - use IDs rather than names so you can change names without breaking scripts... ;)

Code: Select all
nextSunrise = indigo.server.calculateSunrise()
indigo.variable.updateValue(SUNRISEVARIDHERE, value=nextSunrise.strftime("%H:%M")
nextSunset = indigo.server.calculateSunset()
indigo.variable.updateValue(SUNSETVARIDHERE, value= nextSunset.strftime("%H:%M")


Sets each value to HH:MM sunrise/sunset.


I am trying to use this script instead of AppleScript version but Indigo (last version) days:

Code: Select all
nextSunset = indigo.server.calculateSunset()
Invalid syntax



Ehm...my error with brackets :)

:?

Posted on
Tue Feb 10, 2015 7:08 pm
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sunrise and Sunset time info Control page

Looks like my script was missing a couple of closing parens.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 9 guests