{"id":41719778,"url":"https://github.com/evenar/node-simconnect","last_synced_at":"2026-04-25T15:01:57.812Z","repository":{"id":56063207,"uuid":"97929948","full_name":"EvenAR/node-simconnect","owner":"EvenAR","description":"A cross platform SimConnect client library for Node.JS","archived":false,"fork":false,"pushed_at":"2026-04-18T15:38:05.000Z","size":43179,"stargazers_count":116,"open_issues_count":5,"forks_count":35,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-04-18T16:35:28.188Z","etag":null,"topics":["flight-simulation","flightsim","fsx","gaming","microsoft-flight-simulator","msfs","msfs2020","prepar3d","sdk","simconnect","virtual-airline"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvenAR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"EvenAR","buy_me_a_coffee":"evenar"}},"created_at":"2017-07-21T09:20:36.000Z","updated_at":"2026-04-18T15:17:31.000Z","dependencies_parsed_at":"2024-04-19T20:27:10.199Z","dependency_job_id":"8ecdb0b0-841e-40fd-906e-f7067dc0c187","html_url":"https://github.com/EvenAR/node-simconnect","commit_stats":{"total_commits":220,"total_committers":10,"mean_commits":22.0,"dds":"0.12272727272727268","last_synced_commit":"60b60b1cf80785abc61d276f66704bad14e2fba2"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/EvenAR/node-simconnect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvenAR%2Fnode-simconnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvenAR%2Fnode-simconnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvenAR%2Fnode-simconnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvenAR%2Fnode-simconnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvenAR","download_url":"https://codeload.github.com/EvenAR/node-simconnect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvenAR%2Fnode-simconnect/sbom","scorecard":{"id":47288,"data":{"date":"2025-08-11","repo":{"name":"github.com/EvenAR/node-simconnect","commit":"e9d3e8ae327ff3f207f2ead2b9a99597b0832932"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 2/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/api-docs.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/api-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/api-docs.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/api-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/api-docs.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/api-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/api-docs.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/api-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/npm-build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/npm-build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-package.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/publish-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-package.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/publish-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-package.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/publish-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-package.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/publish-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/EvenAR/node-simconnect/release.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/api-docs.yml:38","Info:   0 out of  17 GitHub-owned GitHubAction dependencies pinned","Info:   4 out of   5 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Info: jobLevel 'contents' permission set to 'read': .github/workflows/publish-package.yml:22","Warn: jobLevel 'packages' permission set to 'write': .github/workflows/publish-package.yml:23","Info: topLevel 'contents' permission set to 'read': .github/workflows/api-docs.yml:14","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/npm-build.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-package.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 4 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T23:01:54.728Z","repository_id":56063207,"created_at":"2025-08-14T23:01:54.728Z","updated_at":"2025-08-14T23:01:54.728Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32265977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flight-simulation","flightsim","fsx","gaming","microsoft-flight-simulator","msfs","msfs2020","prepar3d","sdk","simconnect","virtual-airline"],"created_at":"2026-01-24T22:32:27.009Z","updated_at":"2026-04-25T15:01:57.797Z","avatar_url":"https://github.com/EvenAR.png","language":"TypeScript","funding_links":["https://github.com/sponsors/EvenAR","https://buymeacoffee.com/evenar"],"categories":[],"sub_categories":[],"readme":"# node-simconnect\n\n[![npm version](https://badge.fury.io/js/node-simconnect.svg)](https://badge.fury.io/js/node-simconnect)\n[![Strict TypeScript Checked](https://badgen.net/badge/TS/Strict 'Strict TypeScript Checked')](https://www.typescriptlang.org)\n\nA non-official SimConnect client library written in TypeScript. Lets you write Node.js applications that communicates directly with Microsoft Flight Simulator, FSX and Prepar3D without need for additional SDK files. Runs on Windows, Linux and Mac.\n\nThis project is a port of the Java client library\n[jsimconnect](https://github.com/mharj/jsimconnect), originally written by\n[lc0277](https://www.fsdeveloper.com/forum/members/lc0277.1581). Details about the protocol can be found on [lc0277's old website](http://web.archive.org/web/20090620063532/http://lc0277.nerim.net/jsimconnect/doc/flightsim/simconnect/package-summary.html#package_description). A huge thanks to everyone involved in that project! :pray:\n\n## Installation and use\n\n\u003e :bulb: Tip: check out the [msfs-simconnect-api-wrapper](https://www.npmjs.com/package/msfs-simconnect-api-wrapper) which provides a more user-friendly wrapper around some of the `node-simconnect` APIs.\n\n1. `npm install node-simconnect`\n2. Check out the [/samples](https://github.com/EvenAR/node-simconnect/tree/master/samples) folder for example scripts.\n3. Refer to the [official SimConnect documentation](https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/SimConnect_API_Reference.htm) for comprehensive details on SimConnect APIs and usage.\n\nThere are also [auto generated API-docs](https://evenar.github.io/node-simconnect/).\n\n### Getting started\n\nYou always start by calling [`open(...)`](https://evenar.github.io/node-simconnect/functions/open.html) which will attempt to open a connection with the SimConnect server (your flight simulator). If this succeeds you will get access to:\n\n-   [`recvOpen`](https://evenar.github.io/node-simconnect/classes/RecvOpen.html): contains simulator information\n-   [`handle`](https://evenar.github.io/node-simconnect/classes/SimConnectConnection.html): used for accessing the SimConnect APIs\n\nExample:\n\n```js\nimport { open, Protocol } from 'node-simconnect';\n\nconst EVENT_ID_PAUSE = 1;\n\nopen('My SimConnect client', Protocol.FSX_SP2)\n    .then(function ({ recvOpen, handle }) {\n        console.log('Connected to', recvOpen.applicationName);\n\n        handle.on('event', function (recvEvent) {\n            switch (recvEvent.clientEventId) {\n                case EVENT_ID_PAUSE:\n                    console.log(recvEvent.data === 1 ? 'Sim paused' : 'Sim unpaused');\n                    break;\n            }\n        });\n        handle.on('exception', function (recvException) {\n            console.log(recvException);\n        });\n        handle.on('quit', function () {\n            console.log('Simulator quit');\n        });\n        handle.on('close', function () {\n            console.log('Connection closed unexpectedly (simulator CTD?)');\n        });\n\n        handle.subscribeToSystemEvent(EVENT_ID_PAUSE, 'Pause');\n    })\n    .catch(function (error) {\n        console.log('Connection failed:', error);\n    });\n```\n\n## node-simconnect vs the official API\n\n### Supported APIs\n\nMost of the APIs described in the [official SimConnect documentation](https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/SimConnect_API_Reference.htm) are implemented in `node-simconnect`. For information on how each feature works, please refer to the official documentation.\n\nSeveral new features have been added to the SimConnect API after the new Microsoft Flight Simulator was released, and more features are likely to come. Most of these will only be implemented on request. If you are missing any features in `node-simconnect` feel free to [open a new issue](https://github.com/EvenAR/node-simconnect/issues) or create a pull request.\n\nPrepar3D support and Prepar3D-only-features will not be prioritized.\n\nFor a complete list of available API methods, please refer to the [`SimConnectConnection`](https://evenar.github.io/node-simconnect/classes/SimConnectConnection.html) class.\n\n### Data unwrapping\n\nA major feature used by C/C++/C# implementation of SimConnect client libraries is the ability to directly cast a memory block to a user-defined structure. This is technically impossible to do in JavaScript or TypeScript since memory layout of classes and types are not accessible. Consequently, the wrapping/unwrapping steps must be done by the user.\n\nExample using the official SimConnect SDK (C++):\n\n```C++\n// C++ code ////////////////////\n\nstruct Struct1 {\n    double  kohlsmann;\n    double  altitude;\n    double  latitude;\n    double  longitude;\n    int     verticalSpeed;\n};\n\n// ....\n    hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, \"Kohlsman setting hg\", \"inHg\");\n    hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, \"Indicated Altitude\", \"feet\");\n    hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, \"Plane Latitude\", \"degrees\");\n    hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, \"Plane Longitude\", \"degrees\");\n    hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, \"VERTICAL SPEED\", \"Feet per second\", SimConnectDataType.INT32);\n\n    SimConnect_RequestDataOnSimObject(hSimConnect, REQUEST_1, DEFINITION_1, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SECOND);\n// ....\n\nvoid CALLBACK MyDispatchProc(SIMCONNECT_RECV* pData, DWORD cbData) {\n    switch(pData-\u003edwID) {\n        case SIMCONNECT_RECV_ID_SIMOBJECT_DATA: {\n            SIMCONNECT_RECV_SIMOBJECT_DATA *pObjData = (SIMCONNECT_RECV_SIMOBJECT_DATA*) pData;\n            switch(pObjData-\u003edwRequestID) {\n                case REQUEST_1:\n                    Struct1 *pS = (Struct1*)\u0026pObjData-\u003edwData;\n                    break;\n                }\n            break;\n        }\n    }\n}\n```\n\nThe code below demonstrates how the same is achieved with `node-simconnect`:\n\n```ts\n// TypeScript code ////////////////////\n\nconst REQUEST_1 = 0;\nconst DEFINITION_1 = 0;\n// ....\nhandle.addToDataDefinition(DEFINITION_1, 'Kohlsman setting hg', 'inHg', SimConnectDataType.FLOAT64);\nhandle.addToDataDefinition(DEFINITION_1, 'Indicated Altitude', 'feet', SimConnectDataType.FLOAT64);\nhandle.addToDataDefinition(DEFINITION_1, 'Plane Latitude', 'degrees', SimConnectDataType.FLOAT64);\nhandle.addToDataDefinition(DEFINITION_1, 'Plane Longitude', 'degrees', SimConnectDataType.FLOAT64);\nhandle.addToDataDefinition(DEFINITION_1, 'VERTICAL SPEED', 'Feet per second', SimConnectDataType.INT32);\n\nhandle.requestDataOnSimObject(REQUEST_1, DEFINITION_1, SimConnectConstants.OBJECT_ID_USER, SimConnectPeriod.SIM_FRAME);\n\n// ....\nhandle.on('simObjectData', recvSimObjectData =\u003e {\n    switch (recvSimObjectData.requestID) {\n        case REQUEST_1: {\n            const receivedData = {\n                // Read order is important!\n                kohlsmann: recvSimObjectData.data.readFloat64(),\n                altitude: recvSimObjectData.data.readFloat64(),\n                latitude: recvSimObjectData.data.readFloat64(),\n                longitude: recvSimObjectData.data.readFloat64(),\n                verticalSpeed: recvSimObjectData.data.readInt32(),\n            }\n            break;\n        }\n    }\n});\n```\n\nWhen the `simObjectData` callback is triggered, the `recvSimObjectData.data` is used to extract the requested simulation variables. These values are stored as a single continuous binary data chunk/buffer, maintaining the order in which the simulation variables were added to the data definition. In this case, the buffer is 288 bits long (64 + 64 + 64 + 64 + 32), or 36 bytes.\n\nThe `read...()` functions are used to extract each value individually. When the correct function is used, the reading \"cursor\" (offset) automatically moves after each read, positioning it at the beginning of the next value in the buffer. Consequently, it is crucial to ensure that the values are read in the same order and using the same data type as initially requested.\n\n## Running over network?\n\nIf the Node.js application runs on the same computer as the flight simulator you don't need to worry about this part.\n\nTo connect from an external computer you must configure SimConnect to accept connections from other hosts. This procedure is also described in the official docs, but here is the short version:\n\n1. Open `SimConnect.xml`.\n\n    - FSX: `X:\\Users\\\u003cUSER\u003e\\AppData\\Roaming\\Microsoft\\FSX`\n    - MSFS: `X:\\Users\\\u003cUSER\u003e\\AppData\\Local\\Packages\\Microsoft.FlightSimulator_**********\\LocalCache`.\n\n1. Set property `\u003cAddress\u003e0.0.0.0\u003c/Address\u003e`. Example of a working SimConnect.xml file:\n\n    ```xml\n    \u003c?xml version=\"1.0\" encoding=\"Windows-1252\"?\u003e\n    \u003cSimBase.Document Type=\"SimConnect\" version=\"1,0\"\u003e\n        \u003cFilename\u003eSimConnect.xml\u003c/Filename\u003e\n        \u003cSimConnect.Comm\u003e\n            \u003cProtocol\u003eIPv4\u003c/Protocol\u003e\n            \u003cScope\u003elocal\u003c/Scope\u003e\n            \u003cPort\u003e5111\u003c/Port\u003e\n            \u003cMaxClients\u003e64\u003c/MaxClients\u003e\n            \u003cMaxRecvSize\u003e41088\u003c/MaxRecvSize\u003e\n            \u003cAddress\u003e0.0.0.0\u003c/Address\u003e\n        \u003c/SimConnect.Comm\u003e\n    \u003c/SimBase.Document\u003e\n    ```\n\nConnecting from a remote script can be done by providing the IP address of the flight simulator PC and the port number when calling `open`:\n\n```js\nconst options = { remote: { host: 'localhost', port: 5111 } };\n\nopen('My SimConnect client', Protocol.FSX_SP2, options).then(/* ... */).catch(/* try again? */);\n```\n\nNote that if no connection options are specified, `node-simconnect` will auto-discover connection details in the following order:\n\n1. Look for a [`SimConnect.cfg`](https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/SimConnect_CFG_Definition.htm) in the folder where Node.js is located. If the script is running in Electron, this will be the folder where the Electron executable is installed.\n1. Look for a [`SimConnect.cfg`](https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/SimConnect_CFG_Definition.htm) in the user's home directory (`%USERPROFILE%`, eg. `C:\\Users\\\u003cusername\u003e`)\n1. Look for a named pipe in the Windows registry, automatically set by the simulator\n1. Look for a port number in the Windows registry, automatically set by the simulator. node-simconnect will then connect to `localhost:\u003cport\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevenar%2Fnode-simconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevenar%2Fnode-simconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevenar%2Fnode-simconnect/lists"}