
Custom Variables and Triggers
To take your dashboard to the next level, custom variables are the way to go. You can think of custom variables as the end-point: no matter what your Companion module is spitting out, you can use a custom variable to modify that output into what you want your dashboard to actually display.
For example, in Companion Dashboard there are text fields next to the color pickers. If there is something in those text fields, Dashboard is going to use that over whatever color is picked. You can put in any HEX color code, and that HEX color code can come from a Companion variable.
Let's say I have a box on my dashboard that is showing a currently selected cue from a playback software I have connected to Companion, in this case Figure 53's QLab. I want the background color of that box to be green if it's stopped, and red if it's playing.

When I look at the variables of my QLab connection, I can see that there's a variable called $(playback:r_stat). When nothing is playing that variable shows a · and when something is playing it shows a ⏵.


So, in the Variables section of Companion, I create a new custom variable called playback_color

Then in the Triggers section of Companion, I add a new trigger and call it Dashboard: Playback Color. I add the event of On variable change to that Running Cue Status variable I found earlier, so this trigger will run every time that variable changes. There are no conditions in the conditions section…

…because we're doing the conditions in the Logic: if statement action. Add the condition of Variable: Check value and pick our Running Cue Status variable. Then, add the Custom Variable: Set raw value action to the "Then" section. If it equals ⏵, then I want our custom variable to be a red color (#e30e0e in this case). If it doesn't, then I want our custom variable to be a green color (#4db516).

NOTE: Internal: Logic: If statement is only available in the latest versions of Companion.
If running an older version of Companion, simply create two triggers: one for each condition.
Be sure to turn the trigger on, and now I can paste $(custom:playback_color) into the "Box Background" color text field in Companion Dashboard and my box's background color will change based on when that playback changes!




I am not directly connected to Bitfocus or the Companion project. I am simply sharing a tool I made for myself that connects to the Companion API.
Data for Dashboard is pulled from Companion once per second, and in turn Companion is polling connected modules at a certain rate. Because of this, data displayed in Dashboard is delayed. The delay is usually one second at the most. The original source/device should be used for the most accurate timing.
Any comments, questions, suggestions, or bug reports can be sent to tom@tomhillmeyer.com.