Page 1 of 1

Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Posted: Sun Feb 19, 2023 22:35
by wkwkwk
Has anyone created a Joystick Gremlin Plugin to control VKB LEDs?

There is a nice plugin for Virpil controllers that could be used as a template, but the key component is an executable file "VPC_LED_Control.exe" that you pass LED information to and then it makes the changes. Is there a similar program for VKB devices?

There is a python package (pyvkb) that holds the basic modules for controlling LEDs on VKB devices. However, in the examples I've seen, you can't import packages within a JG plugin. There might be a way to integrate the necessary pyvkb modules directly into a plugin, but I think there are a number of package dependences that make this difficult.

There is a project on github that utilizes pyvkb to control VKB LEDs while playing MSFS. I think this program runs parallel to MSFS and polls for aircraft states and modifies the VKB device accordingly. The games I play are old (Mig Alley, CFS) so I don't think that information is available, even if I wanted to have a separate process running in parallel, which I don't.

Like many (some, a few?) people, I have a Gladiator NXT and a TWCS throttle. I use VKBDevCfg-C.exe to configure the LEDs and JG to integrate my stick and throttle. I like to have a LED toggle on/off for certain states, but because the LEDs are setup separately from the button mapping, the process can easily get out of sync. In addition, I would love to have the VKB rgb LED tied to throttle functions as well.

Has anyone attempted a plugin like this?

The Virpil JG plugin can be found here: https://forum.virpil.com/index.php?/topic/5832-upgrade-to-vpc_ledspy-to-be-a-lot-faster/
The pyvkb package can be found here: https://github.com/ventorvar/pyvkb
The project code using pyvkb in MSFS can be found here: https://github.com/tiberiusteng/vkb-msfs-led

I found an article on JG plugins here: https://25.wf/posts/2020-11-03-joystick-gremlin.html
Any other sources for me to explore?

Re: Joystick Gremlin Plugin to control LEDs?

Posted: Sun Mar 12, 2023 5:23
by wkwkwk
I wrote a JG plugin to control the 3 LEDs on a Gladiator NXT. It could work for the older Gladiators as well as the Omni throttles but I cannot test that.

The plugin with dependencies is at https://github.com/WesCov/vkb_led_jg_plugin.

Please read the README for directions and known limitations. LED states are tied to buttons within a mode and not to states within a simulator so it will not handle complex interactions of buttons, but lights blink at the touch of a button... I will try to address some of those limitations in the future.

This was a 3 week project all so I could have a flashing green light on my Gladiator when I drop my landing gear from my TWCS!

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!!

Posted: Tue Apr 04, 2023 7:45
by wkwkwk
I have just finished a new version of this plugin. It creates a external file that maintains an "event stack" to keep a history of button pushes and their corresponding LED activations. This allows the LEDs to "remember" prior states as simulator/game functions are turned off. Please see the pdf file for a complete description and instructions.

https://github.com/WesCov/vkb_led_jg_plugin_db.git

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Posted: Wed Apr 05, 2023 8:25
by fallout9
Thank you, your efforts are appreciated!

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Posted: Thu Apr 06, 2023 7:53
by wkwkwk
My pleasure! Love my Gladiator and it has been a fun project.

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Posted: Thu Apr 06, 2023 12:35
by Victorus
VKBdev.cfg.exe gives many features for LEDs control. Not onboard only. I use RGB WS2812. Anexample for Mamba https://disk.yandex.com/i/WjftSpbFJqAkhw.
LED gauge for DIY throttle https://disk.yandex.com/i/LBSnc99coYuHyw
LED gauge for GNX https://disk.yandex.com/i/r8gNhSkqT8mbeQ
LED indication for GF axes trimming by DIY axes of throttle https://disk.yandex.com/i/LBSnc99coYuHyw
Boolean functions for events control. A lot of input events.
LED_events.jpg

Physical, logical buttons, axes state and so on. Macro using.
It works.

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Posted: Sat Apr 08, 2023 2:46
by wkwkwk
I updated the pdf to explain how use plugin for a Temporary Mode Switch action.

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Posted: Sat Apr 08, 2023 2:53
by wkwkwk
@Victorious Very impressive builds! I wrote the plugin to integrate my TWCS and VKB Gladiator which the VKB configuration software does not do (which makes sense that it does not and is not a complaint!)