{"id":15641748,"url":"https://github.com/trygve-lie/sector-client","last_synced_at":"2026-04-29T18:33:11.156Z","repository":{"id":137478924,"uuid":"121136575","full_name":"trygve-lie/sector-client","owner":"trygve-lie","description":"Node client for Sector Alarm. Checks status and arms / disarms the alarm.","archived":false,"fork":false,"pushed_at":"2018-10-01T11:54:43.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-17T20:10:24.907Z","etag":null,"topics":["iot","javascript","nodejs","sector-alarm","smarthouse"],"latest_commit_sha":null,"homepage":null,"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/trygve-lie.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-11T15:23:00.000Z","updated_at":"2018-02-12T08:42:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc17972a-6831-4ea6-b040-73a236ed1eb5","html_url":"https://github.com/trygve-lie/sector-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trygve-lie/sector-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygve-lie%2Fsector-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygve-lie%2Fsector-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygve-lie%2Fsector-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygve-lie%2Fsector-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trygve-lie","download_url":"https://codeload.github.com/trygve-lie/sector-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trygve-lie%2Fsector-client/sbom","scorecard":{"id":900247,"data":{"date":"2025-08-11","repo":{"name":"github.com/trygve-lie/sector-client","commit":"bc68766619a1165b5c109ef2c841902dc54123a3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-24T15:18:48.622Z","repository_id":137478924,"created_at":"2025-08-24T15:18:48.622Z","updated_at":"2025-08-24T15:18:48.622Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["iot","javascript","nodejs","sector-alarm","smarthouse"],"created_at":"2024-10-03T11:44:59.956Z","updated_at":"2026-04-29T18:33:11.137Z","avatar_url":"https://github.com/trygve-lie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sector-client\n\n[![Dependencies](https://img.shields.io/david/trygve-lie/sector-client.svg?style=flat-square)](https://david-dm.org/trygve-lie/sector-client)\n\nNode client for Sector Alarm. Checks status and arms / disarms the alarm.\n\n## Installation\n\n```bash\n$ npm install sector-client\n```\n\n## Examples\n\nLogin and show status of alarm:\n\n```js\nconst Client = require('sector-client');\nconst client = new Client();\n\nconst USERNAME = 'your@email.com';\nconst PASSWORD = 'your-password';\n\nconst example = async () =\u003e {\n    const login = await client.login(USERNAME, PASSWORD);\n    const system = await client.system();\n    console.log(system);\n};\n\nexample();\n```\n\n\n## Description\n\nThis is a node.js client to control alarm systems from the scandinavian alarm\ncompany [Sector Alarm](http://www.sectoralarm.no/).\n\nThis module lets you log on an alarm system from Sector Alarm and retrieve status\ninfo about the system and run operations on the alarms registered on the user.\n\nTo log in and run operations, one do need a users username, password and alarm\npanel key. The `username` and `password` are the username and passwords one use to\nlog on the web control panel at Sector Alarm with. The `key` wanted when arming /\ndisarmin an system is the key one use to punch in on an systems panel to activate\n/ deactivate an alarm.\n\n\n## Constructor\n\nCreate a new Sector Alarm Client instance.\n\n```js\nconst Client = require('sector-client');\nconst client = new Client();\n```\n\n\n## API\n\nThis module have the following API:\n\n### .login(username, password)\n\nLog in as a user to the alarm one want to control. The method takes your\n`username` and `password` as arguments. Returns a `Promise`.\n\nLogin must be done before any other methods are called. The login keeps\na token so after one can run any other methods after each other without\nre-authenticating.\n\n```js\nconst client = new Client();\nclient.login('your-username', 'your-password').then(success =\u003e {\n    console.log(success);\n}).catch(error =\u003e {\n    console.error(error);\n});\n```\n\n\n### .logoff()\n\nLogs the user off. Returns a `Promise`.\n\n```js\nclient.logoff().then(success =\u003e {\n    console.log(success);\n}).catch(error =\u003e {\n    console.error(error);\n});\n```\n\n### .system()\n\nList information about the alarm systems registered on the logged in user.\n\nIts worth noticing that this method will return a list of objects for each\nalarm system and in each of these objects hold the `PanelId` which one will\nneed to run operations on each indivitual alarm system.\n\nReturns a `Promise`.\n\n```js\nclient.system().then(info =\u003e {\n    console.log(info);\n}).catch(error =\u003e {\n    console.error(error);\n});\n```\n\n\n### .status(panelId)\n\nGet current status of an alarm system. The method takes the `panelId` of the\nalarm as argument. Returns a `Promise`.\n\n```js\nclient.status('system-panelId').then(status =\u003e {\n    console.log(status);\n}).catch(error =\u003e {\n    console.error(error);\n});\n```\n\n\n### .history(panelId)\n\nList the history of an alarm system. The method takes the `panelId` of the\nalarm as argument. Returns a `Promise`.\n\n```js\nclient.history('system-panelId').then(history =\u003e {\n    console.log(history);\n}).catch(error =\u003e {\n    console.error(error);\n});\n```\n\n\n### .armPartial(panelId, key)\n\nPartially arm an alarm system. The method takes the `panelId` and `key` of the\nalarm as arguments. Returns a `Promise`.\n\n```js\nclient.armPartial('system-panelId', 'your-key').then(status =\u003e {\n    console.log(status);\n}).catch(error =\u003e {\n    console.error(error);\n});\n```\n\n\n### .armTotal(panelId, key)\n\nTotally arm an alarm system. The method takes the `panelId` and `key` of the\nalarm as arguments. Returns a `Promise`.\n\n```js\nclient.armTotal('system-panelId', 'your-key').then(status =\u003e {\n    console.log(status);\n}).catch(error =\u003e {\n    console.error(error);\n});\n```\n\n\n### .disarm(panelId, key)\n\nDisarms an alarm system. The method takes the `panelId` and `key` of the\nalarm as arguments. Returns a `Promise`.\n\n```js\nclient.disarm('system-panelId', 'your-key').then(status =\u003e {\n    console.log(status);\n}).catch(error =\u003e {\n    console.error(error);\n});\n```\n\n\n## node.js compabillity\n\nThis module is written in ES6 and uses some functions only found in node.js 8.2\nand newer. This module will not function with older than 8.2 versions of node.js.\n\n\n## Warning and disclosure\n\nThis is __NOT__ an official client from Sector Alarm. This client uses the exact\nsame http endpoints which their web and mobile apps does. This client was\ndeveloped out of looking at these http requests and are imitating these.\n\nBe aware that these endpoints can be changed at any time by Sector Alarm and that\nthis module can be rendered broken at any time due to this.\n\nSector Alarm does not currently provide a public API for their alarms and this\nis a reverse engineered module using the APIs exposed for their web and mobile\napplications. Iow; how we log on here is not optimal from a security perspective.\nBy using this module one are leaving all credentials needed to arm and disarm\nan alarm in clear text in your program. By using this module you are fully aware\nof this and take full responsibillity for your own security.\n\nIf your credential to your alarm are compromised due to using this module, your\ndo hold full responsibillity of this yourself. I hold no responsibillity for your\nusage of this module.\n\n\n## Dear Sector Alarm\n\nFirst of all; I have to say that I am pretty happy with your service. You do provide\na good alarm service in my mind.\n\nMy home consist of now a pretty big smarthouse setup which include a lot of different\ncomponents and misc systems. This module was made to solve a wish I have in my\nsmarthouse set up. Its a huge hack to be honest and I'm pretty sure this is not the\nway you would like to see others integrate with you.\n\nSo, I have a wish for you: I would love to see a public API for controlling sertain\naspects of your alarms. I would love to see an public API with a proper security model\nfor server to server authentication and communication and resonable endpoints one can\nrun programatical operations on.\n\nIf you ever want input on such an API I'll be more than happy to provide feedback\non what I would love to see and be able to integrate. If ever such an public API\nsurface I'll be more then happy to terminate this module...\n\nNo altering or illegal tampering with the alarm itself, mobile applications or web\nsite have been done to develop this module. Its been developed by purly looking at\nthe http requests going on in your web client.\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2018 - Trygve Lie - post@trygve-lie.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrygve-lie%2Fsector-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrygve-lie%2Fsector-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrygve-lie%2Fsector-client/lists"}