Charmed Quark Systems, Ltd. - Support Forums and Community
How do I have one set of control (on/off) buttons for multiple devices? - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums)
+-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3)
+--- Forum: Installation/Configuration (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=10)
+--- Thread: How do I have one set of control (on/off) buttons for multiple devices? (/showthread.php?tid=639)

Pages: 1 2


How do I have one set of control (on/off) buttons for multiple devices? - Dean Roddey - 11-07-2006

No, there currently isn't a way to do that. It's now very high on the list, as are usability issues in general.


How do I have one set of control (on/off) buttons for multiple devices? - Sendero - 11-21-2006

OK, I got 2.0 setup and tried to get this workin. Here is an example of what I do on a button to select the light:
[OnClick]
GlobalVars::SetVariable(GVar:CurrentLight, Insteon.Den)


And when I click the On button I have this:
[OnClick]
Devices::FieldWrite(GVAR:CurrentLight, On)

But, I just get an error of
"'GVAR:CurrentLight' is not a valid field name. It must be in the form 'moniker.fldname'"

Did I miss something? How do I do what I wanted to do without using a ton of IF statements? My reading of this thread was that this code would work.


How do I have one set of control (on/off) buttons for multiple devices? - IVB - 11-21-2006

Sendero Wrote:OK, I got 2.0 setup and tried to get this workin. Here is an example of what I do on a button to select the light:
[OnClick]
GlobalVars::SetVariable(GVar:CurrentLight, Insteon.Den)


And when I click the On button I have this:
[OnClick]
Devices::FieldWrite(GVAR:CurrentLight, On)

But, I just get an error of
"'GVAR:CurrentLight' is not a valid field name. It must be in the form 'moniker.fldname'"

Did I miss something? How do I do what I wanted to do without using a ton of IF statements? My reading of this thread was that this code would work.

Try making it GVar

(lowercase ar


How do I have one set of control (on/off) buttons for multiple devices? - IVB - 11-21-2006

actually, one of them is a fieldwrite, one of them is a setvariable.

make the fieldwrite a setvariable, does that work?


How do I have one set of control (on/off) buttons for multiple devices? - Sendero - 11-21-2006

well, using the SetVariable doesn't error, but since I have another problem with the Insteon driver not loading I can't tell if its working right or not Smile hopefully that was it, I'll report back if it wasn't. Thanks for the advice.


How do I have one set of control (on/off) buttons for multiple devices? - Sendero - 11-28-2006

OK, got the new Insteon driver and now back to having issues with my UI.

The UI has only two 'room' buttons on it right now : Den and Kitchen.
The UI also has two 'action' buttons : On and Off

The Den button has this code:
[OnClick]
GlobalVars::SetVariable(GVar:CurrentLight, INSTEON.Den)


The On button has this code:
[OnClick]
GlobalVars::SetVariable(GVar:CurrentLight, 100)

When I click Den and then On, nothing happens. I know I have to be missing something here.

On a test button I have this code and it works fine:
[OnClick]
Devices::FieldWrite(INSTEON.Den, 100)

How do I have one button set the name of the driver:field and another button actually use that for a FieldWrite action?


How do I have one set of control (on/off) buttons for multiple devices? - Sendero - 11-29-2006

OK, I got it working. In the click method for the On button, the code has to be a FieldWrite after all:
Devices::FieldWrite(%(GVar:CurrentLight), 100)

works like charm now