Skip to content

truhlikfredy/dcs-bios-2-stream-deck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo

Stream Deck 15

KA-50 experiment video

Apologies for the bad demo, I was not rehearsing what I wanted to do (as I want to do the first release over the holidays so people can enjoy it asap). I couldn't see the Stream deck as the camera was in my way and kept pressing wrong buttons. And often I kept looking at my keyboard/Stream-deck instead to the cockpit where the buttons are so it's not as obvious that majority of the actions were done from the Stream deck. But the gist is that the KA-50 example files have 32 pages and 300+ buttons, so if people want a profile for their module, they have decent starting example to use.

It's not obvious from the video, but I enabled ADF tracking and the direction of the radio signal with music was showing on the HSI, it was comming from the KA-25 as it was passing by. I might have to redo do this video in more organize manner.

Description

The original Stream deck software runs only on Windows 10, this project is built on top of the NodeJS reverse engineered package which can communicate directly to the stream deck and therefore it works on Windows 7 just fine. This acts as glue logic between DCS-BIOS protocol and Stream Deck protocol. Because this is 2way communication it is possible to achieve better experience, it allows to see states of lamps, displays and allows more accurate button press feedback. It is possible to hardcode button presses and activate the given button straight away, but in practice, the button's lamp, or state might have different behavior under certain conditions (that subsystem is not powered or damaged) and thank's to the 2-way communication more true representation is shown on the Stream deck.

It is possible to supply to it custom images for all buttons and they will be used (when config.js 'forceImageRecreation' set to false, images named correctly, and placed to the /imgDynamic folder). However, this package is designed to work completely without images and able to generate it's own on the fly. Graphically they are not as amazing as dedicated photos of buttons, but they are still functional and allow a much faster process where 300+ buttons can be added in less time.

Bundled DCS module as examples:

  • KA-50 cockpit (over 300 buttons), mainly buttons and only a few lamps (for lamps I have a different project for that)

  • Possibility to add more modules

Known issues/limitations

  • Some functions which are not clickable might not be reachable through this package as these are not exposed to the LUA scripts in the DCS BIOS

  • The stream deck will be somewhat interactive even without DCS BIOS connection, of course it will not communicate to the DCS and some states/buttons will not display as expected (before or after they were pressed).

  • Tested only on 15 button Stream deck, with some modifications it should be usable with bigger/smaller Stream deck. It's a TODO for the future, just I do not have a device to test it on.

  • Button image caching is disabled. Simpler buttons/functions have only a few states and have dedicated image for each combination, however more dynamic content such as 7 segment displays would create a lot of unique images and therefore they are reusing just one single image. The content of these images can be updated frequently and caching might not recognize the changes and keep reusing stale content. But so far the performance impact is not bad as the images are not updated frequently and do not need rescaling or other features.

  • Some display readouts (PVI-800 for example) are updated fairly slowish (DCS-BIOS side) and take few update iterations to be a correct value (suspecting the Node.js package dcs-bios-api might not be parsing the multi-digit values properly). Another TODO which I want to address. In few places for the KA-50, I made workarounds, for example the R-800-L1 frequency 1 and 4 are calculated from the knob/wheel position instead of reading the display values.

Installation

Windows

Here are the versions I exactly tested, however, it's possible that other versions will work as well. The links after a while might become outdated, I will try to check them from time to time, but please report any dead links.

Note: Admin privileges are required for some of these steps.

Download and install these packages:

Run the DCS BIOS hub, install plugins for whatever modules are needed and enable the virtual cockpit connection and autostart feature (or learn how to start it manually).

Note: If you have DCS BIOS v0.10.0 already installed, you might want to check for plugin updates. Because by doing this project I found some issues in the KA-50 module, some of them got fixed by @WarLord211 very quickly after I reported them.

Then run these

  • npm install --global --production windows-build-tools
  • <go_for_a_tea_break>
  • npm install -g node-gyp

Windows extra steps (only if above is not enough)

In one case I had to follow extra steps, but I do not fully understand why and I can't replicate it. So I'm adding these for full completion, but in the recent installs/tests I did not need them (testing could improve as well). n Had to follow the Canvas package wiki https://github.com/Automattic/node-canvas/wiki/Installation:-Windows

Running

Make sure the installation steps above are finished

cd dcs-bios-2-stream-deck
npm install
npm test

The npm test is just doing some sanity test, DCS-BIOS/Stream-deck doesn't have to be present. However, for the next step the Stream deck has to be connected.

npm start

Run DCS with the DCS-BIOS enabled autostart option (or run it by hand). And enjoy.

About

Bridge from DCS BIOS to Stream Deck API (Windows 7 and Linux friendly)

Resources

License

Stars

Watchers

Forks

Packages

No packages published