New SimVim universal Brightness functions have been added since SVC version 0.9.54.
As you are sitting in your "real" cockpit, have real panels, with real annunciators and displays, it's obvious that you need to have lights and brightness controls for your real panels, NOT for the virtual cockpit.
Actually, you don't even need to bother with on-screen lights controls in your plane model, since you don't see the virtual panels and the only view you use in the flight simulator is the "outside" view.
If you really need, for some reason, to change some of your virtual panels lighting along with real (hardware) panels, SimVim plugin menu has an option to assign the appropriate lighting channel used in your plane model.
Currently SimVimCockpit database includes 10 "BRT#_Ctrl" parameters (BRT0_Ctrl - BRT9_Ctrl ). Any of these parameters can be selected as input and assigned as a brightness control knob for rotary encoder or potentiometer in the configurator imagemap ( "Control and Systems" -- >: [LIGHTS] button):
The assigned Control knob can be linked with one specific 7-segment display, or with several displays. It can be done when you assign a new 7-segment display module in its pop-up option window, or you can do this later and edit the previously set options:
You have nothing more to do, all devices with program-controlled brigtness will change their brightness with the knob rotation. The list of these devices includes all 7-segment displays built with MAX7219 or TM1637 drivers and LED matrix with MAX7219.
Also, any of these "BRT#_Ctrl" parameters can be used to output PWM signal. Any of these 10 parameters can be selected in the configurator and assigned as a PWM output. This is useful when you need to control any other devices that have no program-controlled brightness, but have input for PWM signal.
These devices are:- Displays and groups of LEDs that are built with DM13A drivers.
Thus, using one knob you can simultaneously change brightness of different devices in your cockpit, both program-controlled and PWM-controlled.
In most cases you don't need to "synchronize" your hardware cockpit lights/brightness with simulator virtual panel lighting. If you are concerned about failures that need to be modeled for the hardware panel, you can be sure that SimVim “monitors” all lights, displays, backlights and annunciators power and turns them off in the event of a power failure on their buses.
In some cases, you don’t even need to control the lighting using SimVim + simulator. For example, when you implement “dome light”, panel or instruments backlight, it makes no sense to waste input interface pins. Just use a switch or potentiometers connected directly to your lamps, LED strip driver board, relay, etc. To simulate bus failure for them, you can use SimVim special "bus voltage" outputs to control the power source.