Raw Panel Device Core
The Blue Pill device core, core-skaarhoj-rawpanel, is used by an application like Reactor to forward parts of a connected panel to external Raw Panel clients while other parts are used by Reactor itself. This aligns with how Raw Panel is natively implemented on UniSketch controllers.
The idea can be understood by the drawing below:
The actual physical control panel connects to Reactor. The Raw Panel Device core is used to forward triggers from some hardware components to an external client. The rest of the panel is configured in reactor for any kind of use there.
To understand the alternative: panels can generally only be used with a single client, so either an external application or Reactor would have to be connected:
Configuration
Inside of Reactor there is an example configuration for the Raw Panel device core and a Rack Fusion Live. So, here is the basic project set up with the Raw Panel configuration selected for the Rack Fusion Live:
The configuration for the Raw Panel device core looks like this:
Most of this is default values, but one thing is super important: Set the Use Embedded Topology to RACKFUSIONLIVE (in this case). This is how the panel will report itself to connecting clients and it is highly likely that you want this topology to match the actual panel being used.
Now, with an application like Raw Panel Explorer you can scan the network for Raw Panels and connect to them for testing. When the application is started you will see panels on the network:
Of interest is the fifth line where a Rack Fusion Live with serial ab6a4190-1 is found - that is our forwarded panel! The real panel that Reactor is connected to would be one of the other two panels (serial 435775 or 999923). If you connect to the forwarded panel it will look just like this:
To the client it will look exactly like any Rack Fusion Live although its served via Reactor. However, the client won't know which hardware components is forwarded and which are not. It has to assume that the full panel is available.
Configuration in Reactor
We should take a closer look at how the chosen configuration actually looks:
In Reactor it's actually quite simple: For every hardware component on the panel (in the case of the picture above: component 1 = _p1.1) a master behavior from the skaarhoj-rawpanel collection is added to each component. Here it's the "skaarhoj-rawpanel:Button" behavior with the constant "HWCid" set to 1. For encoders there would be a similar action:
To achieve a mixed control scenario it's just a matter of combining this approach with other device cores, layers etc. in the usual way Reactor works.
Underlying JSON code
Here is a quick glimpse at the JSON code for the layer shown above:
Device Core parameters
The device core parameters fall into two categories: Triggers and Feedback.
Triggers
Here are the triggers:
It's probably not a surprise that there are four triggers: they correspond to the classic four trigger types that Raw Panel operates with:
- Binary triggers: Buttons and GPIO inputs
- Pulsed triggers: Encoders that send positive or negative values when turned
- Absolute triggers: Faders, T-bars and other analog components that stays in position
- Intensity triggers: Joysticks, shuttle wheels etc. that are analog but have a spring-loaded fall back to a center position.
Feedback
The feedback is also aligned with the Raw Panel protocol and more diverse:
- LED color is an HTML color code or a color index tag known from Raw Panel. This can be transferred directly to the ColorCode field in Reactor.
- Graphics is images if the client sends graphics over
- Mode is the On, Off and Dimmed states of components with LED feedback
- Title, Textline 1/2 and Solid Header are the four most basic elements that goes into rendering text on SKAARHOJ controllers.
- Finally, Raw State is a JSON string that contains the full feedback for all of the above, including finer details that has been left out.
The Raw State is available and meant to be used to transparently forward the state. This is most likely what you want to use while the others are more easy to mix and match and process further in Reactor if needed.
A deeper study into the configuration found in skaarhoj-rawpanel master behaviors will reveal more details and best practices on all of this.
Mismatched Topologies
In case you choose a different Embedded Topology than the one that matches you panel - or if you try to send HWCid values that doesn't exist on a controller you will generally succeed. Reactor won't keep you from sending a button press for something the client thinks is a T-bar or non-existing. Unless you activate the setting Constrain to Topology setting in the device core configuration:
Adhoc panels
Alternative to using a known SKAARHOJ topology you can also build an adhoc topology from ground up. If you keep the Use Embedded Topology field unset and enable Training mode, then a topology will be dynamically build up as you send triggers to the panel:
Assuming we just set this up as Device 2 (make sure to pick another port, such as 9924) it would appear in Raw Panel Explorers network scan like this:
When you connect you will see this:
As you start pressing triggers that Reactor forwards to the panel, the Training mode will automatically build up an abstract topology like this:
In this case, three buttons were pressed (HWCids 1,2,3) , then a fader was moved (it had HWCid 25) and finally an encoder was turned left and right (HWCid 22). As long as the panel is in training mode it will add components to the panel like this.
Building an abstract panel like this can be useful in cases where the raw panel client rather wants to relate to "3 buttons, a fader and an encoder" type of panel and really doesn't care if in the other end it's mapped onto a Rack Fusion Live, PTZ Extreme or Air Fly Pro. That mapping could be done in any way inside Reactor regardless. When training is done, make sure to disable Training mode.
Building adhoc panels is an advanced option with some quirks related to it for now, so it's advised to discuss application with SKAARHOJ support team first. We really would like to know how you want to use this and help you succeed.
No Comments