Can't Get Sunrise / Sunset To Work Properly

Posted on
Thu Apr 14, 2016 8:28 pm
WHTNUKL offline
User avatar
Posts: 8
Joined: Jul 31, 2011

Re: Can't Get Sunrise / Sunset To Work Properly

Thanks for the reply, Jay. So in real-time.... The lights went on at 6:24 PST. There was no entry in the event log to indicate the lights came on. I manually turned the lights off at 6:26, using the wall switch (Levity 1000W, 2203WI). The lights turned on again at 7:24 (sunset PST) as set in the schedules in Indigo. The manual on and off do not register in the event log. Attached is the event log for this afternoon that shows no activity until the 7:24 turn on.

What could be causing the 6:24 turn on?
Attachments
Indigo Events.tiff
Indigo Events.tiff (96.46 KiB) Viewed 2447 times

Posted on
Fri Apr 15, 2016 12:14 am
howartp offline
Posts: 3667
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Can't Get Sunrise / Sunset To Work Properly

Do manual switchings of that switch usually show in the log?

Is this X10 controller the one you can store schedules in that execute themselves; Indigo can't store them but other software can.

I'd be resetting the controller to factory settings first.

EDIT: Sorry, just noticed you already reset it.

Get rid of Indigo 5, disable the one schedule you do have intentionally set and see what happens and report back.

Posted on
Fri Apr 15, 2016 5:31 am
WHTNUKL offline
User avatar
Posts: 8
Joined: Jul 31, 2011

Re: Can't Get Sunrise / Sunset To Work Properly

How do I get rid of Indigo 5? I haven't found an "uninstall" function. Manual operation of the switches never show up in the event log.

Posted on
Fri Apr 15, 2016 5:40 am
DaveL17 offline
User avatar
Posts: 5017
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Can't Get Sunrise / Sunset To Work Properly

See Jay's post above. There's a link to the instructions.


Sent from my iPhone using Tapatalk

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri Apr 15, 2016 8:42 am
jay (support) offline
Site Admin
User avatar
Posts: 15693
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Can't Get Sunrise / Sunset To Work Properly

WHTNUKL wrote:
The lights went on at 6:24 PST. There was no entry in the event log to indicate the lights came on.


That indicates that is was not Indigo that caused the lights to go on (Indigo will always report when it sends commands to X10 devices). You may want to try resetting your interface again since it may have something stored in it that's doing it. For the CM15A, reset isn't really easy. You have to unplug it and remove the batteries. Then you have to let it sit like that for a long while - I'd let it sit for an hour.

WHTNUKL wrote:
The manual on and off do not register in the event log.


X10 devices don't report status, nor do they acknowledge that they've completed a command. This is one reason why we don't recommend that technology.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Apr 03, 2017 7:50 pm
philipbasile offline
Posts: 95
Joined: Jan 08, 2015
Location: NJ

Re: Can't Get Sunrise / Sunset To Work Properly

Jay,

Is there a way to get the sunrise / sunset date time into a variable for use in a sons announcement ?

Thanks

Philip

Posted on
Mon Apr 03, 2017 9:06 pm
DaveL17 offline
User avatar
Posts: 5017
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Can't Get Sunrise / Sunset To Work Properly

:evil:
philipbasile wrote:
Jay,

Is there a way to get the sunrise / sunset date time into a variable for use in a sons announcement ?

Thanks

Philip

I use a trigger that fires whenever the variable isDaylight changes. When the trigger fires, I have it run the following embedded Python script:

Code: Select all
import datetime

sunrise = indigo.server.calculateSunrise()
sunrise = sunrise.strftime("%r")
indigo.variable.updateValue(307432140, sunrise)

sunset = indigo.server.calculateSunset()
sunset = sunset.strftime("%r")
indigo.variable.updateValue(57462192, sunset)

Code: Select all
   Script                          06:29:13 AM
   Script                          07:18:41 PM

If you decide to try it, create two variables and replace the variable IDs in the script with your own (note that the script doesn't print the values to the log--I did that to show the format of the result.)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Apr 04, 2017 3:59 am
CliveS offline
Posts: 415
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: Can't Get Sunrise / Sunset To Work Properly

Make a New Schedule Sunrise,
Schedule >Time > Sunrise
Condition > Always
Actions > Type > Variable Actions > Insert Timestamp into Variable > Configure > Save

CliveS

CliveS

Indigo 7.4.0 : MacOS High Sierra 10.13.6 : Mac mini Server (Mid 2011) : 2 GHz Core i7. : 8 GB. : 2 x 256GB Samsung EVO SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Posted on
Tue Apr 04, 2017 5:47 am
DaveL17 offline
User avatar
Posts: 5017
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Can't Get Sunrise / Sunset To Work Properly

If you choose to use Clive's method, I would recommend using a custom format string for the timestamp, otherwise you'll get a timestamp down to the microsecond and with the date included (which IMO isn't optimal for spoken time). The following format specifiers can also be used in the script above if you choose to go that route.

My personal favorite is:
'%r' --> 01:23:45 PM

You can also try:
%H:%M --> 13:45
%I:%M %p --> 01:23 PM (capital eye not lower el)

You can browse the format specifiers here.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Apr 04, 2017 5:50 am
jalves offline
Posts: 529
Joined: Jun 16, 2013

Re: Can't Get Sunrise / Sunset To Work Properly

Here is another way to do it. This uses a short AppleScript process to get the values for sunrise/set. It runs every time the variable IsDaylight changes. When setting this up, first make two variables; Sunrise and Sunset. When the script is run these variables will contain the day and time of the next sunrise/sunset.

Code: Select all
tell application "IndigoServer"
   
   set value of variable "sunrise" to "Sunrise: " & (weekday of (calculate sunrise) as string) & " " & (time string of (calculate sunrise) as string)
   
   
   set value of variable "sunset" to "Sunset: " & (weekday of (calculate sunset) as string) & " " & (time string of (calculate sunset) as string)
   
end tell

Running Indigo 7.4 on a 27" iMac (mid-2017), 40G memory, 1T Fusion Drive, OS X 10.15.1
Jeff

Posted on
Tue Apr 04, 2017 8:39 am
jay (support) offline
Site Admin
User avatar
Posts: 15693
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Can't Get Sunrise / Sunset To Work Properly

philipbasile wrote:
Is there a way to get the sunrise / sunset date time into a variable for use in a sons announcement ?


As you can see, there are a variety of solutions. It also depends on exactly what you want to use it for. @CliveS solution will only maintain the previous sunrise/sunset time (as opposed to what it will be at the next sunrise/sunset). Of course, it won't be that far off so that may be fine for your use. That solution is the least complicated even using the custom format specifier. This is a very future-proof way as well.

@DaveL17's Python script approach is also pretty future-proof and will be more accurate if you're looking for what the next interval will be.

I'd advise against using AppleScript since we've made no secret that AppleScript is legacy and won't be around forever.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jun 27, 2017 2:12 pm
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: Can't Get Sunrise / Sunset To Work Properly

I have problem with sunrise, it shows two different times.

In Indigo preferences there is one time for sunrise, and down to the right, there is another time for the sunrise. Look at the pictures attached.
The sunrise time down to the right its the correct time for sunrise

What could do this?
Attachments
Skjermbilde 2017-06-27 kl. 22.06.43.png
Skjermbilde 2017-06-27 kl. 22.06.43.png (16.27 KiB) Viewed 1757 times
Skjermbilde 2017-06-27 kl. 22.06.32.png
Skjermbilde 2017-06-27 kl. 22.06.32.png (73.29 KiB) Viewed 1757 times

Posted on
Tue Jun 27, 2017 2:44 pm
RogueProeliator offline
User avatar
Posts: 2244
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Can't Get Sunrise / Sunset To Work Properly

Umm, is it just me or does the preferences window show the next sunrise is on July 15th, 2085? That is a long time without seeing the sun! :-o

Posted on
Tue Jun 27, 2017 2:50 pm
mortenkols offline
Posts: 198
Joined: Oct 29, 2014
Location: Norway

Re: Can't Get Sunrise / Sunset To Work Properly

RogueProeliator wrote:
Umm, is it just me or does the preferences window show the next sunrise is on July 15th, 2085? That is a long time without seeing the sun! :-o


haha. it does. something is wrong 8)

Posted on
Tue Jun 27, 2017 2:59 pm
johnfdl offline
Posts: 136
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: Can't Get Sunrise / Sunset To Work Properly

Must be fake climate news :twisted:

Who is online

Users browsing this forum: No registered users and 0 guests

cron