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

Login:
Pass:
 
 

Topic:
How to execute script when Pronto wakes?
This thread has 4 replies. Displaying all posts.
Post 1 made on Friday January 30, 2009 at 13:26
pthornhill
Long Time Member
Joined:
Posts:
June 2008
53
Is there any way to have some Prontoscript execute when the Pronto wakes up (ie. pick it up off the cradle and screen comes on to Home page, then page code executes)?

When I pick up my 9600, I want it to poll my Onkyo 876 receiver by 232 to check power status and source selected. Then I can auto-jump 9600 to the controls page for whatever source is selected.

Reason I want to do this is cos cinema room has Lutron homeworks keypad in entry. When you click "Movies" on Lutron keypad, it sends 232 cmds to Onkyo 876 to turn on (as well as turning on screen etc). So when I walk into cinema room I want to press "movies" on lutron keypad - it starts lights dimming, turns on screen & Onkyo, sets input to say DVD. Then when I sit down and pick up Pronto I want it to wake up, poll the 876 to discover DVD is selected, then jump to DVD controls page.

To my partner it will seem like Pronto just magically knows what you selected!! I can do all the above but my code polls the 876 every 10 seconds via page repeat (cos its docked). I don't want to tie up the extender every 10 seconds cos its used by 2nd 9600 for other source control & I dont want conflicts.

Any ideas how the polling via extender can be done once on Pronto wakeup? Apologies for the long post!!
Post 2 made on Friday January 30, 2009 at 13:36
Jon Welfringer
Long Time Member
Joined:
Posts:
December 2002
175
Does your Lutron system track the state of all devices? If so, you may want to just poll that.
OP | Post 3 made on Friday January 30, 2009 at 13:49
pthornhill
Long Time Member
Joined:
Posts:
June 2008
53
thanks Jon - yeah well it can be polled to track status of the various keypad buttons. It's just more difficult for me to extract the relevant polling Prontoscript from the Lutron-produced script. Using script to poll Onkyo via 232 is easy by comparison!!

I guess at least polling the Lutron via IP doesn't tie up the extender so that's a good option. Would still like to know if I can execute code on Pronto wakeup though - that'd be useful for a number of things.
Post 4 made on Friday January 30, 2009 at 15:10
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
To do something like this is not difficult, but relies on unit being undocked, timing, and current "sleep" behavior of Pronto.

Barry Gordon and I have discussed this before with regard to "Timers" (please do a search) and basically, you do a scheduleAfter() request that is repeated every 500 or so milliseconds. You must keep track of time last run (milliseconds - new Date().valueOf()) and if the difference between the time last run and time in current run is say > 2X the interval (500), you can assume the unit has been asleep and is waking up at which point, you try an execute the actions you need.

Note that this ONLY works if the unit remains undocked where CPU of Pronto is put to sleep. If the unit is always docked, then Javascript runs all the time and there is NO way to determine if unit is being picked up (waking up).
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 5 made on Friday January 30, 2009 at 18:06
bipolarbear
Long Time Member
Joined:
Posts:
April 2008
36
Just run a script on your home page that checks the power status via serial every couple of seconds,.. when you wake the controller it will run the command. Of if the remote is docked it will run pretty soon after the reciever powers on.

I use something similar to turn on the Television and receiver, then set inputs as needed when I turn on my X-box. My script checks the status of a 12v trigger on the serial extender, your script would just query the reciever via rs232.


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