Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
global actions and lighting groups
#1
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.
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#2
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.
Dean Roddey
Explorans limites defectum
Reply
#3
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?
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#4
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.
Dean Roddey
Explorans limites defectum
Reply
#5
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.
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#6
Yep, that's how it works.
Dean Roddey
Explorans limites defectum
Reply
#7
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 ...
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#8
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
Reply
#9
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.
Dean Roddey
Explorans limites defectum
Reply
#10
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sunsetter Awning with RGBW Lighting and CQC kfly 2 727 07-29-2021, 12:55 PM
Last Post: Dean Roddey
  RadioRA2 vs CQC for Lighting Scenes gReatAutomation 1 881 07-10-2020, 12:16 PM
Last Post: Dean Roddey
  Outdoor Landscape Lighting and CQC gReatAutomation 18 6,851 06-01-2020, 07:22 PM
Last Post: rhosch
  Hue Lighting Control jokermac 17 6,652 03-28-2020, 06:18 AM
Last Post: jokermac
  Global Cache GC-100 - How to add IR Code??? Deane Johnson 7 2,711 11-25-2019, 09:26 AM
Last Post: Deane Johnson
  Global-Cache-iTach-Wi-Fi-WF2IR with CQC Deane Johnson 18 8,421 12-20-2014, 06:09 PM
Last Post: znelbok
  IR code / Global Cache question ControlFreak 11 8,459 11-09-2014, 09:27 PM
Last Post: MikeA
  IP2SL Global Cache maxxsinner 7 4,608 06-08-2014, 02:16 PM
Last Post: Dean Roddey
  template actions and passing a value to znelbok 5 3,848 02-20-2014, 05:02 AM
Last Post: wuench
  [NEW] Lighting Control Poll Squintz 33 19,003 01-19-2014, 02:31 AM
Last Post: karenlee

Forum Jump:


Users browsing this thread: 1 Guest(s)