Jump to content

Streamdeck Plugin with DCS BIOS beta


Recommended Posts

I have created an early beta build of the Streamdeck Plugin with DCS BIOS support.

You can download and install it from here: https://github.com/enertial/streamdeck-dcs-interface/blob/master/Release/com.ctytler.dcs.streamDeckPlugin

First time setup: After downloading and installing the plugin,

  • Create a DCS-BIOS Button
  • Click "Configure" button
  • Click on "Setup" in top right of the "Configure" window and specify path to DCS BIOS installation and click Update. If successful, a table of Control References should populate as seen below.
  • If you don't have DCS BIOS installed there is a link to follow in the Setup window

New Feature:

This has one new button option: "DCS-BIOS Button" and uses a new User Interface for that button only. There is some limited functionality right now and be warned that newer versions of the DCS-BIOS button may need you to re-create settings until the beta testing period is over.

DCS_BIOS_BETA_SD.PNG

I have kept compatibility with DCS-ExportScript and the plugin can run with both backends at the same time if desired.

Please share any comments, suggestions, or bug reports in this thread or submit an Issue on Github. Thanks!

  • Like 1
  • Thanks 4
Link to comment
Share on other sites

@Toni Carrera Moving question from https://forums.eagle.ru/topic/230609-new-streamdeck-plugin/?do=findComment&comment=4891698 to this thread.

Quote

I have downloaded the new button etc, and it appears in the DCS Interface tab. When I drag and then click the configure..>.. setup then point it to the location of my install, as per the instructions, nothing comes up as per the guide.

In addition, the path to my saved games contains spaces etc, I have tried putting it in quotes around the path

"E:\..just for privacy.................\Personal-Systems\System-Profiles\TC-I7-ASUS\Saved Games\DCS\Scripts\DCS-BIOS"

I assume that you have to have DCS running, and in flight with a suitable aircraft, but still nothing comes up. Everything in my Saved Games is excluded in my Anti-Virus setup

Just nothing appears in terms of the listings as per how the manual/guide looks

The table is populated by reading in contents of the DCS-BIOS json files within the specified directory, so DCS does not need to be running to get it setup. "Saved Games" has a space in it and works, so I wouldn't see an issue with spaces specifically, but it will fail if quotes are added. Could you try the following:

  • Try without surrounding quotes if you haven't already, copy-paste your path into a windows explorer and check that it is a valid path (no misspellings)
  • Check if there are indeed ".json" files in that path, I would expect them at, for example, "...\DCS-BIOS\doc\json\A-10C.json"
  • You can also in Windows Explorer go to %APPDATA%\Elgato\StreamDeck\logs and the latest log file com.ctytler.dcs.0.log should show something like:
18:09:18.031 Successfully connected to Simulator Interface UDP port
18:21:52.267 Get list of json modules failed at: E:\..just for privacy....\Personal-Systems\System-Profiles\TC-I7-ASUS\Saved Games\DCS\Scripts\DCS-BIOS

 

Link to comment
Share on other sites

Hi Charles,

Good Point re the Saved Games having a space. I had already tried both with and without quotes

In order to fill in the line of the path to DCS, I had already copied and pasted the link in to the path on the setup part. I can confirm that the path is 100% valid, as you can see below;

image.png

The whole folder contains 67 files in total

As per your log file, here is the contents of that

image.png

Where do I go from here?

Toni Carrera (Ice Rhino)

 

ThrustMaster HOTAS Warthog Throttle & A10C Stick, ThrustMaster F/A-18C Stick, ThrustMaster TFRP Pedals, ThrustMaster Cougars x 2, fitted to CubeSim USB Screens, TrackIR 4 Active LED & Cap Reflector, Stream Deck XL

Intel® Core™ i7-5820K 12 Core Processor, 32GB RAM, 1 x 500GB SSD, 2 x 256GB SSD, 1 x 1TB SSD 4 x 4TB Western Digital Mechanical. 2 x ASUS GTX 1080's SLI, ASUS 29" Ultrawide flanked by 2 x 22" IPS Monitors

Link to comment
Share on other sites

I´ve got the same problem as Toni

Windows 10 | i7-8700K@5GHz | 2080 Ti | Intel Z370 Chipset | 32GB RAM@1866 MHz | SSD: Samsung 850 EVO 1TB| Thrustmaster Warthog HOTAS w. FSSB R3 Mod | Saitek Switch Panel + Radio Panel + Multi Panel + FIP + Flightpanels Software | MFG_Crosswind | TrackIR5 | TM Cougar MFD Pack | Obutto R3volution | 1 x LG38 | GAMETRIX KW-908 JETSEAT

Link to comment
Share on other sites

I have DCS Bios installed and working. I can see values change in the control reference in the browser. However I can't find the install location that contains the json files. Any tips on finding it? It's not in the saved games/scripts folder. I uninstalled and reinstalled DCS Bios and I don't have a DCS Bios folder in my scripts folder.


Edited by bones1014
Link to comment
Share on other sites

I don't know what I'm doing wrong. The new plugin is installed. DCS-BIOS is located in "C:\Users\xxx\Saved Games\DCS.openbeta\Scripts\DCS-BIOS".
The Export.lua was adjusted with "dofile(lfs.writedir().[[Scripts\DCS-BIOS\BIOS.lua]])".

If I drag the DCS-Bios button on the StreamDeck to a button I have to configure it. So I pressed Configure -> went into Setup and entered the path "C:\Users\xxx\Saved Games\DCS.openbeta\Scripts\DCS-BIOS".
When I press update nothing happens and no modules are found.

What am I doing wrong?

Translated with www.DeepL.com/Translator (free version)

Link to comment
Share on other sites

4 hours ago, FwSchultz said:

I don't know what I'm doing wrong. The new plugin is installed. DCS-BIOS is located in "C:\Users\xxx\Saved Games\DCS.openbeta\Scripts\DCS-BIOS".
The Export.lua was adjusted with "dofile(lfs.writedir().[[Scripts\DCS-BIOS\BIOS.lua]])".

If I drag the DCS-Bios button on the StreamDeck to a button I have to configure it. So I pressed Configure -> went into Setup and entered the path "C:\Users\xxx\Saved Games\DCS.openbeta\Scripts\DCS-BIOS".
When I press update nothing happens and no modules are found.

What am I doing wrong?

Translated with www.DeepL.com/Translator (free version)

I'm having the same issue. I don't know where the json files are stored. DCS Bios is working. I can see it working in the web interface.

Link to comment
Share on other sites

On 2/12/2022 at 2:10 PM, bones1014 said:

I'm having the same issue. I don't know where the json files are stored. DCS Bios is working. I can see it working in the web interface.

json files should be located in Saved Games/DCS.OpenBeta/Scripts/DCS-BIOS/doc/json/

If you do not have a DCS-BIOS folder there, then you should re-read the DCS-BIOS install instructions.

Link to comment
Share on other sites

1 hour ago, Topcat357 said:

json files should be located in Saved Games/DCS.OpenBeta/Scripts/DCS-BIOS/doc/json/

If you do not have a DCS-BIOS folder there, then you should re-read the DCS-BIOS install instructions.

image.png

 

Not sure what else there is to do man. 🤷‍♂️ It's pretty simple.

1 hour ago, Topcat357 said:

json files should be located in Saved Games/DCS.OpenBeta/Scripts/DCS-BIOS/doc/json/

If you do not have a DCS-BIOS folder there, then you should re-read the DCS-BIOS install instructions.

I have plugins installed per the instructions
image.png

Link to comment
Share on other sites

Ok - I'm in the same boat... I've successfully installed DCS-BIOS per instructions here - https://dcs-bios.readthedocs.io/en/latest/installation.html and have installed all of the module plugins.  My DCS-BIOS dashboard is showing connected and I can confirm if I look at a control reference, say the A-10C Electrical Power Panel and the battery switch, I can toggle the switch in DCS using the toggle button in DCS-BIOS dashboard. However, when I goto the directory ...\Saved Games\DCS.openbeta\Scripts there is no DCS-BIOS folder. Anyone figure this out yet?

Link to comment
Share on other sites

Ok more details as I continue to dig...I've found the plugins! (I think - C:\Users\Yourusername\AppData\Roaming\DCS-BIOS\Plugins) but in the Setup option for the button I've created in Stream Deck app it still doesnt see the modules? Tried several of the directories in that Roaming path, but nothing working so far...

 

 

It seems to be a difference in the install path of DCS-BIOS versions; the new version of DCS-BIOS v0.10.0 (https://github.com/dcs-bios/dcs-bios/releases/tag/v0.10.0) versus the old version (DCSFlightpanels link here in ctyler's link in the setup button - https://github.com/DCSFlightpanels/dcs-bios)

 

 

 


Edited by automag928
Link to comment
Share on other sites

Ok - now I'm stuck.  I've completely uninstalled DCS-BIOS v0.10.0. I've gone to the DCSFlightpanels version of dcs-bios and followed the install wiki including copy/pasting scripts into Script folder and modifying the Export.lua... I have all of the JSON files located in C:\Users\xxxx\Saved Games\DCS.openbeta\Scripts\DCS-BIOS\doc\json.  I uninstalled the DCS Interface from the stream deck, re-installed it. When I edit the DCS-BIOS Button, click on Setup, I've updated the install directory to C:\Users\xxxx\Saved Games\DCS.openbeta\Scripts\DCS-BIOS and am still getting "No Modules found"

I checked in the stream deck logs for the com.ctytler.dcs most recent log #2 and the only thing I see is:

13:44:49.848 Successfully connected to Simulator Interface UDP port

 

However, there is log #0 for stream deck and I see this:

11:33:40.678 Get Installed Modules Failure: DCS Install path [C:\Program Files\Eagle Dynamics\DCS World/mods/aircraft/] not found.

However, the time that log file was modified last, is way before me reinstalling the stream deck DCS Interface

That is most definitely not my install directory for my Open beta DCS install, but I don't see anywhere to edit that?

 

Link to comment
Share on other sites

vor 5 Stunden schrieb automag928:

11:33:40.678 Get Installed Modules Failure: DCS Install path [C:\Program Files\Eagle Dynamics\DCS World/mods/aircraft/] not found.

i also strongly suspect that it is exactly this problem and therefore does not work for us because we have not installed it in the default directory. in my case i have installed it on D:.

Link to comment
Share on other sites

I haven't been able to recreate the failure, but I've uploaded a newer build that has debug logging for all of the communications that query for and populate the DCS-BIOS json data. This should work for any install location, and just needs to find a directory that has the json files inside it somewhere, so either DCS-BIOS version should work.

(The DCS Install path is only relevant for DCS-ExportScript buttons, there's no need for the DCS-BIOS buttons to know where DCS itself is installed)

I would appreciate if one of you could install the new build (at the same link location) and share what you see in the log output. Here is a video of the steps I do when installing and the log it outputs on my machine:

 

Log file contents at C:\Users\ctytler\AppData\Roaming\Elgato\StreamDeck\logs\com.ctytler.dcs0.log

22:38:45.084 Successfully connected to Simulator Interface UDP port
22:38:45.084 Successfully connected to Simulator Interface UDP port
22:38:50.150 Send message: 
{"event":"getGlobalSettings","context":"004AB4C83BCC0737A25DB483075189CF"}
22:38:50.150 Send message: 
{"event":"getSettings","context":"004AB4C83BCC0737A25DB483075189CF"}
22:38:50.151 Received message (didReceiveGlobalSettings)
22:38:50.151 Received message (didReceiveSettings)
22:38:50.155 Send message: 
{"event":"setSettings","context":"004AB4C83BCC0737A25DB483075189CF","payload":{"send_identifier":"","send_address":"","press_value":"1","release_value":"0","disable_release_check":false,"string_monitor_identifier":"","dcs_id_string_monitor":"","string_monitor_address":0,"string_monitor_mask":0,"string_monitor_shift":0,"string_monitor_max_length":0,"string_monitor_vertical_spacing":"0","string_monitor_passthrough_check":true,"string_monitor_mapping":"","compare_monitor_identifier":"","dcs_id_compare_monitor":"","compare_monitor_address":0,"compare_monitor_mask":0,"compare_monitor_shift":0,"compare_monitor_max_length":0,"dcs_id_compare_condition":"GREATER_THAN","dcs_id_comparison_value":"0"}}
22:38:50.155 Send message to plugin: 
{"action":"com.ctytler.dcs.dcs-bios","event":"sendToPlugin","context":"004AB4C83BCC0737A25DB483075189CF","payload":{"event":"SettingsUpdate","settings":{"send_identifier":"","send_address":"","press_value":"1","release_value":"0","disable_release_check":false,"string_monitor_identifier":"","dcs_id_string_monitor":"","string_monitor_address":0,"string_monitor_mask":0,"string_monitor_shift":0,"string_monitor_max_length":0,"string_monitor_vertical_spacing":"0","string_monitor_passthrough_check":true,"string_monitor_mapping":"","compare_monitor_identifier":"","dcs_id_compare_monitor":"","compare_monitor_address":0,"compare_monitor_mask":0,"compare_monitor_shift":0,"compare_monitor_max_length":0,"dcs_id_compare_condition":"GREATER_THAN","dcs_id_comparison_value":"0"}}}
22:38:58.842 Send message: 
{"event":"setGlobalSettings","context":"004AB4C83BCC0737A25DB483075189CF","payload":{"autoOpenConfigureWindow":false,"ip_address":"","listener_port":"","send_port":"","last_search_query":"","last_selected_module":"","dcs_install_path":"","dcs_bios_install_path":"C:\\Users\\ctytler\\Saved Games\\DCS.openbeta\\Scripts\\DCS-BIOS"}}
22:38:58.842 Send message to plugin: 
{"action":"com.ctytler.dcs.dcs-bios","event":"sendToPlugin","context":"004AB4C83BCC0737A25DB483075189CF","payload":{"event":"requestModuleList","path":"C:\\Users\\ctytler\\Saved Games\\DCS.openbeta\\Scripts\\DCS-BIOS"}}
22:38:58.843 Successfully found json modules at: C:\Users\ctytler\Saved Games\DCS.openbeta\Scripts\DCS-BIOS
22:38:58.843 Received message (sendToPropertyInspector)
22:38:58.843     - ModuleList
22:38:58.846 Send message to plugin: 
{"action":"com.ctytler.dcs.dcs-bios","event":"sendToPlugin","context":"004AB4C83BCC0737A25DB483075189CF","payload":{"event":"requestControlReferenceJson","filename":"C:\\Users\\ctytler\\Saved Games\\DCS.openbeta\\Scripts\\DCS-BIOS\\doc\\json\\A-10C.json"}}
22:38:58.882 Successfully read in json file from: C:\Users\ctytler\Saved Games\DCS.openbeta\Scripts\DCS-BIOS\doc\json\A-10C.json
22:38:58.885 Received message (sendToPropertyInspector)
22:38:58.885     - JsonFile

 

Link to comment
Share on other sites

com.ctytler.dcs0.log

Attached is my file, plugin setup on the first install would not allow username to be edited. This instance it did but has now reverted to "Username" changed back to "C:\Users\Les\Saved Games\DCS.openbeta\Scripts\DCS-BIOS" It now shows "DCS-BIOS installation path needs to be specified in Setup to load json documentation ⇨" I also include a screen shot of the json files location.

DCS BIOS screenshot.png


Edited by Mordants
symbol correction

SYSTEM SPECS: Hardware Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 64Gb RAM, NVIDIA GeForce RTX 4090,

CONTROLS: VPC Rotor TCS Base, VPC Hawk-60 Collective Grip, VPC MongoosT-50CM3 Base, VPC Constellation ALPHA Prime [R], Thrustmaster Warthog – Throttle, Thrustmaster TPR - Pendular Rudder Pedals, Honeycomb Alpha Flight Control (For Anubis C-130 Hercules), Meta Quest Pro.

SOFTWARE: Microsoft Windows 11,

Link to comment
Share on other sites

Thanks @Mordants!

So I tried a lot of steps to recreate this issue and even did a clean Windows installation on my laptop, and finally found a way to reproduce the issue on my end. I have a Streamdeck setting set that outputs logging information, and when I disabled that, my plugin stops working and matches the log Mordants shared.

I don't know the problem yet, but I should be able to track it down on my end now that I can reproduce it. Will report back here when I find out more.

  • Like 1
Link to comment
Share on other sites

@ctytler - just adding more info for you in case it helps.  I downloaded the new stream deck plugin you created, uninstalled the old one, installed the new one, and restarted the app. I put the DCS-BIOS button on my streamdeck screen, clicked on "Configure" and see "No Modules found".  I click setup and it shows the install directory for DCS-BIOS is "C:\Users\username\Saved Games\DCS.openbeta\Scripts\DCS-BIOS".  (It actually keeps defaulting to "username" instead of my actual computer username). I've changed this to the correct directory several times, hit update and then save and close, but whenever I come back it goes back to the default "username" versus my actual computer name. My com.ctytler.dcs0 streamdeck log only shows:

08:26:16.890 Successfully connected to Simulator Interface UDP port

Also side note, my install directory for my DCS Open beta build is my "D:\DCS World OpenBeta", but scripts are located "C:\Users\autom\Saved Games\DCS.openbeta\Scripts\DCS-BIOS"

Hopefully that helps, but if you need more info - let me know!
 


Edited by automag928
Link to comment
Share on other sites

Thanks @automag928 that aligns with my expectations of the current bug I see.

The config window that pops up talks to the main Streamdeck application via a websocket. So when the window opens it connects to the websocket and needs to get all the stored information through this. So the sequence goes like this (you can follow along with the log print out above):

  • Send a request to Streamdeck app for Global settings (these are settings that apply to all buttons of the dcs-interface plugin, including dcs_bios_installation_path)
  • Send a request to Streamdeck app for Settings (these are settings unique to each button, generally the IDs to monitor and what to send on press)
    [HERE is where the bug is occuring and the Websocket closes that I need to figure out why]
  • Config window Receives Global settings response which it uses to fill in stored information (e.g. dcs bios path which replaces the default "username")
  • Config window Receives Settings response which it uses to fill in last stored Command, Title Monitor, State Monitor settings
  • After user inputs path, Send a request to Set Global Settings and store the newly provided DCS Bios path
  • When the dcs bios path updates, Send a request to plugin (this is a background .exe) of "Request Module List" at a DCS Bios path location
  • Config window Receives message with the ModuleList it uses to populate the dropdown selector
  • After getting a module list, Send a request to plugin of "RequestControlReferenceJson" with path of a selected module in ModuleList
  • Config window Receives message with contents of the json file it uses to populate the table data

So the websocket connection is closing early, and the window still works it's just not getting any information, and also not able to store any inputted information (since all info needs to be stored in the Streamdeck app itself and not the Config window).

Link to comment
Share on other sites

OK, I think I have resolved the issue. I unfortunately had to remove my "Auto-Open" checkbox -- which I quite liked -- until I can find a better way to implement that, but feel free to download and install the latest (reads Version 1.1.3 on a right-click of menu) from the same link and see if it works 🤞

  • Thanks 2
Link to comment
Share on other sites

13 hours ago, ctytler said:

OK, I think I have resolved the issue. I unfortunately had to remove my "Auto-Open" checkbox -- which I quite liked -- until I can find a better way to implement that, but feel free to download and install the latest (reads Version 1.1.3 on a right-click of menu) from the same link and see if it works 🤞

Hi, I have also managed to get the stream deck to show the json files now. Unfortunately the button I created to test does not operate the switch in the cockpit (Pilot Fan) The Button highlighted in yellow does show the different state (1 or 0) but only when selected in game either via a mouse click or via a DCS Interface switch input. 

On selecting save and close and re-opening the button the bug I identified earlier re-appears, i.e config defaults to "Username" etc with no json files. If I create and drag a new button the json files re-appear at the last category identified below.

DCS Bios pic.png

SYSTEM SPECS: Hardware Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 64Gb RAM, NVIDIA GeForce RTX 4090,

CONTROLS: VPC Rotor TCS Base, VPC Hawk-60 Collective Grip, VPC MongoosT-50CM3 Base, VPC Constellation ALPHA Prime [R], Thrustmaster Warthog – Throttle, Thrustmaster TPR - Pendular Rudder Pedals, Honeycomb Alpha Flight Control (For Anubis C-130 Hercules), Meta Quest Pro.

SOFTWARE: Microsoft Windows 11,

Link to comment
Share on other sites

Thanks for the update. I suspect I may have forgotten to handle the new global setting in the DCS-ExportScript buttons. Does the username persist if you go between DCS-BIOS buttons, but reset after opening an old DCS-ExportScript one? EDIT: I just tested this and doesn’t appear to be the case on my end. Would you be able to share the log details when this happens? Also the search term is designed to persist across buttons (so users can fill in details for many buttons of the same category easily)  

As for the command not working, would you be able to use the DCS-BIOS Control-Reference page (the web browser tool) to see if it performs as expected there?


Edited by ctytler
Link to comment
Share on other sites

1 hour ago, ctytler said:

Thanks for the update. I suspect I may have forgotten to handle the new global setting in the DCS-ExportScript buttons. Does the username persist if you go between DCS-BIOS buttons, but reset after opening an old DCS-ExportScript one? EDIT: I just tested this and doesn’t appear to be the case on my end. Would you be able to share the log details when this happens? Also the search term is designed to persist across buttons (so users can fill in details for many buttons of the same category easily)  

As for the command not working, would you be able to use the DCS-BIOS Control-Reference page (the web browser tool) to see if it performs as expected there?

 

Please find attached log file. Using the web browser tool and toggling the action TOGGLE it operates the fan. So it appears it's the bit between the Stream Deck and DCS that not working.

Fan Stopped.png

Fan Running.png

com.ctytler.dcs0.log

SYSTEM SPECS: Hardware Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 3792 Mhz, 64Gb RAM, NVIDIA GeForce RTX 4090,

CONTROLS: VPC Rotor TCS Base, VPC Hawk-60 Collective Grip, VPC MongoosT-50CM3 Base, VPC Constellation ALPHA Prime [R], Thrustmaster Warthog – Throttle, Thrustmaster TPR - Pendular Rudder Pedals, Honeycomb Alpha Flight Control (For Anubis C-130 Hercules), Meta Quest Pro.

SOFTWARE: Microsoft Windows 11,

Link to comment
Share on other sites

On 3/5/2022 at 2:33 PM, Mordants said:

Hi, I have also managed to get the stream deck to show the json files now. Unfortunately the button I created to test does not operate the switch in the cockpit (Pilot Fan) The Button highlighted in yellow does show the different state (1 or 0) but only when selected in game either via a mouse click or via a DCS Interface switch input. 

 

Same Issue here 😞

Link to comment
Share on other sites

@Mordants I was able to test the PLT_FAN button and it works for me. One thing to note though... with your settings right now it will set the fan to ON while pressed, then OFF when released (You should see the cockpit switch moving with button press if so).

Check the box (Disable) for the Release to change this from a momentary to a latched button press. [Right now I only have momentary/held command available, switch is not yet added].

Quote

On selecting save and close and re-opening the button the bug I identified earlier re-appears, i.e config defaults to "Username" etc with no json files. If I create and drag a new button the json files re-appear at the last category identified below.

^ I've been able to recreate this now as well, will look into a fix.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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