Charmed Quark Systems, Ltd. - Support Forums and Community
global actions and lighting groups - 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: global actions and lighting groups (/showthread.php?tid=9582)

Pages: 1 2


global actions and lighting groups - jkmonroe - 11-29-2015

i swear i posted about this once before, but i can't find it.

im trying to configure up global actions as lighting groups - only on/off and dim level for the entire group. so i have a global action that has each light DIM# and SW# loaded in, and now I have to figure out how to write a dim value and a switch value.

i think it's easy enough to do with the variables driver, but i don't really want to have to create two variable fields for each group (dining_sw, dining_dim). i guess i could just have one field each, SW and DIM, but it's possible when kicking off a scene that one group gets 25% while another gets 10%.

the groups will be used in scheduled events, triggered events, and via the IV.

what would be the best and easiest way to handle this?

edit: this is Hue, so my single dining room chandelier has 6 bulbs in it. these are the types of groups im talking about - basically a pseudo on/off/dim switch that can control a set of bulbs.


global actions and lighting groups - Dean Roddey - 11-29-2015

The command that lets you invoke a global action has a parameters value, which you can use to pass values into the global action. It has to be a quoted comma list of values. Each quoted value shows up as one of the standard action parameters that you can access. So if you passed:

"Kitchen", "25"

You'd get two parameters, one the value Kitchen and the other with the value 25.


global actions and lighting groups - jkmonroe - 11-29-2015

really. so i could pass the dim level i want and ON/OFF.

what would i put in the field inside the global action so it knows to use the passed value?


global actions and lighting groups - Dean Roddey - 11-29-2015

You use the standard action parameters. If you don't know the form, just right click in any of the parameter fields and the popup menu allows you to insert parameter references. They just resolve to whatever the passed values were.


global actions and lighting groups - jkmonroe - 11-29-2015

oh, sweet!

so ActParm_1 would correspond with the first value, and ActParm_2 the second?

got it. this will make my life so much easier that i might have some free time.


global actions and lighting groups - Dean Roddey - 11-29-2015

Yep, that's how it works.


global actions and lighting groups - jkmonroe - 11-29-2015

holy shit this is awesome. how did i not know about this?

i can basically move all of my Hue events and bits into global actions now and just pass parameters instead of hacking through it. im probably still stuck in CQC 1.X/2.X land where I needed to do some of these workarounds ...


RE: global actions and lighting groups - indygreg - 06-02-2017

i have a routines that do a series of events with wait timers in between (open a valve, wait 10 seconds, close a valve, etc). i have a field command button that on false sets the variable to true then triggers the work which is in a global action. at the end of the global action i set the variable behind the command button back to false. for some reason the command button never loads it's true image. the idea is that i want to click, have the button light then after the global action is done the button unlights. is this some kind of issue where a global action is synchronous so the display never gets to update? like the scenario i used to see in vb where you needed a doevents()? or should i be using a triggered event that somehow watches the global variable connected to the command button so that the action is async?

greg


RE: global actions and lighting groups - Dean Roddey - 06-02-2017

The action is synchronous, so nothing else is going to get processed until it's done. You could of course not use a check box but just use a regular button and put a static boolean image beside it. Set it to true before you start the action and back to false when its done.

For that matter you could use a static check box. When you get the event, set the check box to the desired state, then run the action. When it's done, set the check back to the original state. Static check boxes don't auto-check, you set the state yourself, so it would allow you to do what you want to do.

Of course it wouldn't light up if someone did the action from another system.


RE: global actions and lighting groups - indygreg - 06-02-2017

what if i wanted to be able to interrupt the action by clicking the check box off again?  is there any mechanism in cqc that would allow this?  

i tried running the action in a triggered event so that it would execute async and the button lit as i would expect but for some reason the action would run twice.  i triggered using a field value equals with the global variable.  comp val was True and reg ex was checked.  at the end of the action i set the global var back to false and the button changed but for some reason the action ran a second time.

greg