Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Previous page Next page Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Page 2 of 2
Topic:
Automation based on time of day?
This thread has 20 replies. Displaying posts 16 through 21.
Post 16 made on Wednesday January 21, 2009 at 21:29
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Herb,

Here, in all its glory, is the script that I wrote:

var myTime = GUI.getDisplayTime();
if(myTime.substring(2, 3) == ":") {myHour = myTime.substring(0,2);}
else if(myTime.substring(1, 2) == ":") {myHour = myTime.substring(0,1);}
myHour=1*myHour;
if (myHour<7 || myHour>=18) {CF.widget "Night","Components","Macros").executeActions();}
else {CF.widget("Day","Components","Macros").executeActions();}
Post 17 made on Wednesday January 21, 2009 at 23:55
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Why the myHour=1*myHour? I assume you are trying to ensure that myhour is a number and not a string holding a numeric value?

Javascript will do the conversion automatically when it does the comparson between the numeric as a string (myHour) and the numeric constants 18 and 7. The only time Javascript gets "confused" is with the "+" operator as that one is overloaded to mean addition or concatenation. Things like "Text"+a+b may produce unintended results if a and b are strings containing numbers and addition was meant for the second "+".

The fastest conversion is myHour=myHour-0 as subtraction is much faster than multiplication.
Post 18 made on Thursday January 22, 2009 at 01:32
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Barry,

Ok, good to know.
Post 19 made on Thursday January 22, 2009 at 02:33
DKS001
Lurking Member
Joined:
Posts:
January 2009
1
Hi,

This is possible in this remote as we can fix the time of the day and then can be automated according to it. it works perfectly as I have used it .

DKS

[Link: mls.fastrealestate.net]
Post 20 made on Thursday January 22, 2009 at 12:17
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
why did you include a link to a real estate site on this site? Are you trying to advertise you real job. I believe that is against the rules. I see that this is your first post so either you fat fingered it or you should be hanging out at a real estate forum
Post 21 made on Sunday February 22, 2009 at 01:13
peeti
Lurking Member
Joined:
Posts:
February 2009
3
As a follow on to this thread - is it possible to create a crontab like system so that the Pronto while sitting there peacefully in the charger can act as, say, an X10 trigger to turn on exterior lighting? (for example that is).

TIA!

(p.s. new screen name - lost password no longer have same email account - old time user)
Page 2 of 2


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse