| Author |  | 
      
        | npavkov Groupie
 
  
 
 Joined: February 29 2004
 Location: United States
 Online Status: Offline
 Posts: 91
 | 
          dave how can I use the buttons on the control center screen programatically (using macros) to monitor, show, and change the state of the device the button controls. I have a background image loaded in my control center and would like to use the buttons (even though they are not graphical) to monitor the state of the devices. On that point, dave, when are you going to give us the ability to load graphics into the buttons on the control center screens???? Just asking???
           | Posted: February 21 2006 at 13:49 | IP Logged |   |  
           | 
 |    | 
       
        | Back to Top |     | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          The Control Center expanded functionality will be worked on shortly.  This is something that Ive wanted to do for a long time, but had to take a back burner for some of the newer controllers that have come out recently.
           | Posted: February 22 2006 at 13:42 | IP Logged |   |  
           | 
 |  
 But, you can programmatically alter button appearance now.  Look in the PowerHome Help file under Functions->Control Center.  For example, to change a button's background color, use the ph_setccbtnbcolor function.
 
 HTH,
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | guerrand Senior Member
 
  
  
 Joined: December 18 2005
 Location: United States
 Online Status: Offline
 Posts: 106
 | 
          I am trying to implement this but it doesn't seem to be working. (and that particular function doesn't exist either)
           | Posted: January 29 2007 at 01:14 | IP Logged |   |  
           | 
 |  
 I'm trying to do it as a combo with the status trigger I had to make for the web page.
 
 ph_x10setstat(2,'m',3,0,0) + ph_setccobjbcolor("MY ROOM","TB5","yellow")
 
 If I can't combo it like that I can redo it as a macro.
 (or a way to do it by swaping 2 images depending on status would be better)
 
 Also, I'm using ph_setcctab to switch tabs with a button in the cc. It works fine on the computer running ph but not through the web interface. Is it designed that way or is something else broke on my ph?
 
 (do you think I should just backup my db and reinstall?)
 
 Edited by guerrand - January 29 2007 at 01:26
 
 __________________
 VuMe
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          
           | Posted: January 29 2007 at 07:00 | IP Logged |   |  
           | 
 |  
| Quote: 
 
    
    | 
      
       | that particular function doesn't exist either |  |  |  It did back then.
   
 You need to use this to specify the color...
 
 rgb( r, g, b)
 
 As in, yellow = rgb(255,255,0).
 
 I believe ph_setcctab only works in PH itself.
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | guerrand Senior Member
 
  
  
 Joined: December 18 2005
 Location: United States
 Online Status: Offline
 Posts: 106
 | 
          Thanks Tony. It didn't mention anything about rgb values in the help file.
           | Posted: January 29 2007 at 09:55 | IP Logged |   |  
           | 
 |  
 __________________
 VuMe
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Nope. That's one that fell through the cracks.
           | Posted: January 29 2007 at 14:28 | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |       | 
       
       
        |  | 
        | guerrand Senior Member
 
  
  
 Joined: December 18 2005
 Location: United States
 Online Status: Offline
 Posts: 106
 | 
          *kicks Dave in the shin*
           | Posted: January 29 2007 at 14:31 | IP Logged |   |  
           | 
 |  
 
   
 __________________
 VuMe
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Guerrand,
           | Posted: January 29 2007 at 19:47 | IP Logged |   |  
           | 
 |  
 Tony has you covered.  The function used to be ph_setccbtnbcolor but was updated to ph_setccobjbcolor when PowerHome started supporting the newer CC objects.  Also, a color is a numeric value, easiest to obtain using the rgb function which just takes the individual color values and multiplies them out by powers of 16 (I cant remember the exact formula but can look it up) to acheive a unique color value.
 
 The next beta has a new action type for the Control Center for navigation.  It will change the CC tab to a new tab based upon if you're in the web or the client.  In the meantime, you can do this with two functions in a "Raw Formula" type of action.  The formula below will change the CC tab whether you're in the Client or the Web:
 
 ph_setcctabid("NEWCCTABID") +  ph_setwebnexturl("/ph-cgi/redirect?type=1&url=/ph-cgi/ccmap? id=NEWCCTABID")
 
 This should take care of the navigation.  The code below:
 
 ph_x10setstat(2,'m',3,0,0) + ph_setccobjbcolor("MY ROOM","TB5",rgb(255,255,0))
 
 is your formula updated to use the RGB function for the color yellow.  Adding the two functions this way is perfectly acceptable and is the intended way for functions and formulas to typically be used
   
 Hope this helps,
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | guerrand Senior Member
 
  
  
 Joined: December 18 2005
 Location: United States
 Online Status: Offline
 Posts: 106
 | 
          Awesome. I have the color thing fixed already, just needed the info on changing pages via web.
           | Posted: January 29 2007 at 19:53 | IP Logged |   |  
           | 
 |  
 Looking forward to the new beta, any guesstamate on when it might be available?
 
 __________________
 VuMe
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Im working hard to have it out around Feb 10 (2007 for you comedians
           | Posted: January 31 2007 at 14:31 | IP Logged |   |  
           | 
 |   ), but we all know me and dates. 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | guerrand Senior Member
 
  
  
 Joined: December 18 2005
 Location: United States
 Online Status: Offline
 Posts: 106
 | 
          damn, preempted my joke. lol
           | Posted: January 31 2007 at 14:43 | IP Logged |   |  
           | 
 |  
 __________________
 VuMe
 | 
       
        | Back to Top |       | 
       
       
        |  |