{"id":21002663,"url":"https://github.com/mictronics/ups-server","last_synced_at":"2025-12-29T05:47:37.828Z","repository":{"id":205356646,"uuid":"713913566","full_name":"Mictronics/ups-server","owner":"Mictronics","description":"A websocket server reading data from a Bicker UPSIC-1205 + PSZ-1063 uExtension module in combination with their UPS.","archived":false,"fork":false,"pushed_at":"2024-03-21T18:38:45.000Z","size":296,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T10:09:17.487Z","etag":null,"topics":["apcupsd","bicker","client","libconfig","libjson-c","libwebsocket","pthreads","server","ups","websocket"],"latest_commit_sha":null,"homepage":"https://www.mictronics.de/posts/UPSIC-1205-on-steroids/","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mictronics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2023-11-03T14:00:43.000Z","updated_at":"2024-04-19T18:57:07.000Z","dependencies_parsed_at":"2024-11-19T23:03:49.768Z","dependency_job_id":null,"html_url":"https://github.com/Mictronics/ups-server","commit_stats":null,"previous_names":["mictronics/ups-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mictronics%2Fups-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mictronics%2Fups-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mictronics%2Fups-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mictronics%2Fups-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mictronics","download_url":"https://codeload.github.com/Mictronics/ups-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243419128,"owners_count":20287806,"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":["apcupsd","bicker","client","libconfig","libjson-c","libwebsocket","pthreads","server","ups","websocket"],"created_at":"2024-11-19T08:19:31.931Z","updated_at":"2025-12-29T05:47:37.790Z","avatar_url":"https://github.com/Mictronics.png","language":"C","readme":"# UPS Server\n\nA websocket server reading data from a Bicker PSZ-1063 uExtension module in combination with one of their UPS through a serial RS232 connection.\n\nThe server daemon is monitoring the UPS and provides its parameters to a web application for visualization. In addition a system shutdown is initiated as soon as an UPS input power fail is detected. A shutdown delay is configurable. When input power returns while the delay is pending then the shutdown is cancelled.\n\nTested with Bicker UPSIC-1205 + PSZ1063. See [www.bicker.de](https://www.bicker.de)\n\nThe above hardware combination is powering a Nipogi mini PC via 12V supply. This mini PC is running Ubuntu Server and the UPS monitoring ensures a clean shutdown in case of input power fail.\n\nThere are three protocols implemented on the port that is provided by the UPS server: HTTP that serves the web application, a websocket where the web application connects to and a RAW protocol that is serving a apcupsd compatible output for tools like apcaccess or Netdata's apcupsd plugin.\n\n```bash\n~$ /usr/sbin/apcaccess status localhost:10024\nAPC      : 001,025,0593\nDATE     : 2023-11-05 12:45:38 +0100\nHOSTNAME : workhorse\nUPSNAME  : UPSIC Series\nMODEL    : SUC-1011\nFIRMWARE : 2.0.5R\nSTATUS   : ONLINE\nLINEFAIL : No\nLINEV    : 12.6 Volts\nLINEA    : 0.004 Amps\nOUTPUTV  : 12.6 Volts\nOUTPUTA  : 0.000 Amps\nBATTV    : 10.5 Volts\nBATTA    : 0.010 Amps\nBCHARGE  : 100 Percent\nITEMP    : 28 C\nDSHUTD   : 15 Seconds\nDWAKE    : 8 Seconds\nMAXTIME  : 60 Seconds\nRETPCT   : 90 Percent\nSTATFLAG : 0x0D\nREG2     : 0x1425\nREG3     : 0x0200\nNOMINV   : 12.4 Volts\nNOMBATTV : 10.4 Volts\nENDAPC   : 2023-11-05 12:45:38 +0100\n\n```\n\n## Debian/Ubuntu packages\n\nIt is designed to build as a Debian package.\n\n### Build Dependencies\n\n- libpthread-stubs0-dev\n- libwebsockets-dev\n- libconfig-dev\n- libjson-c-dev\n\n### Actually building it\n\nNothing special, just build it `dpkg-buildpackage -b -uc`.\n\n### Installation\n\nInstall package `sudo dpkg -i ups-server_1.0.5~dev_amd64.deb`.\n\nThe ups-server binary is installed in `/opt/ups-server` while the web client is in `/opt/ups-server/client`.\n\n### Removal\n\nRemove the package `sudo apt-get purge ups-server`.\n\n### Configuration\n\nTo configure the service in `/etc/default/ups-server.cfg` as required.\n\n#### Netdata apcupsd configuration\n\nThe tool `apcaccess` from the apcupsd package is required to get the UPS metrics in netdata. Temporary install the package, copy apcaccess tool to a different location `sudo cp /usr/sbin/apcaccess /usr/local/sbin/apcaccess` and then purge the apcupsd package.\n\nEdit the netdata apcupsd configuration with `sudo ./edit-config charts.d/apcupsd.conf`. Change the source IP and port to what is set in `/etc/default/ups-server.cfg`.\n\n```bash\n# add all your APC UPSes in this array - uncomment it too\ndeclare -A apcupsd_sources=(\n    [\"local\"]=\"127.0.0.1:10024\"\n)\n```\nRestart netdata service.\n\n### Access\n\nWeb application in browser `http://localhost:10024`\n\nAPC status `/usr/sbin/apcaccess status localhost:10024`\n\n## Building manually\n\nYou can probably just run \"make\" after installing the required dependencies.\nBinaries are built in the source directory; you will need to arrange to\ninstall them (and a method for starting them) yourself.\n\n## Disclaimer\n\nI am not affiliated, associated, authorized, endorsed by, or in any way officially connected with Bicker GmbH. This is a pure hobbyist project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmictronics%2Fups-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmictronics%2Fups-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmictronics%2Fups-server/lists"}