Jump to content

StreamDeck plugin for DCS


Recommended Posts

Hi all

 

I've made this plugin, to talk to DCS, and allows you to send DCS-BIOS commands.

 

I would suggest to use https://www.digitalcombatsimulator.com/en/files/3303670/ icons from pellelil to set up your controls.

 

Basically, it sends whatever control you set up, and allows you to send one value for keyDown and another on keyUp, OR the TOGGLE command, which will just send one TOGGLE (ignores the other value).

For most controls, values are 1-0, 0-1, 1-2, 2-1, etc.

 

For now, it doesn't work with incremental or rotary controls, as there is no communication from DCS. Will look into that, but as someone mentioned, Stream Deck's SDK is not that friendly.

Please, report any issue you may find. This is my first plugin for streamdeck. Only guarantee is that it works here.

 

 

Here you can find the plugin and source code:

 

https://github.com/toureiffel/streamdeck-dcs

 

 

 

screenshot.png

 

(Icons on the screenshot are not my work, but pellelil's)

 

 

 

Enjoy!

 

MadJack

i8700K / GTX 1080i - HOTAS Warthog / TPR

Link to comment
Share on other sites

Wow, I didn't know someone else was working on a Stream Deck plugin for DCS BIOS. I'm the person who mentioned that the Stream Deck SDK isn't that great. I'm also developing my own version here:

 

https://github.com/danieltian/dcs-bios-stream-deck-plugin

 

The plugin is still in its early stages and I'm still working on getting the app infrastructure set up, so it'll be a while before it'll be ready for an initial release. Here are some screenshots of what it currently looks like:

 

BrKc7Nsl.jpg

 

xv7dWc6l.jpg

 

Pk68JU1l.jpg

 

I'm using the popup window that Elgato lets you open, but it's not resizable. It was designed only for login authentication pages, but it's still better than the ~175px that they give you in the property inspector. My plugin will support bi-directional communication so that the Stream Deck can change the image displayed based on the state of the sim, as well as display an optional title overlaid on top of the image. But yeah, the API is a pain to work with and under-documented.


Edited by Ranma13
Link to comment
Share on other sites

Wow, I didn't know someone else was working on a Stream Deck plugin for DCS BIOS. I'm the person who mentioned that the Stream Deck SDK isn't that great.

 

yep! Sorry I didn't remember your name, but i read your post. Hope you manage to take it further down the road. If you need help, I mostly understand the SDK on the part I work with here, not all of it thou :)

 

I know you can manage icons and set up the whole communication bidirectional... but that's another level right now for me, although I have developed the receive data part from DCS bios for another project, C++ also.

 

 

Edit: There's a property you can set to handle different size PI windows... will try to find it for you.

i8700K / GTX 1080i - HOTAS Warthog / TPR

Link to comment
Share on other sites

  • 3 months later...
Wow, I didn't know someone else was working on a Stream Deck plugin for DCS BIOS. I'm the person who mentioned that the Stream Deck SDK isn't that great. I'm also developing my own version here:

 

https://github.com/danieltian/dcs-bios-stream-deck-plugin

 

The plugin is still in its early stages and I'm still working on getting the app infrastructure set up, so it'll be a while before it'll be ready for an initial release. Here are some screenshots of what it currently looks like:

 

-pictures removed for slow speed connections-

 

I'm using the popup window that Elgato lets you open, but it's not resizable. It was designed only for login authentication pages, but it's still better than the ~175px that they give you in the property inspector. My plugin will support bi-directional communication so that the Stream Deck can change the image displayed based on the state of the sim, as well as display an optional title overlaid on top of the image. But yeah, the API is a pain to work with and under-documented.

 

I gave this a shot, and even the early development works great. It's so cool to see the aircraft come to life on my stream deck. Do the buttons send back to DCS on 7778 UDP ? my button presses don't seem to be getting back into DCS.

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Sending button presses is not implemented yet. I'm still working on it in the spare time that I have, but I recently started a new job and I also have 2 other side projects, so progress has been glacial. Every time I come back to it, I have to re-familiarize myself with the code as well, which is a huge time sink. Hopefully things will wind down soon; the side projects are ending in about a month or so, which should free up some time.

Link to comment
Share on other sites

Sending button presses is not implemented yet. I'm still working on it in the spare time that I have, but I recently started a new job and I also have 2 other side projects, so progress has been glacial. Every time I come back to it, I have to re-familiarize myself with the code as well, which is a huge time sink. Hopefully things will wind down soon; the side projects are ending in about a month or so, which should free up some time.

 

Well thanks so much for everything you do for the community! > am a super novice programmer. So most of this goes beyond me lol.

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Sending button presses is not implemented yet. I'm still working on it in the spare time that I have, but I recently started a new job and I also have 2 other side projects, so progress has been glacial. Every time I come back to it, I have to re-familiarize myself with the code as well, which is a huge time sink. Hopefully things will wind down soon; the side projects are ending in about a month or so, which should free up some time.
Thanks for the update, I was looking at your software last week, got everything built out and was still having communication troubles with DCS, lol I'm glad you're still working on everything.

 

Sent from my ONEPLUS A6013 using Tapatalk

Link to comment
Share on other sites

  • 3 months later...

I also found streamdeck SDK a bit ...awkward, so I did 2-way communication with MATRIC ( Google play) instead.

 

I wrote a blog post about how I did it if anyone is interested in expanding it further (like using DCS BIOS instead of roll-your-own-lua). MATRIC API is rather simple - json over UDP socket - took me about one hour for this proof of concept, including writing lua script :)

 

[sIGPIC][/sIGPIC]

MATRIC developer

Check out MATRIC and forget about keyboard shortcuts

Link to comment
Share on other sites

  • 2 months later...

Thanks for the effort, I'm looking forward for further development. What is the Roadmap for both plug-ins?

 

Send from my space device outside the terrestrial environment

ASUS Maximus XI CODE Z390 | I9 9900K (5GHz)  | G-Skill TridentZ 32GB 4000MHz | RTX 3090Ti | Creative AE-9 | Samsung 970 EVO PLUS 2TB | VR Headset HP Reverb G2 rev2

Link to comment
Share on other sites

Work is still continuing for my plugin, though lately it's been slow due to some real-life stuff. I've also had to rewrite the plugin from scratch; the more I worked on the original version, the more I realized its limitations and I eventually hit some roadblocks that made it easier to rewrite than rework what I already had.

 

I can't really give a timeline for an initial release because lately I've been finding myself with only about an hour of free time every night, and I'm too exhausted to do any non-job-related programming at that time, but I'm hoping to at least release an initial version sometime this year.

Link to comment
Share on other sites

Thanks Ranma13 for the update,

Im actually struggling, how to setup your plugin. do you have a detailed instruction. I followed your Instruction based on latest build "dcs-bios-stream-deck-plugin-new-master" as below

 

Thanks in advance :)

 

 

DCS BIOS Plugin for Elgato Stream Deck

 

This project is a plugin that integrates [DCS BIOS](https://github.com/DCSFlightpanels/dcs-bios) with the Elgato Stream Deck [sDK](https://developer.elgato.com/documentation/stream-deck/sdk/overview/).

 

## Setup

 

A production version can be created by using the [Distribution Tool](https://developer.elgato.com/documentation/stream-deck/sdk/exporting-your-plugin/) provided by Elgato.

 

For development work, navigate to `%APPDATA%\Elgato\StreamDeck\Plugins`, copy this project's base folder into it, and rename it to `com.bogey-dope.dcsbios.sdPlugin`. In a terminal, run `npm start` or `yarn start` to start the webpack dev server, which will host the configurer at http://localhost:8080. The configurer can then be worked on within a browser.

 

To view on the Stream Deck, run the official Stream Deck software, find `DCS BIOS` in the list on the right, drag it to one of the buttons, then click on `Configure...`. A new window should open up that shows the configurer.

2020-01-29T10_12_42_860Z-debug.txt


Edited by flyelmo
log file

ASUS Maximus XI CODE Z390 | I9 9900K (5GHz)  | G-Skill TridentZ 32GB 4000MHz | RTX 3090Ti | Creative AE-9 | Samsung 970 EVO PLUS 2TB | VR Headset HP Reverb G2 rev2

Link to comment
Share on other sites

  • 1 month later...
Hi all

 

I've made this plugin, to talk to DCS, and allows you to send DCS-BIOS commands.

 

Basically, it sends whatever control you set up, and allows you to send one value for keyDown and another on keyUp, OR the TOGGLE command, which will just send one TOGGLE (ignores the other value).

For most controls, values are 1-0, 0-1, 1-2, 2-1, etc.

 

For now, it doesn't work with incremental or rotary controls, as there is no communication from DCS. Will look into that, but as someone mentioned, Stream Deck's SDK is not that friendly.

Please, report any issue you may find. This is my first plugin for streamdeck. Only guarantee is that it works here.

 

 

Here you can find the plugin and source code:

 

https://github.com/toureiffel/streamdeck-dcs

 

Enjoy!

 

MadJack

 

Hi MadJack thank you for your plugin DCS CONTROL , it is very simple and works fine to input commands to DCS via DCS BIOS.

 

Next step is a bi-direction plugin , stream deck users are increasing and it would be nice to have the possibility of having a bi-directional plugin.

 

however at the moment your plugin is the only one that works really well, even if it only sends the data and does not receive it from DCS ...

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

Since Ranma13 is already working on bidirectional input, I'm not planning to do much more about it. Currently it works for me as simple as it is.

 

Thanks for your comment!

i8700K / GTX 1080i - HOTAS Warthog / TPR

Link to comment
Share on other sites

Hey Mad Jack.

Wow, got your plugin installed in 3 seconds into streamdeck and 30 seconds later, I could see my first key sent to DCS! Took 5 minutes to get a fully fonctional Sa342 NADIR on a standard stramdeck. Incredibly easy and it just works out of the box. Amazing job. Thanks!

Are you thinking to implement the possibility for some sort of flip-flop capability per button? The current dcs control plugin is good for momentary switches in DCS but not for ON-OFF switches unless you are assigning 2 streamdeck keys, one for on and another one for off, it is not possible to do that with only one key. Thanks again.

Link to comment
Share on other sites

Hi,

 

The whole thing works because DCS-BIOS is quite awesome. Let me add again that bidirectional input is way more complex to achieve. Hope Ranma13 finds time to work on his project.

 

For toggle buttons, you can just use TOGGLE. You will need documentation on DCS-BIOS and your module commands, and check whether a given command supports Rotary (INC, DEC), TOGGLE or a single value.

 

Rotary controls will take two buttons, but all others just one.

i8700K / GTX 1080i - HOTAS Warthog / TPR

Link to comment
Share on other sites

  • 3 weeks later...
Hey Mad Jack.

Wow, got your plugin installed in 3 seconds into streamdeck.

Really... How?

Because i'm already trying all evening and up to now... nothing.:huh:

So i'm guessing i miss a step (or maybe more then one...)

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

Really... How?

Because i'm already trying all evening and up to now... nothing.:huh:

So i'm guessing i miss a step (or maybe more then one...)

 

Do you see the icon for DCS Control among the actions in stream deck application?

 

What have you configure so far? Can you describe any of the actions you have set up?

 

Br/

Mad Jack

i8700K / GTX 1080i - HOTAS Warthog / TPR

Link to comment
Share on other sites

No, i don't see the DCS Control.

The plugin sits in the Plugin directory but that's about it.

 

 

I have not done much configuration atm because i'm dealing with another thing:

None of my buttons that i setup in DCS work if there is a modifier involved.

Let's say if i put the A key under a button, that works just fine.

But if i put LShift-A it doesn't, DCS only sees the LShift, not the A.

If i run a keytester (like the event tester from the Target) and try it there, everything works as it should. If i use it in Elite Dangerous, it works also.

Just in DCS everything is cut-off after the first key.

Like LAlt-LShift-A only gives LAlt in DCS (works fine in the keytester).

 

This is a problem which "a few" other people have/had also. I found one for Assassin's Creed and one for IL-2 but no solution has ever been posted.

In my IL-2 setup it gives the same problem but there it doesn't see the modifiers. If i program a button with LAlt-LShift-A, only the A shows up in keybinding.

Update: X-plane works fine.

So: DCS and IL-2 don't work (keystrokes are cut-off , Elite Dangerous and X-plane work, no cut-off here).

Been testing the Super Macro plugin but that gives the same result.

 

So somewhere there is a problem with communication. The output of the StearmDeck is OK (keytester as proof) but the entry's in the games are for some games only partly seen. But then we're going off topic...LOL.


Edited by Lange_666

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

I got plugin installed and it works! I got not problem to set-up all TOGGLE thinks:

- Ka-50: WEAPONS_MASTER_ARM

 

In github relase page I found:

 

"Controls can have two values, for keyDown and KeyUp. Sent in this order, you can make push buttons work. For toggles, add TOGGLE as one of the two values, and the plugin will ignore the other."

 

Anybody can point me some exmaple of control with two valuse and how to set-up?

Take a look my mods :joystick: 

dcs_footer500.jpg

CPU: i7 7700 | GPU: GeForce GTX 1080 8GB DDR5 | Motherboard: ASUSTeK PRIME B250M-A | RAM: 2x16GB DDR4-2400 | Output: Kingston HyperX Cloud II | Edifier C2XD 2.1 | Controlls: Saitek X-56 Rhino | Saitek Flight Rudder Pedals | Saitek Multi/Radio/Switch Panels | Thrustmaster MFD Cougar | Elgato Stream Deck XL | OpenTrack with LaserClip | VoiceAttack with VAICOM Pro plugin

 

Link to comment
Share on other sites

I don't use DCS-Bios but what does it do (better) that the normal Streamdeck software doesn't? It doesn't have bi-directional communication so it's basically a key repeater right?

[sIGPIC][/sIGPIC]

 

Commodore 64 | MOS6510 | VIC-II | SID6581 | DD 1541 | KCS Power Cartridge | 64Kb | 32Kb external | Arcade Turbo

Link to comment
Share on other sites

It's a little bit more than that Looney. The plugin talks to DCS-BIOS which mean you can send commands to piece of equipment of your cockpit that are not even listed in the game's controls list.

For example, I have now a fully workable NADIR computer on the Gazelle on a Streamdeck standard and streamdeck XL despite the fact that none of the NADIR's keypad keys are addressable with shortcuts in game.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...