Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Delayed Illumination Comments Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 04 2007 at 10:34 | IP Logged Quote TonyNo

Great idea!

Do you know that you can also enter your latitude and longitude in Setup, Sun?

Quote:
This Setup area allows you to define your latitude and longitude which is used in the sunrise, sunset, and civil twilight calculations. You can select your state and city, or manually enter your latitude and longitude. You must also manually select whether or not you observe daylight savings time in your area.

You can then check DAWN, SUNRISE, SUNSET, and DUSK.

Also, here's a way to reduce the code a bit...

Code:
Case( month( today())when 4 to 9 then ph_createtimedevent( 0,"<YOUR MACRO>", ph_relativedatetime( today(),90)) else ph_macro( "<YOUR MACRO>"))


Edited by TonyNo - February 04 2007 at 10:42
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: February 05 2007 at 00:20 | IP Logged Quote krommetje

TonyNo wrote:
Great idea!
Also, here's a way to reduce the code a bit...

Code:
Case( month( today())when 4 to 9 then ph_createtimedevent( 0,"<YOUR MACRO>", ph_relativedatetime( today(),90)) else ph_macro( "<YOUR MACRO>"))


sure, i've got the sun tab setup and daylight savings too, but I have found out that here, especially in the sommer, it is not nessecary to have the lights turned on at sunset, mostly it there is daylight enough for at least an hour... and in winter it is just the other way around... I tried at first using your reduced code but for a reason unknown to me I got an error when executing... Also when I was programming it, it wasn't as early as i thought

Peter

Edited by krommetje - February 05 2007 at 00:26
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: February 05 2007 at 10:13 | IP Logged Quote cmhardwick

Not directly related, but somewhat. Are DAWN, SUNRISE, SUNSET and DUSK PH variables that can be referenced? I have a couple of uses for these if so. I didn't know if they were just internal or could be addressed directly in a macro or formula. (Ok, probably a stupid question, but i'm asking it anyway!

__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 05 2007 at 10:56 | IP Logged Quote TonyNo

Yup. From the manual...

Quote:
[DAWN] This variable returns the start of civil twilight as the number of seconds past midnight.
[DUSK] This variable returns the end of civil twilight as number of seconds past midnight.
[SUNRISE] This variable returns the time of sunrise as the number of seconds past midnight.
[SUNSET] This variable returns the time of sunset as the number of seconds past midnight.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: February 05 2007 at 13:18 | IP Logged Quote cmhardwick

Manual? Who reads the manual? hehehe

Thanks!

__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: February 17 2007 at 00:50 | IP Logged Quote krommetje

I had a question once when I was member of Fido-Net and all I got was: "RTFM!"

Since then the first thing I do is actually read the .. manual

Peter
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 17 2007 at 12:24 | IP Logged Quote TonyNo

I try not to say RTFM until the second question that can be answered by doing it!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum