Setting scene with HAI SDK

bitNine

Member
I've been working a bunch with the HAI SDK over the past couple years. Just getting back to modifying a bunch of stuff in my app and have run into a problem with setting the scene on a specific room.
 
In C# the command is:
 

HAC.SendCommand(enuUnitCommand.SceneSet, 0, 9);
 
The second argument (byte Par), which is set to 0, should be the scene number. At least, that's what I'm guessing. Or it needs to be some other number I can't seem to figure out. I figured it might be 2-5 for A-D, since the unit.Status comes back as 2-5 for those scene settings. But no matter what value I send, the scene does not change.
 
9, the third argument, is Room #2, which is unit #9.
 
Any idea what the second argument needs to be set to in order to set a specific scene?
 
It's been a while since I used HAI sdk, but what I recall is the command parameters depend on the lighting type used. It is different for HLC sceens versus say Leviton sceens. What lighting type are you trying to control?
 
In that case I believe the second parameter is a scene number 2-13 (A-L) and the second is the room (in your example, 2)
 
HLC devices only have scenes A-D, as far as I have ever known. Either way, I've tried every number from 0 to 20, and even tried a couple up in the hundreds like 100, 101, 102, etc. Never sets the scene. Using that second argument always works for setting flag values, and also setting unit dim levels. Just can't figure out that number for HLC scene.
 
Can you turn the room #2 ON using this command?
 
HAC.SendCommand(enuUnitCommand.SceneSet, 1, 2);
 
You need to be using command #14.  Their docs don't explicitly state it, but I figured it out because the decription said "HLC Room or Lightolier Compose unit".
 
UID needs to be a room ID.  Individual unit ID's will ignore the command.
 
HAC.SendCommand(14, 0, UID);
  or
HAC.SendCommand(enuUnitCommand.Compose, 0, UID);
 
Param 2 is:
0 = Room Off
1 = Room On
2 = Scene A
3 = Scene B
4 = Scene C
5 = Scene D
 
 

 
 
Back
Top