Lutron Radio RA and Level Events
ericthompson
Posts: 28
I have been reading a lot of posts of levels and mulit-state bargraphs. I am controlling a Radio RA system, and I can't tell if some of things that I want to do are inherent weaknesses in the product line or my programming.
First, aside from using phantom buttons (there are only 16), I want to manually control zones, ramping the dimmer level up and down. The other reason I didn't want to use phantom buttons is because you can only get an on or off response, so I wouldn't be able to update a bargraph with the current light level. There seems to be no smooth way to do this because every Set Dimmer Level (SDL) command has a ramping time from state to state. Even if you set the ramping time to zero, it is not quite instantaneous. Is this just a problem in how the response times between the RA-RS-232 and the NI-xxxx, or is there some other commands that I haven't tried? Is Homeworks much more powerful in this regard?
Second, I want to institute a multi-state bargraph to set and display dimming levels. I saw DHawthorne saying that you have to be careful not to set up an infinite loop. I believe I did this, but I am still not happy with the results. I guess one thing I can't seem to do is get the level from the panel unless I am in a LEVEL_EVENT. In there I used the SEND_LEVEL along with the LEVEL.VALUE. How can I retrieve a level value without a LEVEL_EVENT? My example would be that I have a bargraph. As I press near the top, the bargraph begins to fill. When I let go is when I would want the use the current value to set the dimmer level. It seems in a LEVEL_EVENT it activates it the entire way, therby sending multiple commands to the Radio RA. With the Radio Ra, the dimmer can't keep up with it, so it is either very choppy and slow, or it just doesn't work.
I was thinking of using the BUTTON_EVENT, but how can I only read the level value once the multi-state bargraph is in the release state.
Third, how do I give a variable a definitve range? Eg, I declare nDimmerLevel of type Char, so it is 0-255. However, I want it to never go below zero or above 100. Doing a counter and using IF statements, I can limit when it is used, but it can still achieve an out of range value.
First, aside from using phantom buttons (there are only 16), I want to manually control zones, ramping the dimmer level up and down. The other reason I didn't want to use phantom buttons is because you can only get an on or off response, so I wouldn't be able to update a bargraph with the current light level. There seems to be no smooth way to do this because every Set Dimmer Level (SDL) command has a ramping time from state to state. Even if you set the ramping time to zero, it is not quite instantaneous. Is this just a problem in how the response times between the RA-RS-232 and the NI-xxxx, or is there some other commands that I haven't tried? Is Homeworks much more powerful in this regard?
Second, I want to institute a multi-state bargraph to set and display dimming levels. I saw DHawthorne saying that you have to be careful not to set up an infinite loop. I believe I did this, but I am still not happy with the results. I guess one thing I can't seem to do is get the level from the panel unless I am in a LEVEL_EVENT. In there I used the SEND_LEVEL along with the LEVEL.VALUE. How can I retrieve a level value without a LEVEL_EVENT? My example would be that I have a bargraph. As I press near the top, the bargraph begins to fill. When I let go is when I would want the use the current value to set the dimmer level. It seems in a LEVEL_EVENT it activates it the entire way, therby sending multiple commands to the Radio RA. With the Radio Ra, the dimmer can't keep up with it, so it is either very choppy and slow, or it just doesn't work.
I was thinking of using the BUTTON_EVENT, but how can I only read the level value once the multi-state bargraph is in the release state.
Third, how do I give a variable a definitve range? Eg, I declare nDimmerLevel of type Char, so it is 0-255. However, I want it to never go below zero or above 100. Doing a counter and using IF statements, I can limit when it is used, but it can still achieve an out of range value.
0
Comments
While this is not code intended for your device, the concept is the same. These functions could be called in a BUTTON HOLD event with repeat value set to create suitable ramp time. Define range low and high values in your bargraph object, to get proper scaling of channel value.
The concept is the same for signed integer or float type audio levels.
When sending from controller to panel you have to ensure range matches that set in panel mult-state bargraph object. Button action from touch panel will be send in range of what is defined by multi-state bargraph object.
Start by disabling ramp time with Lutron dimming. The level event rate should determine dim rate. If level changes is too "stepped" perhaps then play with the Lutron dim rate.
If you want to both display and control levels of the same device you should create two level channels. The bargraph level for viewing should be behind the level for control and set to level function "display only" while the bargraph level for control should be transparent, level function set to "active" and above the on for viewing.
I use a varaible nActiveRARoom which is not a physical room it relates to Lutron led logic of rooms verses scenes so don't get confused. It's not based of which touch panel it coming from but which button on the rooms keypad verses the scenes keypad.
The "Lift" in the code was for a fixture lift to raise and lower the fixture on a cable. Ignore it!
Sure. Assign channel code to the active multi-state bargraph. In level event handler update a global variable with incoming from panel. In button release handler send value of the global variable.
Thank you, Vining, also. I will take a look at that code more closely tomorrow. Yes, I have found the limitations of Ra pretty quickly. I am doing this more for both the experience in programming as well as trying to take a relatively limited interface like Ra and see how much I can exploit it by using AMX to make it better than the sum of its parts.
Eric