Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: buttons on control center screen Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
npavkov
Groupie
Groupie


Joined: February 29 2004
Location: United States
Online Status: Offline
Posts: 91
Posted: February 21 2006 at 13:49 | IP Logged Quote npavkov

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???
Back to Top View npavkov's Profile Search for other posts by npavkov
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: February 22 2006 at 13:42 | IP Logged Quote dhoward

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.

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
guerrand
Senior Member
Senior Member
Avatar

Joined: December 18 2005
Location: United States
Online Status: Offline
Posts: 106
Posted: January 29 2007 at 01:14 | IP Logged Quote guerrand

I am trying to implement this but it doesn't seem to be working. (and that particular function doesn't exist either)

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 View guerrand's Profile Search for other posts by guerrand Visit guerrand's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 29 2007 at 07:00 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
guerrand
Senior Member
Senior Member
Avatar

Joined: December 18 2005
Location: United States
Online Status: Offline
Posts: 106
Posted: January 29 2007 at 09:55 | IP Logged Quote guerrand

Thanks Tony. It didn't mention anything about rgb values in the help file.

__________________
VuMe
Back to Top View guerrand's Profile Search for other posts by guerrand Visit guerrand's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 29 2007 at 14:28 | IP Logged Quote TonyNo

Nope. That's one that fell through the cracks.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
guerrand
Senior Member
Senior Member
Avatar

Joined: December 18 2005
Location: United States
Online Status: Offline
Posts: 106
Posted: January 29 2007 at 14:31 | IP Logged Quote guerrand

*kicks Dave in the shin*



__________________
VuMe
Back to Top View guerrand's Profile Search for other posts by guerrand Visit guerrand's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 29 2007 at 19:47 | IP Logged Quote dhoward

Guerrand,

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
guerrand
Senior Member
Senior Member
Avatar

Joined: December 18 2005
Location: United States
Online Status: Offline
Posts: 106
Posted: January 29 2007 at 19:53 | IP Logged Quote guerrand

Awesome. I have the color thing fixed already, just needed the info on changing pages via web.

Looking forward to the new beta, any guesstamate on when it might be available?

__________________
VuMe
Back to Top View guerrand's Profile Search for other posts by guerrand Visit guerrand's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 31 2007 at 14:31 | IP Logged Quote dhoward

Im working hard to have it out around Feb 10 (2007 for you comedians ), but we all know me and dates.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
guerrand
Senior Member
Senior Member
Avatar

Joined: December 18 2005
Location: United States
Online Status: Offline
Posts: 106
Posted: January 31 2007 at 14:43 | IP Logged Quote guerrand

damn, preempted my joke. lol

__________________
VuMe
Back to Top View guerrand's Profile Search for other posts by guerrand Visit guerrand's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum