Enhanced API to access all aircraft state and trigger all cockpit functions

Hello everyone, my name is Sebastian, I am the creator and maintainer of the Open Source project “MobiFlight” and I want to promote the following request:

As a “home cockpit builder” and/or “cockpit tool creator” I have access to all aircraft state and I am able to trigger all available cockpit functions by using a stable, user-friendly and developer-friendly API.

Acceptance Criteria:

  • All interactions that can be triggered by mouse in the virtual cockpit (input events) can be triggered by sending a message via API to the sim
    ** SimConnect currently does not provide Events for all types of events that we see are being used in the Sim, e.g., B-Events, H-Events (possible only via workaround)
  • All external and internal aircraft state (aircraft variables) can be read by using the API.
    ** SimConnect currently does not provide read access to all types of variables, e.g., L-Vars, O-Vars, I-Vars
  • Aircraft variables are automatically exposed and accessible for any aircraft
    ** SimConnect does not provide for a complete query capability for available events and variables
  • Raising an event has the same effect as the equivalent interaction with a mouse, e.g., playing animation and sound
  • All interaction can be performed directly by a SimConnect Client Application
    ** At the moment we have to provide an extra WASM Module which introduces unnecessary complexity

During the last year, the home cockpit community and MobiFlight have been trying to find ways to provide access to internal variables, and expose events for interaction with the virtual cockpit.

We have been partially successfull: MobiFlight has provided the MobiFlight WASM Module which is also used by other projects that had the same challenge. The MobiFlight WASM Module allows for executing code via the SimConnect Gauge API and is enhancing the capabilities of the standard SimConnect interface.

However, it has been an ongoing struggle to find means for giving access to all values and events. There are still limitations (O-Variables, I-Variables, B-Events) and the current solution approach requires complex code instructions in RPN which on top seem to change quite frequently with new sim updates and aircraft versions. This is not stable, nor is it user-friendly nor developer-friendly. In fact, to manage this complexity we have created a specific community platform (https://hubhop.mobiflight.com) where we collect & maintain all this information and code snippets. The entire process is extremely time-consuming and tedious and error-prone.

As the developer of MobiFlight and speaking for many members of the home cockpit builder community, who we all have been struggling and chasing the SimConnect API, I wish for this improvement so that we eventually have a stable API to be able to interface our homecockpit hardware with MSFS2020 more easily and in a complete form.

Thanks for voting this up!

Sebastian

1 Like

Oh heck yes!!! Please please please Asobo do something to resolve this issue. There’ve been a few posts since SU5 about trying to resolve this using Bvars:

Fundamentally I don’t care how it gets solved I just want it :joy: It would enable an explosion in homebrew custom cockpit components.

18 Likes

Software like Spad.next and AxisAndOhs and MobiFlight etc are doing a lot of hacks using the WASM module to work around simconnect shortcomings. While these things do work, a proper API that lets software query for aircraft events and state variables would be much better.

We want to make seriously detailed and realistic simulated hardware, and we need a proper API for it, so we can focus on building instead of sharing snippets of RPN code that changes every two weeks as add-on planes evolve as well.

10 Likes

Yes Please implement a B-Event system to the API!! even just extend the Simconnect SDK to allow a B:Event to be sent just like a K:Event… Thanks…

16 Likes

Asobo, please allow access to all simulator events and variables from external devices. Asobo and MSFS 2020 have successfully revitalized the flight sim community and the home cockpit builders. Allow us to have full control of the virtual airplane from our hardware controls. SU5 and B-events was a good step for you to simplify the internal handling of the Model Behaviors, but we also need access to them for our external control panels.

Thanks.

18 Likes

This is absolutely a necessity. I never really understood why certain things were strictly limited to the simulated cockpit and unavailable anywhere else (except for hack-ish and fragile methods).

8 Likes

Voted!

(and quick question. - what would be required to pull something like the ATC dialogue and responses from the sim to a network connected device?)

4 Likes

Yes, please!

4 Likes

voted !!!

4 Likes

Amen! If we keep going like this our current alphabet won’t suffice for all the different variable types.

4 Likes

Very well written Sebastian, thanks for this initiative. Hopefully someone at Asobo will notice, and more importantly, listen…

3 Likes

I was thinking the same many times… UTF to the rescue!
Ϡ-Vars

1 Like

That is a valid question… and you are right, there are adjacent data points outside of the plane context that are relevant for access and/or interaction too. Those should be obviously covered by the API eventually too.

6 Likes

Its an up vote from me

4 Likes

With out this we the user that over supported Microsoft over the years and have build up our sim hardware will not be able to fully enjoy this great sim. Please give us the axess to the VAR’s we need.

5 Likes

And please also give us this access in JS, and the ability in JS to be able to register to receive specified events ( like we can currently for K Events )

5 Likes

Its an upvote from me too !!

4 Likes

Going for the mouse to “touch” a virtual cockpit control on the screen when I have hundreds of buttons available right in front of me is insane. The lack of complete support for aircraft control place home cockpit enthusiasts at a disadvantage by making ad-hoc and prone to error “hacks”, same too for developers. It’s all been said, well said Sebastian @MobiFlight . Vote added!

7 Likes

My vote’s all yours sir! You’ve done an outstanding job with the entire Mobiflight project and I know several friends who use it. What I will say, through observation and development, the variables within the game may be changing. There are a lot of improvements happening within the SDK and I have a creeping suspicion we will find out at some point be it through a video special, or a simple documentation rewrite/update.

4 Likes

That’s a beautiful panel there!

2 Likes