Jump to content

New StreamDeck Plugin


Recommended Posts

Hi I wanted to share a new StreamDeck plugin I've created for DCS

 

https://github.com/charlestytler/streamdeck-dcs-interface

 

 

 

DCS Interface is a plugin that allows you to create buttons and interfaces that update with DCS events. It is currently set up to interact with S-D-A's DCS-ExportScript as the backend communication with DCS. There are three settings for each Streamdeck button you create:

  • DCS Command - Specify which button/switch you want to activate in game (allows setting of any clickable object in a cockpit).
     
    Supports push-button, switch, and increment (dials, levers, etc.) input types.
     
     
  • Image Change Settings - Specify a function within the DCS simulation to monitor and change the display of the Streamdeck image conditionally.
     
    Examples: Lamps for Warnings/Modes, Switch states
     
     
  • Title Text Change Settings - Specify a function in the DCS simulation which will be monitored and its text is displayed as the Streamdeck button Title.
     
    Examples: UFC text displays, scratchpads, radio displays

  • Like 1
Link to post
Share on other sites
  • Replies 336
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi I wanted to share a new StreamDeck plugin I've created for DCS   https://github.com/charlestytler/streamdeck-dcs-interface       DCS Interface is a plugin that allows you to create buttons and

F16 PROFILE FOR STREAM DECK AND CTYTLER PLUG IN   MY F16 PROFILE:                                 DCS F-16C.zip

WOW!!!! Thank you for this!

 

 

I have 2 SD's, 1 mini and just opened the box on a new XL yesterday!

 

I have some work to do. Completing a new build system now and this is on the list.

 

Thanks again!

Intel i7 9700k, 64GB DDR4, Gigabyte Z390 Master, RTX 2080 Ti 11gb, 500GB Sabrent Rocket (System) 1TB XPG Gammix S11 Pro M.2 (DCS), Windows 10 64, Samsung 55" 4K UHD TV, Samsung Odyssey Plus

 

DCS OB 2.5.6, F-14B Tomcat, F-18C Hornet, F-16C Viper, A-10C Warthog, F-5 Tiger II, AV-8B Harrier, P-51D Mustang, FC3, Super Carrier

 

Thrustmaster Warthog Hotas, (3) Cougar MFD's, Logitech Pro Rudder Pedals, (2) Stream Decks, (1) Stream Deck XL, (1) Stream Deck Mini, Misc Button Boxes

Link to post
Share on other sites

Thanks for this brilliant plugin, I were looking for this powerful functionality. AAA+++ thank you

 

Sent from my CLT-L29 using Tapatalk

ASUS Maximus XI CODE Z390 | I9 9900K (5GHz) | Alphacool Eissturm Hurricane | G-Skill TridentZ 32GB 4000MHz | ASUS Strix 1080Ti OC | Creative AE-7 | Samsung 970 EVO PLUS 2TB |

Oculus Rift-S | Monitor ASUS ROG Swift PG43UQ | Track IR 5 | VPC MongoosT-50CM Base/CM2 Grip & VPC MongoosT-50CM Thottle | MFG Crosswinds | Stream Deck XL | Buddy-Fox UFC | Thustmaster MFDs | Windows 10

Link to post
Share on other sites
That's a really great plugin you made here ctytler. Quite powerful. Any technical reason why you didn't go the streamline way of DCS BIOS and use another export script?

 

Thanks. I did look at DCS-BIOS when trying things out, however it seemed geared towards Serial communication with external hardware, such as Arduino boards. The documented API as well seems focused on providing a library of function calls that, while well-documented and understandable, also appeared more suited for a piece of hardware with buttons that have clearly defined functionality. I'm saying "seemed" and "appeared" because that's as far as I got in consideration before looking at the other options. For good measure, I tried installing the DCS-BIOS hub just now, but got to the point where it wants to connect to a COM port to do anything, and I'm not interested in making a virtual COM bus to communicate with it. Some of this may be misunderstanding some of the capability, but that's my perspective as someone who hasn't used DCS-BIOS before. There is also a DCSFlightpanels/dcs-bios fork I came across that has Lua export scripts, but doesn't seem to do anything any more advanced than the other options.

 

The primary examples I had tried working with DCS externally were Ikarus and Helios which provide recreated gauges and virtual recreation of buttons and switches. These were the main examples of user interface I had in mind while creating the Streamdeck interface. The Helios software had a nice GUI, but the Export scripts were all a bit spread out and individually created. Ikarus used an already partitioned Github project, DCS-ExportScript, as it's DCS communication and it had a good collection of scripts for most aircraft defined, including interpretation of strings for module text displays. It also had a simple, but effective, API where it just publishes and receives everything in a {key:value} format over UDP ports. This seemed ideal to communicate with as another program running on the same machine. Both Ikarus and Helios use the same format for their message payloads actually, so I think I can add an option to be able to support both methods.

 

I've also tried to keep the module specifics or things that can get out of date external to the Streamdeck plugin, so at the core everything is set by ID values and the user can edit them if they wish. The way Streamdeck packages its plugins it's not easy to include a set of database files that can be modified (at least not in a way straight-forward for users to edit). I do have ID Lookup done within the program for modules, but I do this by reading directly from the installed module's clickabledata.lua file so it should hopefully be stable with any changed values in updates. For the indicators and lamps, I just rely on users looking them up in their preferred export lua scripts, as I couldn't find a reliable way to extract them from a DCS World installation. However I found, in my use at least, that for most of the buttons I was creating referencing the clickabledata table was sufficient, with occasionally having to reference the export lua.

Link to post
Share on other sites

Thanks for this detailed explanation!

 

I installed your plugin and the export script. Modified the port in config file to the Streamdeck plugin default one and added the line in my scripts/export.lua.

I started to add some momentary switches in my new SD profile. The interface of your plugin is awesome and I REALLY appreciate that you took some time to make video tutorials!! I watched them all.

 

Current issue I have is that the moment I add the ExportScript.lua line in my export.lua, Helios just stop working.

Is that a no go to have Helios running along with ExportScript?

 

Thanks.

Link to post
Share on other sites

I actually ran into the same issue in the past with Helios and Ikarus.

 

I just did some testing with them now and for some reason if DCS-ExportScript is included after the Helios include, the Helios doesn't work, but the other way around worked for me.

 

My Export.lua that works looks like:

-- load the DCS ExportScript for DAC and Ikarus

dofile(lfs.writedir()..[[scripts\DCS-ExportScript\ExportScript.lua]])

 

local lfs=require('lfs');

dofile(lfs.writedir()..'Scripts\\Helios\\HeliosExport.lua')

 

I was able to get pretty repeatable results switching the order back and forth. You just need to quit and start a mission after modifying the Export.lua, shouldn't need a full restart of DCS if you want to try it.

 

Does that work for you?

Link to post
Share on other sites

Hi Ctytler. I installed your plugin for StreamDeck and I watch all your tutorial.

What a amazing job you did, I really enjoy your plugin.

Thank you very much for your great effort :thumbup:

Now Elgado have to make us the possibility to have a three stage icon :music_whistling:

Best regards

Rem27

Intel® Core i7-7700K @4,20GHz - 32 Go RAM - GeForce GTX 1070 Ti - Windows Pro 64 bit - Stream Deck - HOTAS Warthog

Link to post
Share on other sites

Looks really good. Excellent work!!!!

 

Unfortunately, the two modules I play are not supported by the DCS- Exportscripts yet (F-14 and F-16). I am going to download and learn it but looks like I will be waiting awhile before I will actually be able to use it.

Link to post
Share on other sites

DCS Interface conflict with TacView in explore.lua

 

Let me first thank Cytler for the great job

Here I am just sharing the following issue and hope this can be helpful for the development and also to other users that might happen the same.

 

It is about the export.lua file.

 

DCS interface instruction seems to be in conflict with the TAcview one.

Streamdeck does not connect to DCS.

 

Once I remove the Tacview instruction row, everything works fine with streamdeck... but I cannot generate a valid ACMI file to use in tacview :(

No other conflict with any other application/instruction (DCS Bios, SRS Radio)

 

Here may export.lua file (with tacview instruction in the last row):

 

-- load the DCS ExportScript for DAC and Ikarus

dofile(lfs.writedir()..[[scripts/DCS-ExportScript/ExportScript.lua]])

 

--- DCS BIOS

BIOS = {}; BIOS.LuaScriptDir = [[C:\Program Files\DCS-BIOS\dcs-lua\]]; BIOS.PluginDir = [[C:\Users\paolo\AppData\Roaming/DCS-BIOS/Plugins\]]; if lfs.attributes(BIOS.LuaScriptDir..[[bIOS.lua]]) ~= nil then dofile(BIOS.LuaScriptDir..[[bIOS.lua]]) end --[[DCS-BIOS Automatic Setup]]

 

--- SRS SIMPLE RADIO

pcall(function() local dcsSr=require('lfs');dofile(dcsSr.writedir()..[[Mods\Tech\DCS-SRS\Scripts\DCS-SimpleRadioStandalone.lua]]); end,nil);

 

---TACVIEW

local

local Tacviewlfs=require('lfs');dofile(Tacviewlfs.writedir()..'Scripts/TacviewGameExport.lua')

 

 

Cytler can you help me?

Link to post
Share on other sites

Hi for questions on the Export tool and .lua scripts for modules within it, I unfortunately only know as much as the instructions provide as I am only a user of the project, and not a developer of it.

 

I also use Tacview and SRS so have an interest in resolving the conflicts, but would be starting from scratch in debugging there. I'll report anything I find (like the trivial re-ordering of includes I reported earlier in the thread), but don't plan to commit time to learning those code-bases in detail.

 

That being said, I am trying to expand compatibility of the Streamdeck plugin to support different sources of Export scripts, so it can communicate also with Helios export scripts if users prefer those.

 

Also, for those asking about adding F14, F16, and JF-17 lua scripts:

  • I also have put up a github repo the clickabledata extraction script I made for the modules that can be run on its own. So if it's helpful in creating the new module lua scripts you can generate a CSV file which can be opened in any spreadsheet software that contains all clickabledata (not including gauges, lamps)

 

One user on reddit reported success for simple creation of one for the JF-17 on reddit here:

Link to post
Share on other sites
Thanks. I did look at DCS-BIOS when trying things out, however it seemed geared towards Serial communication with external hardware, such as Arduino boards.

 

Sort of, but not really. There are two components, the lua script and the Arduino library. The lua script opens a multicast UDP server on 239.255.50.10, with port 5010 for receiving data from the server and port 7778 for sending it data. The message that it sends is in a binary format and is documented. Unfortunately, like all binary formats, you need to know what each bit/byte stands for, and you'll either decode the message or get back gibberish, but not much in between. DCS BIOS uses this binary format in order to keep the data size down so that it's faster to send to the Arduino via serial, so that's the "sort of" part, but the "not really" part is that it's just binary data, so if you can create a UDP client and parse the binary data, the consumer of the data can be anything, not just an Arduino.

 

I've written a library to parse the binary data and expose it as JSON:

 

https://github.com/danieltian/dcs-bios-api/

 

But it's a Node library and it looks like your project is in C++.

 

I tried installing the DCS-BIOS hub just now, but got to the point where it wants to connect to a COM port to do anything, and I'm not interested in making a virtual COM bus to communicate with it.

 

The COM port is only needed to communicate with an Arduino. For other apps, you can use a UDP client. The UDP client is set up in the lua script, so you don't need to do anything in the DCS BIOS UI (aside from downloading the correct plugins for the aircraft) to get it working.

 

There is also a DCSFlightpanels/dcs-bios fork I came across that has Lua export scripts, but doesn't seem to do anything any more advanced than the other options.

 

At one point, DCS BIOS development stopped and all work was done in the DCSFlightpanels branch. That's no longer the case, and the installer at https://github.com/dcs-bios/dcs-bios/releases should be used going forward.

Link to post
Share on other sites

I own a Stream Deck but never used DCS-Bios - ctytler, your plugin looks very promising. I am not at all familiar with DCS bios and thought I could try your plugin cause you did this tutorial videos how to set up.

But now I saw that my module is perhaps not supported (DCS-ExportScripts) I want to try with - The FW190 A-8 Anton. Is there a chance to get support for my module I own? I saw that you can export lua for modules, but it seems to be very complicated for me - I am totally noob. Is there an alternative solution for me?


Edited by KonniRichter
Link to post
Share on other sites

Hey Ctytler! just saw your posts here. I want to try it as soon as i arrive at home!

 

"Capt Zeen, I was also just testing it with your Helios export scripts yesterday, and with some minor modifications to how I initialize the UDP connections it should be simple to enable compatibility with those as well. (The export scripts would still have to add a second port to be used at the same time as Helios)."

 

If you need info about how i use the exports in Helios, let me know.

Thanks for your work.

Link to post
Share on other sites
Let me first thank Cytler for the great job

Here I am just sharing the following issue and hope this can be helpful for the development and also to other users that might happen the same.

 

It is about the export.lua file.

 

DCS interface instruction seems to be in conflict with the TAcview one.

Streamdeck does not connect to DCS.

 

Once I remove the Tacview instruction row, everything works fine with streamdeck... but I cannot generate a valid ACMI file to use in tacview :(

No other conflict with any other application/instruction (DCS Bios, SRS Radio)

 

Here may export.lua file (with tacview instruction in the last row):

 

-- load the DCS ExportScript for DAC and Ikarus

dofile(lfs.writedir()..[[scripts/DCS-ExportScript/ExportScript.lua]])

 

--- DCS BIOS

BIOS = {}; BIOS.LuaScriptDir = [[C:\Program Files\DCS-BIOS\dcs-lua\]]; BIOS.PluginDir = [[C:\Users\paolo\AppData\Roaming/DCS-BIOS/Plugins\]]; if lfs.attributes(BIOS.LuaScriptDir..[[bIOS.lua]]) ~= nil then dofile(BIOS.LuaScriptDir..[[bIOS.lua]]) end --[[DCS-BIOS Automatic Setup]]

 

--- SRS SIMPLE RADIO

pcall(function() local dcsSr=require('lfs');dofile(dcsSr.writedir()..[[Mods\Tech\DCS-SRS\Scripts\DCS-SimpleRadioStandalone.lua]]); end,nil);

 

---TACVIEW

local

local Tacviewlfs=require('lfs');dofile(Tacviewlfs.writedir()..'Scripts/TacviewGameExport.lua')

 

 

 

Hi,

I don't know if this will help but this is my Export.lua using TacView, DCSBios (Facepanels Version) SRS and VAICOM, I found that the order in which everything goes in the export.lua makes adifference, I am not sure why mine works in this order, but everything is working like this.

 

local dcsbioslfs = require('lfs'); dofile(dcsbioslfs.writedir()..[[scripts\DCS-BIOS\BIOS.lua]])

--BIOS = {}; BIOS.LuaScriptDir = [[C:\Program Files\DCS-BIOS\dcs-lua\]]; BIOS.PluginDir = [[D:\Users\Matt\AppData\Roaming/DCS-BIOS/Plugins\]]; if lfs.attributes(BIOS.LuaScriptDir..[[bIOS.lua]]) ~= nil then dofile(BIOS.LuaScriptDir..[[bIOS.lua]]) end --[[DCS-BIOS Automatic Setup]]

local tacviewlfs=require('lfs');dofile(tacviewlfs.writedir()..'Scripts/TacviewGameExport.lua')

local vaicomlfs = require('lfs'); dofile(vaicomlfs.writedir()..[[scripts\VAICOMPRO\VAICOMPRO.export.lua]])

-- load the DCS ExportScript for DAC and Ikarus
local dcsexportlfs = require('lfs'); dofile(dcsexportlfs.writedir()..[[scripts\DCS-ExportScript\ExportScript.lua]])

pcall(function() local dcsSr=require('lfs');dofile(dcsSr.writedir()..[[Mods\Tech\DCS-SRS\Scripts\DCS-SimpleRadioStandalone.lua]]); end,nil);

 

Also I did notice you have local twice before the tacview line in your post of your export.lua

Hope this is of some help

i9-9900KS CPU @ 5.1GHz, Win10 Pro 64bit, Gigabyte Z390 Master Mobo, Corsair Vengance 64GB 3000Mhz Ram, 1 x ADATA SX8200 Pro 1Tb Drive (OS), 1 x ADATA SX8200 Pro 512Gb Drive (DCS), 1 x RTX 2080Ti AORUS Waterforce 11Gb, 3 x 27" ACER Predator 2560x1440px, 27" LG 2560x1440px HP Reverb G2, TrackIR5, HOTAS Warthog Throttle and Stick, 3 x HOTAS Cougar MFCDs, Elgato Streamdeck & Streamdeck XL

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...