Reading Lvar in Python?

Anybody experience with reading Lvars in Python using Simconnect and Mobiflights WASM module?

Triggering events is very easy, but I’m in the dark on how to read a Lvar or A: variable using the WASM module.

Tip: try a Github search in Google… you’ll find plenty of SimConnect hobby projects for MSFS in Python,

https://www.google.com/search?q=Python+MSFS+simconnect+site%3Agithub.com

(my ingame name is python… but I don’t do python so I cannot answer your question myself … )

That is not the issue, I know how to use simconnect events with Lvar. The issue to read Lvars :wink:

In fact you put two questions, I answered the first … and the question in the title :thinking:

Guess you really want your second question to be answered, that is how to access the variables via Wasm…

Just install Visual Studio 2019 and have a look at the SDK-examples I would say… maybe below little tutorial would give you a kick start with Wasm gauges ?

… anyway I’d really advise you to change your title AND the question text. This topic will attract Python savants, it is very unclear that you are actually looking for Wasm solutions… specific types of variables… maybe you could tell more about what you’re trying to do ?

No, the topic is exactly what I’m looking for. How to READ LVars in Python.

I have thousands of lines of Python code using the Mobiflight wasm module to trigger events using Lvars (so not read, but set). Not looking for guidance on that at all.

I’m now looking how to read am Lvar variable, such as cockpit light status in Python, using Python Simconnect and Mobiflight wasm module.

I just googled that Mobiflight thing… I now feel like a Microsoft support person trying to help out with a Linux installation :grin: connect an Arduino… I know nothing. Sofar I gave you some general info because I assumed you just want to query some SimConnect stuff with Python. Now I found out you’re actually asking for the FSX LVars that allowed an Arduino device to query internal variables of FSX (and MSFS2020) to support external controls… This device Wasm part was broken with the last MSFS world update… and now you want to that part to run with Python. Wasm sees more variables, also local variables, so you’re stuck… only advice I can give at this point is go find what you (still) can do with SimConnect and postpone the rest, if you can’t repair the Wasm yourself. Wait until the Wasm issue with MobiFlight is solved. Or wait for MobiFlight to provide you with a Wasm update that won’t crash the MSFS. It takes two to tango with these issues.

If you put something in Cockpit builders or Q&A developers category, that could help. Developers are involved there and may answer your questions, there could be a workaround, or specific Wasm parts could be replaced by other Wasm code ? Don’t forget to put “Mobiflight” in the title.

Also don’t forget to look at these, you’d find some friends I guess…

https://forums.flightsimulator.com/search?q=MobiFlight

I think I am really much more involved then you think :wink: There are a lot of things not correct in your post.

The WASM module has been fixed a long time ago already. I really appreciate your willingness to support, but I’m honestly looking for someone that has experience with my request and has an in depth knowledge of the subject.

Cheers!

1 Like

For anybode looking for this issue, this is the solution: GitHub - Koseng/MSFSPythonSimConnectMobiFlightExtension: Extends the python simconnect library for MSFS2020 with the capability to read A and L variables with help of the MobiFlight WASM module.

4 Likes