Jump to content

New StreamDeck Plugin


ctytler

Recommended Posts

@ctytler I have an issue with your plugin using DCS: F-16C Viper.

 

The issue began with a strange freeze I reported here:

 

As you can see, if I don't have Stream Deck running your plugin, by removing the export.lua file in scripts, I can start the F-16 and operate the TPOD with no issues. I am only using your interface and the export script for the F-16 1.2.1.

I don't know what to do. I can run all other Airplanes using the stream deck, only the F-16 will freeze. Got any ideas?

[UPDATE] [UPDATE] [UPDATE] [UPDATE] [UPDATE] [UPDATE][UPDATE]

For anyone with this issue, the solution is this file edited by @Tess.

 


Edited by 701

[701] Vader
Esquadra 701 - DCS Portugal

Join our discord for more information

Link to comment
Share on other sites

Hi,

i cant use Stream Deck with the P47D30  Early Version.

I use the same Command in DCS Interface and 

with P47D 30 / 40 i have no Problem.
Is there a trick to use Stream Deck with the early Version?

Link to comment
Share on other sites

9 hours ago, Reverend said:

Hi,

i cant use Stream Deck with the P47D30  Early Version.

I use the same Command in DCS Interface and 

with P47D 30 / 40 i have no Problem.
Is there a trick to use Stream Deck with the early Version?

I haven't tried using my Streamdeck with the P-47 yet, but do you have an export script for it? Check in "Users/yourname/Saved Games/DCS/Scripts/DCS-ExportScript/ExportsModules"

 

There wasn't a script for it when I last looked, but someone might have done one by now.

Link to comment
Share on other sites

vor 5 Stunden schrieb frostycab:

I haven't tried using my Streamdeck with the P-47 yet, but do you have an export script for it? Check in "Users/yourname/Saved Games/DCS/Scripts/DCS-ExportScript/ExportsModules"

 

There wasn't a script for it when I last looked, but someone might have done one by now.

I Use that Script

User Files (digitalcombatsimulator.com)

 

This version is not available in the original script

 

Link to comment
Share on other sites

3 hours ago, Xander_ said:

Hey, does this still work with 2.7?

 

It should still work fine with DCS 2.7, the DCS-ExportScripts are at risk of getting out of date if modules change ID numbers of items (the AV8B has lots of things changing I believe). Unfortunately that project seems to have stopped maintaining its scripts.

 

On 4/16/2021 at 9:10 AM, Reverend said:

Hi,

i cant use Stream Deck with the P47D30  Early Version.

I use the same Command in DCS Interface and 

with P47D 30 / 40 i have no Problem.
Is there a trick to use Stream Deck with the early Version?

 

You'll likely need to copy your P-47 module export .lua file to have the following names for each aircraft:

P-47D-40

P-47D-30

P-47D-30bl1
Link to comment
Share on other sites

vor 6 Stunden schrieb ctytler:

 

 

 

You'll likely need to copy your P-47 module export .lua file to have the following names for each aircraft:


P-47D-40

P-47D-30

P-47D-30bl1

that's wonderful, I tried the way but P-47D-30bl1 would never have come. I've tried early and other things. It works out! Thanks 🙂

Link to comment
Share on other sites

Hello

I have for the past few days tried to set radio thumb wheels rotating to select manual radio channels in the Mi-8, both Jadro and R863. Frustratingly I can get them set up but the rotation effect is random no matter what value I put in. Having watched through many times your youtube vids I still can't work out what the problem is. To add to my frustration the knobs move correctly via in game mouse clicks, hope you can steer me in the right direction, cheers.

Link to comment
Share on other sites

I have many more details and questions to get to later but let me take this chance to add my praises for @ctytler 's plugin and @nosaMtrevoC@Chacal_IX's additional scripting guidance and Cptn Zeen for his icon work. I have tried to build my own diy version of this interface for DCS for years and have failed miserably not being a coding guy. I'm so thrilled with my new profiles for the AV8B and F-16 so far. The StreamDeck XL is the perfect size to mimic a UFC. Anyways, I can't thank you all enough for your labor of love!

 

It's nearly perfect but I'll throw in 3 quick asks Mr. Tyler (if your still tweaking your plugin):

 

1. Could we have the ID Lookup window (or Comm Window) stay open and active even when selecting another button? It would have saved me hundreds of clicks so far.

2. 3 position switches (Elgato problem I believe)

3. Cntl+z Undo (Elgato problem as well) I have accidentally deleted WAY too many buttons or functions.

 

I would appreciate others to keep sharing their profiles as I will share mine as well as other scripting questions. If this thread is not the best place to do that dialog, please point me to a better place for that.

 

See you in the skies,

 

Sc00ter


Edited by Sc00t3r
added shoutout to Nosa
  • Like 1
Link to comment
Share on other sites

2 hours ago, Sc00t3r said:

1. Could we have the ID Lookup window (or Comm Window) stay open and active even when selecting another button? It would have saved me hundreds of clicks so far.

2. 3 position switches (Elgato problem I believe)

3. Cntl+z Undo (Elgato problem as well) I have accidentally deleted WAY too many buttons or functions.

 

Hi, thanks Scooter, to first address your suggestions:

 

1. This isn't possible because of the way the StreamDeck GUI works: its built around lots of individual buttons doing different functions. So each time you click on a different button it closes any open context from the previous one. I'm able to save some global settings which is how it maintains some information from button to button (like I got it to remember which aircraft module was last used for ID Lookups). But as a plugin that's the only interface I can provide (I don't think Elgato thought people would be making full 32 page layouts of all one plugin either).

2. It's true that Elgato only has two images max it shows in the button settings. I haven't investigated fully but I believe it's possible to maintain more states with additional images, but it would take some creative way to make it customizable by the user in a straightforward way. (Maybe have to create an additional web page popout similar to the ID Lookup Table).

3. Ha, yeah sorry no tips there.

 

Current Status: Refactoring/Clean Up

In terms of updates to the plugin, I've been doing some refactoring of the code lately to make it more modular in creating new button types and also adding more unit tests to make sure all functionality is maintained when new features will be added. This has been small improvements over time alongside my actual work and other side projects, so I don't really have a prediction of how long this will go on.

 

Features/Fixes

Once that's done there's some features I'd like to add, such as 3-positions switches and having separate commands for Short/Long press I think would be doable. New features as well as any Bugs found with the Streamdeck should be reported as an Issue in the Github repo here: https://github.com/charlestytler/streamdeck-dcs-interface/issues

So far there haven't been any major bugs found in the plugin itself since its first month, but I will fix any if they do appear. Most problems/questions stem from the DCS-ExportScripts, which is more prone to getting outdated anyways... which leads me to the next topic.

 

Reliance on DCS-ExportScripts

This was a nice project with a simple interface to use for the Streamdeck plugin, however it is no longer being maintained unfortunately. This has led to other users having to generate their own .lua scripts, but these are also prone to getting outdated (as recently seen with a F-16 crash bug when the module changed). So I've been considering two options for the future of the plugin (one or both could be done):

  • Set up a new online repository of Module export .lua scripts in a way the community can easily modify on their own with minimal moderation. This would allow continued use of the DCS-ExportScript and more easily incorporate fixes in the individual module files as the modules change over time. This could also house user profiles potentially for the Streamdeck.
    I've been hesitant to take this on as it wasn't my intention to deal with the module export details (unfortunately DCS-ExportScripts went silent shortly after the Streamdeck plugin was released).
  • Update the Streamdeck plugin to communicate to Helios and/or DCS-BIOS. These are more actively maintained, and the Helios developer has been friendly to offer support, but will just take some more investigation on my end. Although one of the goals of the above mentioned refactoring would also be to support this.
  • Like 4
Link to comment
Share on other sites

Dude, you're the best. I'm so glad to hear your staying active with it. I haven't found any problems that have to do with your plugin. It's either Elgato or Module .lua's for sure.

 

I LOVE the idea of a repository to share. I mean, I REALLY LOVE that idea. Sure the quality of all the profiles would be subject to differences in quality, but I have used many others profiles to reverse engineer a number of issue like AV8B fuel flow or F16 radio freqs.

 

My profiles are loaded full of different icons from any and all downloads I've found here and at DCS BIOS threads. So my stuff is a bit hectic visually but is doing more and more functionally which I'm thrilled about. I don't know if everyone would be cool with sharing their icons freely but I would think they would given how niche this need is.

 

I don't think you should have to take on the whole ExportScripts work. In fact, their stuff works fine if us end users keep up to date lua scripts available in one place. One benefit is how lua allows comments so easily so my favorite examples have been those who use that to good effect and allow others to translate their work.

 

DCS BIOS + Helios are certainly another path to similar results but using the lua scripts testing portal was a dead end for me because you still need a 101 level of coding knowledge to test and see if or what is even available in those lua's like clickabledata and similar. In fact, I found it more confusing to figure out what was ED, Experot Scripts and what was code for their particular softwares.

 

One of the biggest hangups for me have been how to do "conversions" in the lua. Like taking a 5 drum fuel flow indicator and sus that out into a singular, 5-digit ID number. Again, with no coding experience but wanting to figure it out so badly, I've looked and tried and failed with enough test to make a little headway there but usually my scripts just fail once I get to that point.

 

The work that was posted in another thread by @nosaMtrevoCon his F-14 script to allow all the animated buttons was brilliant. I've had a look at that but since I don't own the F-14 module, it's hard to test and implement similar work on my aircraft. I just went back to look at it again and he's next level! Now we just need to start a beer fund rasier for him to convert his work to the other popular modules. 😉

 

Anyways, you've been a champ with all of this and I appreciate your YouTube instructional videos and maybe I need to start adding my own additions about what/where I've gotten stuck on the path to today.

 


Edited by Sc00t3r
  • Like 2
Link to comment
Share on other sites

On 4/25/2021 at 5:54 AM, Mordants said:

Hello

I have for the past few days tried to set radio thumb wheels rotating to select manual radio channels in the Mi-8, both Jadro and R863. Frustratingly I can get them set up but the rotation effect is random no matter what value I put in. Having watched through many times your youtube vids I still can't work out what the problem is. To add to my frustration the knobs move correctly via in game mouse clicks, hope you can steer me in the right direction, cheers.

 

I got some time to look at this. This seems to be an idiosyncrasy in how DCS handles radio knobs that shows up in all modules it seems, see my video for a similar problem here.

 

 

Try to use Momentary Buttons with Send commands "0.1" for increase and "-0.1" for decrease instead of rotary commands. That worked for me for the R-863.

 

Also, while I was looking at the Mi-8 script I saw it's not publishing relevant radio frequencies. To get these make the following changes:

 

-- Change the below from %1d to %.2f within the Mi-8MT.lua file:

[370] = "%.2f",        --PTR-LPE-LVR-CHANNEL (R-863, Radio channel selector)

Then you can see the current Preset channel selected (with the Red Valve knob) by a "Momentary Button/Display (Text)" button with the following settings:

 - Title Text Change on DCS ID: 370
 - Uncheck "Display string unaltered"
 - Map Value to Display Text:
0.00=1,0.05=2,0.10=3,0.15=4,0.20=5,0.25=6,0.30=7,0.35=8,0.40=9,0.45=10,0.50=11,0.55=12,0.60=13,0.65=14,0.70=15,0.75=16,0.80=17,0.85=18,0.90=19,0.95=20

 

 

-- Add the below to the Mi-8MT.lua file (around line 1060):

--Within the function:
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
  
  -- JADRO 1A
	local lJADRO_1A = GetDevice(37)
	if lJADRO_1A:is_on() then
		ExportScript.Tools.SendData("2000", ExportScript.Tools.RoundFreqeuncy(lJADRO_1A:get_frequency()/1000, "7.1"))
	else
		ExportScript.Tools.SendData("2000", "-")
	end
  
  -- R-863
    local lR_863 = GetDevice(38)
    ExportScript.Tools.SendData("2010", ExportScript.Tools.RoundFreqeuncy(lR_863:get_frequency()/1000000))

To get those frequencies on DCS ID's 2000 and 2010

Link to comment
Share on other sites

10 hours ago, ctytler said:

 

I got some time to look at this. This seems to be an idiosyncrasy in how DCS handles radio knobs that shows up in all modules it seems, see my video for a similar problem here.

 

 

Try to use Momentary Buttons with Send commands "0.1" for increase and "-0.1" for decrease instead of rotary commands. That worked for me for the R-863.

 

Also, while I was looking at the Mi-8 script I saw it's not publishing relevant radio frequencies. To get these make the following changes:

 

-- Change the below from %1d to %.2f within the Mi-8MT.lua file:


[370] = "%.2f",        --PTR-LPE-LVR-CHANNEL (R-863, Radio channel selector)

Then you can see the current Preset channel selected (with the Red Valve knob) by a "Momentary Button/Display (Text)" button with the following settings:


 - Title Text Change on DCS ID: 370
 - Uncheck "Display string unaltered"
 - Map Value to Display Text:
0.00=1,0.05=2,0.10=3,0.15=4,0.20=5,0.25=6,0.30=7,0.35=8,0.40=9,0.45=10,0.50=11,0.55=12,0.60=13,0.65=14,0.70=15,0.75=16,0.80=17,0.85=18,0.90=19,0.95=20

 

 

-- Add the below to the Mi-8MT.lua file (around line 1060):


--Within the function:
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
  
  -- JADRO 1A
	local lJADRO_1A = GetDevice(37)
	if lJADRO_1A:is_on() then
		ExportScript.Tools.SendData("2000", ExportScript.Tools.RoundFreqeuncy(lJADRO_1A:get_frequency()/1000, "7.1"))
	else
		ExportScript.Tools.SendData("2000", "-")
	end
  
  -- R-863
    local lR_863 = GetDevice(38)
    ExportScript.Tools.SendData("2010", ExportScript.Tools.RoundFreqeuncy(lR_863:get_frequency()/1000000))

To get those frequencies on DCS ID's 2000 and 2010

Thanks very much for your time helping me out on this. I really appreciate it. I did try and do some tinkering with something like [370] = "%.2f", having watched your youtube vids but wasn't confident and it didn't work anyway, (not surprisingly). I was an old and bold aircraft mechanic back in the day and very new to this scripting lark. Again thanks for your help.

[370] = "%.2f",
Link to comment
Share on other sites

Posted (edited)

I have been using this plugin for awhile and it has been great.

Today I went to  edit an existing button, and the Stream deck crashed. OK crap happens.
After trying the same edit again, it crashed again.

Long story short. Any time I even click on an existing DCS plugin button (on the Stream deck config interface), It will crash.

If I try to add a new DCS plugin button--crash
I have tried to create new profiles, and then add a DCS button, still crash

I can edit/add any button NOT associated with DCS plugin, Stream Deck hotkey, multi action and so on with no problem.

Now what has me scratching my head is, all the buttons that I configured, back whenever ,work just fine. For example displaying fuel quantity, radio freq and so on. The buttons that are configured to change something work fine. I just can't edit or even move them.

I have un-installed/installed the DCS plugin with no change.
I have tried to create new profiles and then add a DCS button, still crash

The Stream Deck log shows  --Loading com.ctytler.dcs.sdPlugin... so it seems to load ok.

Since I did do the un-install/install, I needed to set the path to the DCS World Install Directory, but I could not do that because I can't touch a DCS button.

But I was able to set the path by editing the ..\Plugins\com.ctytler.dcs.sdPlugin\propertyinspector\js\settings_functions.js and that seems to work.

 

Anyone have any other things I could check? I have run out of things to try. 

DCS Openbeta 2.7.0.5118

Stream Deck XL x2
Stream Deck Software version 4.9.4.13228
Stream Deck Firmware version 1.00.008
Stream Deck  DCS interface 1.0.3
 
Edit: this is a follow up on the problem I was having.
So the short version, Stream Deck on Primary monitor all is good. Stream Deck on secondary monitor, no friggin good.  I have been able to reproduce this about a 100 times.
Thanks to Ctytler for his help.
 
 

Edited by Olddog
Follow up
Link to comment
Share on other sites

Hi @Olddog, thanks for reporting, I've created an Issue ticket on Github with your description: https://github.com/charlestytler/streamdeck-dcs-interface/issues/31

 

I updated my Streamdeck Software and Firmware versions to match yours but was unable to reproduce the issue, so it doesn't look like a version change alone caused it.

 

If you have a github account, could you upload the full error log to that issue ticket to see if it contains any other clues on what happened? If you don't want to set up an account, you can just DM me further details here in the forums. If anyone else sees this issue please comment on that github issue and/or check status there.

Link to comment
Share on other sites

Thank you for continuing work and support ctytler! Regarding the future path, I would love to have a Helios/DCS-BIOS version. This would enable people to use your Streamdeck plugin and DCS-UFC together. 

 

Link to comment
Share on other sites

Posted (edited)

Update Below!

 

I was really happy to find this, and I watched all the videos, but I cannot get the streamdeck plugin to talk to DCS.   I thought it might be a firewall thing (kaspersky), but I turned that off and I still can't get it to connect.

 

I verified in in my profile folder Saved Games / DCS.openbeta / scripts    I checked the Export.lua,  I verified the DCS-ExportScript \  Config.lua and ExportScript.lua     but no matter which module (A-10C / F18 / F14 / AV8B)  I cannot get anything when I click the Refresh button on the DCS Comms check window (Just the "module not detected" i should say.   I'm doing cold start missions and making sure that I'm all the way into the mission (ie ready to start clicking things to start).

 

I used to have TAC view a while back but I think I uninstalled it.  I noticed that there is a line in the LUA file about it, should that be removed?

 

I'm using SRS radio as well, could that cause any issues?   I am not using ikarus, or anything else. 

 

I wish I knew what else to check,  it's been a little frustrating thinking that I've checked everything but I have to be missing something.

 

UPDATE:

I got it working.  I removed the TACview line in the Export.lua file by commenting it out with "--" in front,   I moved the dofile line for ExportScript.lua above the pcall line for SimpleRadio   That got me working


Edited by rottielover
  • Like 1
Link to comment
Share on other sites

Posted (edited)
On 7/25/2020 at 1:58 PM, Weegie said:

Anybody have any joy with the Viggen

 

I've been programming the Hornet and it's a breeze

 

I can get nothing to work with the Viggen :helpsmilie:

I know this is an old post of yours but I too am having all kinds of problems with the Viggen. It just doesn't seem to be setup the same way that other planes are. The rotary controls aren't really rotary. They only accept CW and CCW commands and the Master Mode freezes the streamdeck when I try to make it a rotary control. So far the only things I've gotten to work are the ATT and ALT Hold and the Hud position. Have you figured anything else out?


Edited by bones1014
Link to comment
Share on other sites

2 hours ago, bones1014 said:

I know this is an old post of yours but I too am having all kinds of problems with the Viggen. It just doesn't seem to be setup the same way that other planes are. The rotary controls aren't really rotary. They only accept CW and CCW commands and the Master Mode freezes the streamdeck when I try to make it a rotary control. So far the only things I've gotten to work are the ATT and ALT Hold and the Hud position. Have you figured anything else out?

 

Not really

 

I have got a profile of sorts for it now but I couldn't get any of the rotary switches to work so I programmed the StreamDeck with keypresses to rotate the Master Mode, FR22 Mode, Group Channels, Base Channels on the radios and Data Panel, for Clockwise and Anti Clockwise rotation.

 

I don't fly air combat or Air 2 Ground, I prefer trying to understand the systems and a some of the Nav and I'm not sure how much of my profile will work for you as I may have altered some Keybinds.

 

Anyway here is what I currently use and you can try it out or just copy and paste some of the commands, hope you might find something in there that's of some use, but it's pretty basic

AJS 37.zip

  • Like 1
Link to comment
Share on other sites

Not really
 
I have got a profile of sorts for it now but I couldn't get any of the rotary switches to work so I programmed the StreamDeck with keypresses to rotate the Master Mode, FR22 Mode, Group Channels, Base Channels on the radios and Data Panel, for Clockwise and Anti Clockwise rotation.
 
I don't fly air combat or Air 2 Ground, I prefer trying to understand the systems and a some of the Nav and I'm not sure how much of my profile will work for you as I may have altered some Keybinds.
 
Anyway here is what I currently use and you can try it out or just copy and paste some of the commands, hope you might find something in there that's of some use, but it's pretty basic
AJS 37.zip
Yea that's the only way I could figure out how to do it. It's a shame because that takes up a lot of space.

Sent from my ASUS_I01WDX using Tapatalk

Link to comment
Share on other sites

Apologies @bones1014 best I could do with my rubbish programming skills & I agree with both points that the Viggen Script file seems odd and doesn't respond like the ED modules for instance.

 

I think because it was an early Heatblur module they were still on a learning curve so it's not perfect. That said hats off to Heatblur they made a superb model of an unusual airframe and the Viggen is still one of my Go-To modules.

 

At least we have a Script file, unlike the MiG-19 which doesn't and the input list also has a comprehensive set of commands (unlike some others 3rd parties I can think of).

 

It drove me nuts for a long time trying to get it to work and in desperation I just used Keyboard commands, which work well enough but take up 2 buttons as you said

Link to comment
Share on other sites

Apologies @bones1014 best I could do with my rubbish programming skills & I agree with both points that the Viggen Script file seems odd and doesn't respond like the ED modules for instance.
 
I think because it was an early Heatblur module they were still on a learning curve so it's not perfect. That said hats off to Heatblur they made a superb model of an unusual airframe and the Viggen is still one of my Go-To modules.
 
At least we have a Script file, unlike the MiG-19 which doesn't and the input list also has a comprehensive set of commands (unlike some others 3rd parties I can think of).
 
It drove me nuts for a long time trying to get it to work and in desperation I just used Keyboard commands, which work well enough but take up 2 buttons as you said
I've made some progress. I have weapons figured out. Just the master mode and data panel selector to go. Hopefully I'll eventually figure it out.

Sent from my ASUS_I01WDX using Tapatalk

  • Like 1
Link to comment
Share on other sites

10 hours ago, bones1014 said:

I've made some progress. I have weapons figured out. Just the master mode and data panel selector to go. Hopefully I'll eventually figure it out.

Sent from my ASUS_I01WDX using Tapatalk
 

If you find a solution, I'd appreciate if you'd let me know how you managed it

Link to comment
Share on other sites

  • Recently Browsing   0 members

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