mpaperno / MSFSTouchPortalPlugin

A plugin which provides a two-way interface between Touch Portal clients and Flight Simulators which use SimConnect, such as MSFS 2020 and FS-X.
GNU General Public License v3.0
65 stars 2 forks source link
flight-instrument-panel flight-instruments microsoft-flight-simulator microsoft-flight-simulator-2020 microsoft-flight-simulator-x msfs2020 msfsx simconnect simulator-controls simulator-instruments touch-portal touch-portal-plugin touchportal touchportalplugin

MSFS/SimConnect Touch Portal Plugin

Made for Touch POrtal GitHub release (latest by date including pre-releases) Downloads Downloads of latest release License Discord

Overview

This plugin provided tools to build two-way interactive interfaces between Touch Portal macro launcher software and Flight Simulators which use SimConnect, such as Microsoft Flight Simulator 2020 (MSFS) and FS-X. The plugin makes available new Touch Portal Actions, Connectors, States, and Events for creating buttons and pages suitable for virtually any simulated aircraft, component, or system.

This project is a continuation of the original MSFSTouchPortalPlugin by Tim Lewis.


Features


Editions

There are two separate plugins available here, one for MSFS 2020 (and eventually 2024), and another for "legacy" sims like FSX, which should work with any sim which supports the older SimConnect SDK.


Installation

Note: As with all plugins, this requires the Touch Portal Pro (paid) version to function. Use the latest available Touch Portal version for best results.

  1. Get the latest release of this plugin(s) you want to install from the Releases page.
  2. The plugins are distributed and installed as a standard Touch Portal .tpp plugin files. If you know how to import a plugin, just do that and skip to step 4.
  3. Import the plugin:
    1. Start/open Touch Portal.
    2. Click the Settings "gear" icon at the top-right and select "Import plugin..." from the menu.
    3. Browse to where you downloaded this plugin's .tpp file and select it.
    4. When prompted by Touch Portal to trust the plugin startup script, select "Trust Always" or "Yes" (the source code is public!).
      • "Trust Always" will automatically start the plugin each time Touch Portal starts.
      • "Yes" will start the plugin this time and then prompt again each time Touch Portal starts.
      • If you select "No" then you can still start the plugin manually from Touch Portal's Settings -> Plug-ins dialog.
  4. By default the plugin will not attempt to connect to a flight simulator on startup. You have two options:
    1. Recommended: Create/import a Touch Portal button which triggers the "MSFS - Plugin - Connect & Update -> Toggle Simulator Connection" action. (Also a good place to show the current connection status.)
    2. Change the plugin's settings: Click the Touch Portal "gear" icon at top right of the main screen, then navigate to Settings -> Plugins -> "MSFS Touch Portal Plugin". Set the "Connect To Flight Sim on Startup" setting to a value of 1 (one) and save the settings. The plugin will keep attempting to connect to the simulator every 30 seconds.

Optional WASM Module (only for MSFS 2020 on PC)

  1. The optional WASimModule MSFS component is highly recommended as a companion to this plugin. It it not required to use most of the basic plugin features, but it will provide a more advanced feature set (such as access to local "L" variables and HubHop Input Events) and further optimizations.
    1. Download the WASimModule .zip file from the same published Release as the plugin.
    2. Extract the contents into your MSFS Community folder (so that the folder wasimcommander-module is directly inside the Community folder).
    3. If already running, MSFS would need to be restarted after adding the module.

Updates

The plugin can be updated to a new version by following the same installation procedure described above. It is not necessary to remove any previous version first. The only thing to be aware of is that any old plugin log files will be removed during the update process.

Installation Guides

Keep in mind that while guides can be helpful as an overview and to get started, they do get outdated and also may not cover all that is possible to do or configure.


Documentation

See the Wiki for guides, tips, and example pages and buttons to get started with

Auto-generated documentation on all actions, connectors, events, settings, and default included states can be found in DOCUMENTATION.md.


Pages and Examples

Check out the Pages, Buttons, & Graphics for examples to get started with.

The list of known pages has also moved to the Wiki: List of Published Touch Portal Pages for MSFS Plugin


Troubleshooting

The plugin logs errors and warnings to a plain-text file. 7 days worth of logs are kept by default (a new file is started for each day). The log files are located within the plugin's installation folder, which is in Touch Portal's configuration directory:
C:\Users\<User_Name>\AppData\Roaming\TouchPortal\plugins\MSFS-TouchPortal-Plugin\logs folder, where <User_Name> is your Windows user name.

If something isn't working as expected, check the log.

Another way to quickly see latest log entries is by using the provided TP States and displaying them in a button area.

You could also monitor the MSFS - System -> Simulator System Event for the Plugin Error and/or SimConnect Error events. For example you could have a button light up red when this event happens, so you can know to go check the log.

Here's a Windows PowerShell command to show the last 20 entries from the current day's log file:

Get-Content -Tail 20 $Env:APPDATA\TouchPortal\plugins\MSFS-TouchPortal-Plugin\logs\MSFSTouchPortalPlugin$(Get-Date -format 'yyyyMMdd').log

Support and Discussion

Please use the GitHub Issues pages for bug reports and concise feature requests. Use the Discussions pages for general conversation on any related topic like suggestions or support questions.

There is also a Discord support forum on my server, an announcements channel, and discussion rooms on my server channel #msfs-general and at Touch Portal's Discord server channel #msfs2020


Update Notifications

The latest version of this software is always published on the GitHub Releases page.

You have several options for getting automatically notified about new releases:


Related Plugin(s)

My TJoy Touch Portal Plugin is an interface between Touch Portal and several virtual joystick/game pad emulation drivers like vJoy, vXBox, and ViGEm Bus.

My Dynamic Script Engine Plugin is a great companion for anything from custom data formatting and math operations to a full-blown scripting using JavaScript.

TouchPortal-Dynamic-Icons can be used to create a wide variety of dynamic images and animations, from basic shapes and styled text to beautiful multi-layered gauges animated in real-time based on Simulator data.


References


Credits

Currently maintained by Maxim Paperno at https://github.com/mpaperno/MSFSTouchPortalPlugin ; see copyright and licensing details below.

Originally created by Tim Lewis at https://github.com/tlewis17/MSFSTouchPortalPlugin and published under the MIT License.

Uses components of the WASimCommander project under terms of the GNU Public License v3 (GPLv3).

Uses tools and data from MSFS Tools project under terms of the GNU Public License v3 (GPLv3).

Uses the Touch Portal C# and .NET API library, under terms of the MIT License.

Uses a modified version of SharpConfig library, under terms of the MIT License. Change log is included in this repo alongside the library files.

Uses the Microsoft SimConnect SDK under the terms of the MS Flight Simulator SDK EULA (11/2019) document.

Uses several publicly available Microsoft .NET component libraries under the MIT License.

Uses the Newtonsoft Json.NET library under terms of the MIT License.

Uses Serilog Logging Extensions components under terms of the Apache-2.0 License.

Uses the SQLite-net library from Krueger Systems, Inc. under terms of the MIT License.


Copyright, License, and Disclaimer

MSFSTouchPortalPlugin Project
Copyright (c) 2020 Tim Lewis;
Copyright Maxim Paperno, all rights reserved;
Copyright MSFSTouchPortalPlugin Project Contributors

This program and associated files may be used under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is included in this repository and is also available at http://www.gnu.org/licenses/.

This project may also use 3rd-party Open Source software under the terms of their respective licenses. The copyright notice above does not apply to any 3rd-party components used within.