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:
global variable for light control
This thread has 2 replies. Displaying all posts.
Post 1 made on Monday October 18, 2010 at 02:34
pauljghosh
Long Time Member
Joined:
Posts:
August 2005
13
I have several activities such as DVD, HDTV, HTPC set up. I also have a Lutron IR based dimmer with a favorite setting programmed. During the day I really do not want the Pronto to change the light. During the night I do. So, instead of having the Pronto do something fancy like detect time of day I figured I will just have a toggle button that can be labeled Light Control On or Light Control Off and then based on a variable set decide whether to send the IR code to the Lutron. So, a couple of things I could use help with...

1. I think I have enough information to do a button on top of another button and then make only one visible at a time. So, one will be Control On and the other Control Off. The code will need to read a variable and then set visibility to be true of one of the buttons based on the value. Also, when the button is pressed the variable will need to be changed along with making the other button visible.

2. What is the code for detecting the variable value on an activity and then including an additional IR code for the dimmer? Currently the activities have no prontoscript - just pure IR actions. Also, the IR code for the dimmer is not really assigned to a button currently. It is just part of the Device and available to be included as an action. Is the only option executeAction() to invoke an IR command listed as an Action on a button?
Post 2 made on Monday October 18, 2010 at 11:37
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Step #1 may not be required as you will be using script, you can have a single button do the work and not have to rely on 2 buttons (except that you must have buttons that contain the IR codes you want to send likely on a hidden page somewhere in your config)

The solution is best solved via ProntoScript and you will be looking at System.setGlobal()/getGlobal() and as you suspected Widget.executeActions() or Widget.scheduleActions().

You can find a sample script that might help you get started by searching for:

power getGlobal

Searching for this.scheduleActions or this.executeActions should point you to some threads to give you an idea how for a button, to both 1) set the global flag and 2) execute the actions of the button you just pressed.

And of course, the first 11 chapters of the David Flanagan Javascript book and the Dev Guide are invaluable resources.

Last edited by Lyndel McGee on October 18, 2010 11:46.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 3 made on Monday October 18, 2010 at 11:43
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Here is one thread that may be of interest (power control getGlobal) but be sure to do the search above and read through at least the first page of threads to get an idea of what you are up against.

[Link: remotecentral.com]
Lyndel McGee
Philips Pronto Addict/Beta Tester


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