{"id":21342873,"url":"https://github.com/astrixgame/apc-ups-broker","last_synced_at":"2026-02-04T05:05:14.643Z","repository":{"id":250626479,"uuid":"834976586","full_name":"astrixgame/apc-ups-broker","owner":"astrixgame","description":"Used for formating data into structured JSON from APC UPSs","archived":false,"fork":false,"pushed_at":"2024-08-04T15:49:41.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-16T10:46:44.436Z","etag":null,"topics":["apc","backup","broker","power","ups"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astrixgame.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-28T21:58:27.000Z","updated_at":"2024-08-04T15:49:21.000Z","dependencies_parsed_at":"2024-07-29T00:56:42.588Z","dependency_job_id":null,"html_url":"https://github.com/astrixgame/apc-ups-broker","commit_stats":null,"previous_names":["astrixgame/apc-ups-broker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Fapc-ups-broker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Fapc-ups-broker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Fapc-ups-broker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrixgame%2Fapc-ups-broker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrixgame","download_url":"https://codeload.github.com/astrixgame/apc-ups-broker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225824698,"owners_count":17529906,"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":["apc","backup","broker","power","ups"],"created_at":"2024-11-22T01:10:54.095Z","updated_at":"2026-02-04T05:05:14.140Z","avatar_url":"https://github.com/astrixgame.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# APC UPS Broker\n\nUsed to format unstructured data into JSON from APC UPSs using **apcupsd daemon** via TCP by default port **3551**\n\n## 🛠️ Install package    \n```bash\nnpm install apc-ups-broker\n```\n\n## 🧑🏻‍💻 Usage\nUsing CommonJS \n```js\nconst APCBroker = require('apc-ups-broker');\n```\nUsing ES6 module\n```js\nimport APCBroker from 'apc-ups-broker';\n```\n\nFull example using ES6 module syntax\n```js\nimport APCBroker from 'apc-ups-broker';\n\n(async () =\u003e {\n    var ups = new APCBroker();\n\n    ups.on('values', data =\u003e console.log(data));\n\n    setInterval(() =\u003e ups.get('values'), 5000);\n})();\n```\n\n## Values fields\n| Name| Unit| Description\n| -------- | -------- | -------- |\n| linev | V | Input voltage\n| loadpct | % | Output load\n| bcharge | % | Battery charge level\n| timeleft | Min. | Time left to shutdown (battery)\n| mbattchg | % | Minimal battery charge level\n| mintimel | Min. | Minimal battery runtime\n| outputv | V | Output voltage\n| dwake | Sec. | Time before power on after power restore\n| dshutd | Sec. | Delay for shutdown command\n| lotrans | V | Low transfer (low voltage to start transfer)\n| hitrans | V | High transfer (high voltage to start transfer)\n| retpct | % | Battery level required to turn on\n| itemp | °C / °F | UPS temperature\n| battv | V | Battery voltage\n| linefreq | Hz | Input frequency\n| numxfers | Number | Total count of transfers\n| tonbatt | Sec. | Current time on battery\n| cumonbatt | Sec. | Total time on battery |\n\nAll fields in status response can be found in [ubuntu apcupsd docs](https://manpages.ubuntu.com/manpages/bionic/man8/apcaccess.8.html).\n\u003cbr\u003e\u003cbr\u003e\n**Note**: Different ups can have different status fields, which you can find out on apcupsd docs.\n\n## 🛠️ Tech Stack\n- [Node.js](https://nodejs.org/)\n\n## 🙇 Acknowledgements      \n- [APC Protocol docs](https://networkupstools.org/protocols/apcsmart.html)\n- [apcupsd Docs](https://wiki.debian.org/apcupsd)\n        \n \n## ➤ License\nDistributed under the Apache-2.0 License. See [LICENSE](LICENSE) for more information.\n        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrixgame%2Fapc-ups-broker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrixgame%2Fapc-ups-broker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrixgame%2Fapc-ups-broker/lists"}