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 1 of 2
Topic:
Automation based on time of day?
This thread has 20 replies. Displaying posts 1 through 15.
Post 1 made on Monday January 19, 2009 at 16:31
996cab
Long Time Member
Joined:
Posts:
October 2007
58
Not sure how to accomplish this, or even if possible... Do know that I do not know how to program in JAVA, etc. though pretty good at designing my Pronto Pro.

I would like to have it so that dependent on the time of the day a different command would be ran. For example, in my media room during the day it gets some ambient light and thus the projector has been calibrated for it. There is another saved calibration setting for nighttime when ambient light is not an issue. What would be great is if I could have a button that recalled "Daytime" projector settings if the time was between (for example) 7 AM and 6 PM, other wise (i.e. 6:01 PM and 6:59 AM) it would recall the "Nighttime" settings. Basically the day and night settings can be called up via a macro I created for the projector.

Thoughts?
Post 2 made on Monday January 19, 2009 at 17:47
RemoteQuest
Long Time Member
Joined:
Posts:
October 2008
245
I don't think you can querey the time clock and then do anything with it. More likely in a ProntoScript but I do not know.

You could easily add activites to do this and then you manually choose which one you want. RE: Watch XYZ daytime and Watch XYZ nightime. Run the macros with the different projector settings.

Auto config would be very cool but I don't see it happening. Possibly in a java script.

Dave
Post 3 made on Monday January 19, 2009 at 17:49
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
The pronto has a clock with sufficient accuracy for what you want. You can read the clock and based upon its value alter the operation. It will require prontoscript however.

the actual Prontoscript code is quite simple. The information on the clock is not (as I recall) discussed in the pronto Developers guide, but since it is JAVAscript any good Java reference will discuss it.

I use a JAVA function to get the date time in seconds in a lot of my code as that is quite simple.

For example
LT=new Date();
localHours=LT.getHours(); // this is now the hours field of the date
localMinutes=LT.getMinutes(); // This is now the minutes field of the date
Post 4 made on Monday January 19, 2009 at 22:10
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Barry,

Are you sure about the time being correct? IIRC, there's an offset in milliseconds that is set during download time that will cause Hours and Minutes to be adjusted but early prontoscript experience for sure proved to me that the M,D,and Y, were not valid. The only thing I could rely on from the Date() constructor that was valid, IIRC, is seconds.

To get hour and minute, you must use GUI.getDisplayTime() and then break it apart for either a 12 or 24 hour clock.

Here's some code I used in the past to do this.


// Extract from GUI.getDisplayTime(), the hour, minute, and 'am' or 'pm'.
// In case of 24 hour clock, variable ampm will be either an empty string, null, or
// undefined - TBD by your own debugging.

var timePattern = new RegExp('(\\d+):(\\d+)((am|pm)*)','g');
GUI.getDisplayTime().match(timePattern);
var hour = parseInt(RegExp.$1,10);
var minute = parseInt(RegExp.$2,10);
var ampm = RegExp.$3;
var seconds = new Date().getSeconds();
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 5 made on Monday January 19, 2009 at 23:43
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Lyndel, you are probably right. I was just quoting the Java doc. I also only use seconds in my work.

IIRC = If I Remember Correctly ?? Need to remeber that one
OP | Post 6 made on Tuesday January 20, 2009 at 09:44
996cab
Long Time Member
Joined:
Posts:
October 2007
58
considering I have zero skills at scripts I am thinking (unless someone wants to write the code) that having buttons that send the commands is the easiest route...
Post 7 made on Tuesday January 20, 2009 at 11:26
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Barry,

IIRC - If I Recall Correctly
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 8 made on Tuesday January 20, 2009 at 13:30
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Recall - Remember, IIRC which one it is (;-)
Post 9 made on Tuesday January 20, 2009 at 15:18
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
:-P
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 10 made on Wednesday January 21, 2009 at 10:15
996cab
Long Time Member
Joined:
Posts:
October 2007
58
I would be willing, for a reasonable cost, to pay someone to create the script to do what I described. If interested email me at [email protected]

Thanks!
Post 11 made on Wednesday January 21, 2009 at 10:24
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
On January 21, 2009 at 10:15, 996cab said...
I would be willing, for a reasonable cost, to pay someone
to create the script to do what I described. If interested
email me at [email protected]

I'd be happy doing it for you at no cost if you send me your XCF configuration file by RC mail together with identifying the button(s) in question and what you want them to do. Also, say whether you use PEPV1 or PEPV2 as your editor.
Post 12 made on Wednesday January 21, 2009 at 11:19
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Guy, you will know if PEPv2 if you try to load in PEPv1.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 13 made on Wednesday January 21, 2009 at 11:43
996cab
Long Time Member
Joined:
Posts:
October 2007
58
On January 21, 2009 at 10:24, Guy Palmer said...
I'd be happy doing it for you at no cost if you send me
your XCF configuration file by RC mail together with identifying
the button(s) in question and what you want them to do.
Also, say whether you use PEPV1 or PEPV2 as your editor.

THANKS! Sent message via email with the XCF, could not see how to attach files via RC Mail. I am using PEP V1
OP | Post 14 made on Wednesday January 21, 2009 at 15:46
996cab
Long Time Member
Joined:
Posts:
October 2007
58
On January 21, 2009 at 10:24, Guy Palmer said...
I'd be happy doing it for you at no cost if you send me
your XCF configuration file by RC mail together with identifying
the button(s) in question and what you want them to do.
Also, say whether you use PEPV1 or PEPV2 as your editor.

Got the XCF with the script you wrote, THANKS! Works exactly as I wanted!
Post 15 made on Wednesday January 21, 2009 at 17:31
Herb Crane
Long Time Member
Joined:
Posts:
May 2005
104
Hi Guys,

Been lurking at the string. This sounds very useful. Do you mind posting the script?

Herb
Page 1 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