News:

Precision Simulator update 10.173 (24 February 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

Need newbie tip - programming external devices

Started by Aleks, Fri, 14 Oct 2022 10:44

Aleks

I am complete newbie with programming external devices.

Any tip for where to start for connecting and programming buttons on Streamdeck XL and Behringer X-touch mini?

I am posting links to products, so you understand what I am talking about.
Elgato Streamdeck - https://www.elgato.com/en/stream-deck-xl
https://www.behringer.com/product.html?modelCode=P0B3M

I use both extensively with MSFS addons, through AxisAndOhs, but have no clue where to even start when it comes to Aerowinx PSX :)

Thank you in advance.

Jeroen Hoppenbrouwers

Briefly, there are two completely separate options to control PSX "from outside".

1. Use USB controls including keyboard key presses. This depends on PSX having an existing option for the function you want to control. See the PSX USB pages in the Instructor interface. If a function you need is not there, you have no other choice, you have to go to...

2. Use a network command. PSX is pretty much the only simulator out there that has practically everything accessible in a documented, supported way via the (Ethernet) network. This feature is mainly there to be able to effortlessly link and synchronize multiple instances of the PSX program, which is quite unique, but as a side effect it also allows other programs ("add-ons") to become part of the simulator.

To use a network command, you need basic programming skills, and there are several examples available in several programming languages to get you started. I don't know whether the Streamdeck and the X-touch have any other interface except for the keystrokes they emit.


Hoppie

Will

#2
As Jeroen says, it's very easy (trivial even) to get a Streamdeck to send key presses to PSX, and for those keypresses to take the actions described in the PSX manual. You can easily use a Streamdeck button to send "G" to PSX to cycle the landing gear, for example.

It's more complicated to get the Streamdeck to do non-keyboard things -- this is where programming knowledge is needed. You could get the Streamdeck to send commands over the network to PSX, or to send a series of commands, or to even run code. Since the Streamdeck is just an input device, there are really no limits on what you can get that input to do for you. However, there is no pre-written interface for this, so you'd need to write it yourself.
Will /Chicago /USA

Will

I'll also add that I have a Streamdeck, and I just use it to send keypresses, mostly for the parking brake and some MCP buttons (like the EICAS buttons, for example). I find it pretty handy, even though I'm just using it as a slightly more configurable keyboard. I like how you can customize the names of the buttons on the Streamdeck... that's something I can't do with an ordinary keyboard.
Will /Chicago /USA

Aleks

Thank you all.
You are right, it is simple to send keypresses, and it might be enough instead of me going complicated route where I wanted Streamdeck to check also current status in PSX. For example, if F/D position so it would show correct "icon" (switch screenshot) on Streamdeck.

What is perhaps more important is now to find if there are any "MIDI to key" software that communicates with Behringer. Would be great to put it in use for MCP.

brian747

#5
Hi Aleks,

As we know, the joy of the Stream Deck is its flexibility: you can use it however you like, for simple keypresses or for much more. Everyone (obviously) has a different setup — for example, since I have a VRI hardware unit (interfaced to PSX via Bernd's wonderful PSXonMCP2 interface) this controls my EFIS, MCP, and COM functions, and hence I don't need any additional rotary encoders such as Behringer provides. So I use my Stream Deck mostly for views, together with a few miscellaneous PSX functions that I find occasionally useful.



I might also add that, in order to to facilitate videography, I run everything — PSX, MSFS, PSXonMCP2, WidePSX, recording software, you-name-it — on the same machine. Thanks to Hardy's brilliant work, the requirements for PSX are amazingly modest, especially when compared to MSFS!   


I therefore interface my Stream Deck with both PSX and MSFS, using an AutoHotKey script to do so. This gives me a "one push" view system that controls both MSFS views and PSX layouts, also handling the necessary changes of focus between PSX and MSFS to give me either full-screen PSX layouts, different full-screen MSFS cockpit or showcase views, or else various PSX cockpit layouts superimposed over MSFS.

Using Stream Deck with AutoHotKey is a powerful technique that can make your Stream Deck do some amazing things....         And AutoHotKey scripting is both well-documented and easy to learn.    https://www.autohotkey.com/


Leaving PSX aside just for for a moment to go over to the dark side, other people take a different route with their Stream Decks, using Axis and Ohs (https://axisandohs.weebly.com) to interface directly with their MSFS aircraft at a low FSUIPC-ish level. (Axis and Ohs has a free plugin for the Elgato Stream Deck...). But I am mentioning Axis and Ohs mainly because I wondered whether it might perhaps provide you with (at least an initial) solution for your Behringer? Have a look here: https://flightsim.to/file/38162/x-touch-mini-gauge-for-use-with-aao-axis-and-ohs :

Quote"This is a framework for programming the Behringer X-Touch Mini as MSFS input device using Axis and Ohs. It supports programming buttons, rotaries and LEDs and also offers mirroring of the X-Touch Mini Device onto the screen (very helpful for VR flyers)..."

Maybe it could at least give you a starting point?   


Cheers,

Brian

P.S. You began this thread by saying "I am complete newbie with programming external devices." If that is still true then you might (you just might — the document is nearly ten years old, now  <sigh>  ) find something useful on pages 19 - 26 of my 'Getting started with PSX - part 1', which outlines some of the gotchas that people experience when attaching control hardware to Windoze. You can download it on the PSX 'Miscellaneous' download page, or directly from here — https://aerowinx.com/downloads/Getting%20started%20with%20PSX%20-%20part%201.zip).

B.
(Author of "The Big Tutorial" for PS1, and "Getting started with PSX" Parts 1, 2, and 3).

Aleks


petdocvmd

Quote from: brian747 on Fri, 21 Oct 2022 11:20I therefore interface my Stream Deck with both PSX and MSFS, using an AutoHotKey script to do so. This gives me a "one push" view system that controls both MSFS views and PSX layouts, also handling the necessary changes of focus between PSX and MSFS to give me either full-screen PSX layouts, different full-screen MSFS cockpit or showcase views, or else various PSX cockpit layouts superimposed over MSFS.



Brian, do you have PSX and MSFS on the same PC, or can StreamDeck function both locally and across the network at the same time?  I am thinking about getting one to manage the crazy camera complexities of MSFS 2020, while also using a subset of buttons for EFIS/MCP controls as I do not have a hardware MCP at this time (also considering just putting the EFIS/MCP on a touch screen).

Thanks!

Scott
Scott L. Fausel, VMD

brian747

#8
Hi, Scott!

I fear that I can't be very helpful in that (a) I set my Stream Deck up some time ago and haven't touched it since (and the memory has faded... <sigh> ), and (b) I have always used it in conjunction with MSFS and PSX on the same PC.

All I can say is that the device is amazingly flexible, especially when boosted by extras such as JoyToKey, AHK scripting, and Axis and Ohs. So much so, that there's a very large volume of stuff available that explains it all much better than I could, as well as being more specific for your own situation. For example, if you look on YouTube you will find a lot of material, and drilling down into some of the contributors will lead you to even more.

And as if that wasn't enough, searching on flightsim .to will yield even more treasure trove, such as these icons — and much more.

So my apologies for not being able to be too helpful    , but I hope that you might be able to find some more information in a few of the links I have provided — as a starting point, at least?      

Cheers,

Brian

(Author of "The Big Tutorial" for PS1, and "Getting started with PSX" Parts 1, 2, and 3).

petdocvmd

Brian, thanks so much for the multitude of leads!  I will investigate those rabbit holes, and post back whatever useful information I can distill.

Appreciate your help!

Scott
Scott L. Fausel, VMD