{"id":16560645,"url":"https://github.com/mathieu2301/focusrite-control-api","last_synced_at":"2025-10-28T21:30:41.681Z","repository":{"id":57239665,"uuid":"278757463","full_name":"Mathieu2301/Focusrite-Control-API","owner":"Mathieu2301","description":"Focusrite Control API","archived":false,"fork":false,"pushed_at":"2020-07-11T00:40:53.000Z","size":5,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-01T18:39:04.312Z","etag":null,"topics":["api","automation","focusrite","focusrite-control","focusrite-scarlett","leds","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mathieu2301.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-11T00:14:46.000Z","updated_at":"2025-01-17T16:56:29.000Z","dependencies_parsed_at":"2022-08-29T21:23:18.604Z","dependency_job_id":null,"html_url":"https://github.com/Mathieu2301/Focusrite-Control-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FFocusrite-Control-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FFocusrite-Control-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FFocusrite-Control-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FFocusrite-Control-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mathieu2301","download_url":"https://codeload.github.com/Mathieu2301/Focusrite-Control-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238720445,"owners_count":19519352,"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":["api","automation","focusrite","focusrite-control","focusrite-scarlett","leds","nodejs"],"created_at":"2024-10-11T20:29:39.986Z","updated_at":"2025-10-28T21:30:36.299Z","avatar_url":"https://github.com/Mathieu2301.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Focusrite Control API\n Focusrite Control API\n\n No dependencies 💪\n\n___\n## Installation\n\n```\nnpm install focusrite\n```\n\n## Examples (test.js)\n\n Start by importing the library\n ```javascript\n const focusrite = require('focusrite');\n ```\n\n### Create a fake ControlServer\n```javascript\nfocusrite.createFakeServer([\n    `\u003cclient-details id=\"XXXXXXXXX\"/\u003e`,\n    `\u003cdevice-arrival\u003e ... \u003c/device-arrival\u003e`,\n    ...\n], (data) =\u003e {\n    console.log(data);\n});\n```\n\n### Find the running ControlServer port\n```javascript\nfocusrite.findServerPort((port) =\u003e {\n    console.log(`ControlServer port is : ${port}`);\n});\n```\n\n### Connect to the ControlServer as a fake client\n```javascript\nfocusrite.createFakeClient(port, 'xxxxxxxx-0000-xxxx-xxxx-xxxxxxxxxxxx', (onData, clientWrite) =\u003e {\n    onData((data) =\u003e {\n        console.log(data);\n\n        // These commands are compatible with the Scarlett SOLO (3rd gen) :\n\n        // To write a response\n        clientWrite(`\u003cset devid=\"1\"\u003e ... \u003c/set\u003e`);\n\n        // To change gain halos colors\n        clientWrite(focusrite.requests.MODE_COLOR); // First set in \"color\" mode\n        clientWrite(focusrite.colors.RED); // Availables colors : RED, AMBER, GREEN, LIGHT_BLUE, BLUE, LIGHT_PINK, PINK\n\n        // To enable/disable AIR Mode\n        clientWrite(focusrite.requests.A1_PREAMP_TRUE); // Enable\n        clientWrite(focusrite.requests.A1_PREAMP_FALSE); // Disable\n\n        // To enable/disable INST Mode\n        clientWrite(focusrite.requests.A2_INST_TRUE); // Enable\n        clientWrite(focusrite.requests.A2_INST_FALSE); // Disable\n        \n        // To send a custom command\n        clientWrite(`\u003cset devid=\"...\"\u003e ... \u003c/set\u003e`);\n\n        // Model of a command :\n        /*\n        \u003cset devid=\"{ Device ID (ex: \"1\") }\"\u003e\n            \u003citem\n                id=\"{ Parameter ID (ex: \"44\" to change the color) }\"\n                value=\"{ Parameter value (ex: \"red\" to change the color) }\"\n            /\u003e\n        \u003c/set\u003e\n        */\n    });\n});\n```\n\n___\n## Problems\n\n If you have errors in console or unwanted behavior, just reload the page.\n If the problem persists, please create an issue [here](https://github.com/Mathieu2301/Focusrite-Control-API/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieu2301%2Ffocusrite-control-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathieu2301%2Ffocusrite-control-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieu2301%2Ffocusrite-control-api/lists"}