Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Showing light status in control center? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
niels
Newbie
Newbie


Joined: September 23 2007
Location: United States
Online Status: Offline
Posts: 12
Posted: September 25 2007 at 00:11 | IP Logged Quote niels

Is it possible to make a button in the Control Center screen reflect the status of the light(s) it is controlling? For example, when the light is on the button is yellow, when it is off the button is gray?

(I am relatively new to the software having only used it 1 day so far. It's already solved my biggest Insteon problem, I am so impressed)

Niels.
Back to Top View niels's Profile Search for other posts by niels
 
jbbtex
Senior Member
Senior Member


Joined: February 15 2007
Location: United States
Online Status: Offline
Posts: 181
Posted: September 27 2007 at 10:26 | IP Logged Quote jbbtex

The short answer is yes.

I update status on CC by triggering a macro on any Insteon change (don't have any x10 modules).

The macro checks the status of all my Insteon modules and changes CC button background color to reflect status using the ph_setccobjbcolor formula.
Back to Top View jbbtex's Profile Search for other posts by jbbtex
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 27 2007 at 10:30 | IP Logged Quote dhoward

Niels,

Welcome to PowerHome! Glad you like the software so far.

Automatic support for what you want is in the works, but in the meantime, it can be done simply enough with a trigger and a couple of functions.

The first thing to do is create a trigger for the light you wish to monitor. Im going to call this trigger "LIGHT1" but you can substitute appropriate ID's as you see fit. The trigger definition would be:

LIGHT1
Light1 Status Change
Raw Formula
ph_setccobjbcolor("CC_TAB_ID_OF_BUTTON","CC_BUTTON_ID_OF_LIG HT",case([LOCAL10] when 0 then 8421504 else 65535))
Enabled
Insteon Device Chg
ID_OF_LIGHT
1
(Any)
1

That's it. You'll just need to substitute in the appropriate ID's of your devices and it should work. The only other thing you may want to add is a trigger for "System Process" / "CC Refresh" to set the initial background colors for the buttons anytime the CC is refreshed or initialized.

Good luck and let me know if you have any other questions or problems.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
niels
Newbie
Newbie


Joined: September 23 2007
Location: United States
Online Status: Offline
Posts: 12
Posted: September 27 2007 at 10:48 | IP Logged Quote niels

Thanks for both replies. I cannot begin to tell you how impressed I am with the user community and developer support for PowerHome. I am just evaluating, and I have gotten better support here than I have for software I have bought from others for way more money.

Dave, your suggestion seems to work very well, that was exactly what I was looking for. I assume you realize that it is VERY impressive to have the lead developer of a product take the time to answer a basic newbie question. Thanks so much!

Niels.
Back to Top View niels's Profile Search for other posts by niels
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: September 27 2007 at 13:26 | IP Logged Quote TonyNo

Yeah, Dave's like that.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
keepersg
Newbie
Newbie


Joined: July 23 2007
Location: United States
Online Status: Offline
Posts: 29
Posted: October 03 2007 at 01:44 | IP Logged Quote keepersg

Dave, I've gotten this trigger to work. Now I'm trying to use ph_ccsetobjgraphic to change out a graphic button in the same scenario. Can't get it. Can you please explain the use of LOCAL10 in your case statement. I've not been able to understand what local variables are used in various situations. Thanks.
Back to Top View keepersg's Profile Search for other posts by keepersg
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: October 03 2007 at 08:58 | IP Logged Quote cmhardwick

[LOCAL10] is the variable returned by the trigger showing the current level of the device (0 - 255). So, he's saying if it's 0 (or off), set it to this color, otherwise, set it to this.

__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 
keepersg
Newbie
Newbie


Joined: July 23 2007
Location: United States
Online Status: Offline
Posts: 29
Posted: October 03 2007 at 10:40 | IP Logged Quote keepersg

Cicero, Thanks for replying. I understand the logic but what I don't understand is the scheme for using local variables to represent device status. Maybe I've missed it in the documentation. If you could point me in the right direction, I'd appreciate it...George
Back to Top View keepersg's Profile Search for other posts by keepersg
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: October 03 2007 at 11:40 | IP Logged Quote dhoward

Keepers,

The [TEMP] and sometimes the [LOCAL] variables are automatically populated with relevant data within a trigger. So, the above formula will ONLY work from within a trigger, specifically the "Insteon Device Chg" trigger since this is one of the few triggers that actually has so many data points to populate that the [TEMP] variables cant hold them all so it overflows into the [LOCAL] variables.

To change the above function to change a graphic instead of a text button, use:

ph_setccobjgraphic("CC_TAB_ID_OF_BUTTON","CC_BUTTON_ID_OF_LI G HT",case([LOCAL10] when 0 then "UP_GRAPHIC_OFF" else "UP_GRAPHIC_ON"),case([LOCAL10] when 0 then "DOWN_GRAPHIC_OFF" else "DOWN_GRAPHIC_ON"))

The help file is wrong for this function and mistakenly shows a fifth parameter called flags . I didnt realize that until now while checking this out and is probably at the root of your problem.

HTH,

Dave.


Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
keepersg
Newbie
Newbie


Joined: July 23 2007
Location: United States
Online Status: Offline
Posts: 29
Posted: October 04 2007 at 00:38 | IP Logged Quote keepersg

dhoward wrote:
Keepers,

The help file is wrong for this function and mistakenly shows a fifth parameter called flags . I didnt realize that until now while checking this out and is probably at the root of your problem.

HTH,

Dave.


Dave, That was it alright. Got it working the way I wanted it to behave. I appreciate your prompt response...George
Back to Top View keepersg's Profile Search for other posts by keepersg
 
tbeckman
Senior Member
Senior Member


Joined: December 30 2007
Location: United States
Online Status: Offline
Posts: 149
Posted: September 23 2008 at 18:55 | IP Logged Quote tbeckman

Dave, in this post you mentioned "Automatic support for what you want is in the works, but in the meantime, it can be done simply enough with a trigger and a couple of functions. "

Is this automatic support ready with the new beta? Thanks.

Back to Top View tbeckman's Profile Search for other posts by tbeckman
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: September 24 2008 at 06:50 | IP Logged Quote TonyNo

I think the only part that made it into this beta is Global Variables.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 24 2008 at 20:38 | IP Logged Quote dhoward

tbeckman,

Unfortunately no...I scaled back some of the planned updates to get this beta out since I was taking entirely too long. Tony is right and the only planned CC upgrade (besides the CC wizard) that made it into this release is the Global variables (which I still have to update the remote clients to work with).

Im still planning on the other enhancements, it'll just be in the beta after the release version.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 08 2009 at 08:46 | IP Logged Quote GadgetGuy

I'm trying to use the ph_setccobjgraphic function but
can not get it to work.

Simplifying to basics, I have the following formula in a
1-line macro. The formula evaluates correctly to "0"
but there is never a change in the Up Graphic (nor the
Down but I wasn't trying to change that).
Code:
ph_setccobjgraphic("1","1BS1","C:\Program
Files\powerhome\web\graphics\buttons\b1green-u_75.gif","
")


The Button ID is correct and it resides on the only CC
tab (which is #1). The graphic path is also correct.
Indeed if I copy it into the 1BS1 Up Graphic Filepath
element of the CC db, the button correctly changes it's
graphic.

What am I missing here?

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: January 08 2009 at 09:00 | IP Logged Quote nadler

Instead of "1" try the actual tab name in quotes.
Back to Top View nadler's Profile Search for other posts by nadler
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 08 2009 at 10:34 | IP Logged Quote GadgetGuy

Thanks Nadler, but "no go."

With a 1 (rather than "1") the Formula will not Validate
and the expression fails. Apparently"1" is correct and
something else is going on, but it sure beats me. I
actually copied an example that Dave had posted, but
changed his case() logic that picked a graphic to a
static decision, so mine should be simpler and thus
work, but it doesn't!

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: January 08 2009 at 11:37 | IP Logged Quote nadler

Usually the tabs have names not numbers. I was wondering if a change from "1" to "MYCCNAME" would do the trick.
Back to Top View nadler's Profile Search for other posts by nadler
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 08 2009 at 12:30 | IP Logged Quote GadgetGuy

Nadler-

You just won the "Winner of the Day" award.

That did it. Although the doco states that the Tab
Number should be used, it is "in-point-of-fact" the Tab
Name that is required.

I've been fighting this for days.

Thanks to you it works.

Awesome dude!

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
williammanda
Groupie
Groupie


Joined: December 03 2008
Location: United States
Online Status: Offline
Posts: 84
Posted: January 18 2009 at 20:59 | IP Logged Quote williammanda

I'm having trouble figuring out what the values are for the CC_TAB_ID_OF_BUTTON and CC_BUTTON_ID_OF_LIGHT? Are these found in the design view of the control center?
This is the error log:
Syntax Error in Formula: ph_setccobjbcolor(~"GB1N~",~"MBLIGHT~",case( when 0 then 8421504 else 65535))
Thanks





Edited by williammanda - January 18 2009 at 21:46
Back to Top View williammanda's Profile Search for other posts by williammanda
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 19 2009 at 07:50 | IP Logged Quote GadgetGuy

The CC_TAB_ID_OF_BUTTON is a string which the name of the Tab (presentation page if you will) on which your buttons lie. If you just have a single Tab (which is probably your case at the moment) and you used the Wizzard to create your CC screen, then that Tab will have been auto named to be the same as the Location (up/down/in/out/kitchen/etc) that you gave for the Insteon Device in its Unit definition. You can also see the name by displaying the Control Center in Insteon Explorer.

Here is mine, where I have renamed my Tab to be "STATUS".


In this view you can also change the Tab name by clicking on the name shown in the ID column and changing it to what you want.

The CC_BUTTON_ID_OF_LIGHT is just what you have named the CC button that controls your light. In your case it is "GB1N"

Thus putting it all together, but using my Tab name since I don't know yours. Your change object color command would be
Code:
ph_setccobjbcolor("STATUS","GB1N",case(when 0 then 8421504 else 65535))


BTW-if you get as frustrated as I did having to put decimal numbers in for colors then look at the
Code:
rgb(red,green,blue)

command where at least you can use more "natural" color values from 0-255.


__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 

Page of 2 Next >>
  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