{"id":21831618,"url":"https://github.com/capevace/mission-control-client","last_synced_at":"2026-05-10T10:02:27.008Z","repository":{"id":34897689,"uuid":"187984894","full_name":"Capevace/mission-control-client","owner":"Capevace","description":"JavaScript SDK for external sites \u0026 services to connect to Mission Control. Works on browser and in Node.","archived":false,"fork":false,"pushed_at":"2023-01-07T22:49:24.000Z","size":4279,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T23:41:50.012Z","etag":null,"topics":["browser","javascript","library","mission-control","nodejs","npm"],"latest_commit_sha":null,"homepage":"https://mission-control.js.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Capevace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-22T07:21:01.000Z","updated_at":"2022-02-19T16:52:35.000Z","dependencies_parsed_at":"2023-01-15T10:15:14.681Z","dependency_job_id":null,"html_url":"https://github.com/Capevace/mission-control-client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capevace%2Fmission-control-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capevace%2Fmission-control-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capevace%2Fmission-control-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capevace%2Fmission-control-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Capevace","download_url":"https://codeload.github.com/Capevace/mission-control-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244804037,"owners_count":20513040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["browser","javascript","library","mission-control","nodejs","npm"],"created_at":"2024-11-27T19:12:38.354Z","updated_at":"2026-05-10T10:02:21.963Z","avatar_url":"https://github.com/Capevace.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mission Control Client – mission-control-client\n\n\u003e A client for Node.js and the browser to easily connect and interact with the Mission Control system.\n\n[![NPM Version][npm-image]][npm-url]\n[![Downloads Stats][npm-downloads]][npm-url]\n\n##### [Docs][docs]\n\nThis mission-control-client is used to simplify my custom applications that I write for the Mission Control home automation system.\nThis library makes it very easy to add features to every little thing I built for it.\n\n\u003c!-- ![](header.png) --\u003e\n\n## Installation\n\n```sh\nnpm install mission-control-client --save\n```\n\n## Usage Examples\n\nThe library can then be used like this:\n\n```js\nimport { MissionControlClient } from 'mission-control-client';\n\nconst client = new MissionControlClient('http://localhost', '\u003cAPI-KEY\u003e');\n\n// Listen to socket events\nclient.on('connect', () =\u003e {\n\tconsole.log('We have a connection');\n});\n\nclient.on('disconnect', reason =\u003e {\n\tconsole.log('Disconnected again for reason:', reason);\n});\n\n// Listen to mission control events.\nclient.subscribe('action:VIDEO-QUEUE:PUSH', data =\u003e {\n\t/* ... */\n});\nclient.subscribe('update:videoQueue', data =\u003e {\n\t/* ... */\n});\n\n// Run an action\nclient.action('NOTIFICATION:CREATE', {\n\t/* data */\n});\n```\n\n_For more examples and usage, please refer to the [Docs][docs]._\n\n## Handling Auth\n\nAuth is done using JSON Web Tokens. Due to a limitation in Socket.io, we can't detect an 'unauthorized' response, as Socket.io simply won't send any responses before we authenticated. Keep that in mind if you run into connection errors as they might be auth-based. Check the Mission Control console, it will tell you if a socket client is unauthorized.\n\n## Development Setup\n\nDescribe how to install all development dependencies and how to run an automated test-suite of some kind. Potentially do this for multiple platforms.\n\n```sh\n# To build the docs\nnpm run docs\n\n# To build\nnpm run build\n```\n\n## Release History\n\n-   1.1.0\n    -   Changed authentication scheme. Client now sends authentication data over secure body packets instead of querystring parameters, which were visible on insecure connections.\n    -   Added `AUTH_INVALID_TOKEN` and `AUTH_TIMEOUT` socket error types.\n-   1.0.0\n    -   The first proper release\n\n## Authors\n\nLukas Mateffy – [@Capevace](https://twitter.com/capevace) – [mateffy.me](https://mateffy.me)\n\nDistributed under the MIT license. See `LICENSE` for more information.\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/capevace/mission-control-client/fork\u003e)\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n\u003c!-- Markdown link \u0026 img dfn's --\u003e\n\n[npm-image]: https://img.shields.io/npm/v/mission-control-client.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/mission-control-client\n[npm-downloads]: https://img.shields.io/npm/dm/mission-control-client.svg?style=flat-square\n[wiki]: https://github.com/capevace/mission-control-client/wiki\n[docs]: https://capevace.github.io/mission-control-client\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapevace%2Fmission-control-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapevace%2Fmission-control-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapevace%2Fmission-control-client/lists"}