{"id":15672123,"url":"https://github.com/dacarson/rpi-upsplus-exporter","last_synced_at":"2025-03-16T10:25:10.248Z","repository":{"id":180832225,"uuid":"665743438","full_name":"dacarson/RPi-UPSPlus-Exporter","owner":"dacarson","description":"Export the UPSPlus to InfluxDb","archived":false,"fork":false,"pushed_at":"2023-10-05T19:04:43.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T22:30:43.262Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/dacarson.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":"2023-07-12T22:47:28.000Z","updated_at":"2023-07-12T22:47:35.000Z","dependencies_parsed_at":"2024-10-23T10:37:03.160Z","dependency_job_id":"17a3b795-6416-4f74-b40e-ad00b109e2a5","html_url":"https://github.com/dacarson/RPi-UPSPlus-Exporter","commit_stats":null,"previous_names":["dacarson/rpi-upsplus-exporter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2FRPi-UPSPlus-Exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2FRPi-UPSPlus-Exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2FRPi-UPSPlus-Exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2FRPi-UPSPlus-Exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dacarson","download_url":"https://codeload.github.com/dacarson/RPi-UPSPlus-Exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243854414,"owners_count":20358605,"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":[],"created_at":"2024-10-03T15:21:56.941Z","updated_at":"2025-03-16T10:25:10.223Z","avatar_url":"https://github.com/dacarson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Github License](https://img.shields.io/github/license/dacarson/WeatherFlowApi) \n\n# RPi-UPSPlus-Exporter\n\n\n## Description\nExport [UPSPlus](https://wiki.52pi.com/index.php?title=EP-0136) data to Influx DB so that it can be graphed with Grafana. \n\nTo be run as a cron job, do not run as a service. (If run in a loop, it will fail due to running out of file handles - SMBUS leaks handles)\n\nBased on example scripts from ([UPSplus](https://github.com/geeekpi/upsplus/tree/main)) that show how to get all the detail from the device.\n\nThese five measurement tables are added to the database:\n* Supply. This contains the voltage, current and power being supplied to the board.\n* Battery. This contains the voltage, current and power of the battery.\n* Current_voltage_data. This contains the voltage measurements read from the [registers](https://wiki.52pi.com/index.php?title=EP-0136#Register_Mapping).\n* Battery_data. This contains details of the battery, eg remaining capacity, temperature, low voltage, full voltage, read from [registers](https://wiki.52pi.com/index.php?title=EP-0136#Register_Mapping).\n* Device_data. This contains information about the board configurations and runtime retrieved from the [registers](https://wiki.52pi.com/index.php?title=EP-0136#Register_Mapping).\n\n  \n## Usage\n```\nusage: UPSPlus-exporter.py [-h] [-r] [--influxdb] [--influxdb_host INFLUXDB_HOST] [--influxdb_port INFLUXDB_PORT] \n                        [--influxdb_user INFLUXDB_USER] [--influxdb_pass INFLUXDB_PASS] [--influxdb_db INFLUXDB_DB] \n                        [-v]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -r, --raw             print raw data to stddout\n  --influxdb            publish to influxdb\n  --influxdb_host INFLUXDB_HOST\n                        hostname of InfluxDB HTTP API\n  --influxdb_port INFLUXDB_PORT\n                        hostname of InfluxDB HTTP API\n  --influxdb_user INFLUXDB_USER\n                        InfluxDB username\n  --influxdb_pass INFLUXDB_PASS\n                        InfluxDB password\n  --influxdb_db INFLUXDB_DB\n                        InfluxDB database name\n  -v, --verbose         verbose mode\n  ````\n\nTo configure as a cron job, `crontab -e`.\nRecommend to run every 2 minutes, as that is the sampling interval of the battery status.\n\n `*/2 * * * * /usr/bin/python3 /home/pi/RPi-UPSPlus-Exporter/UPSPlus-exporter.py  --influxdb --influxdb_user logger --influxdb_pass pass`\n\n  \n  ## License\n\nThis content is licensed under [MIT License](https://opensource.org/license/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdacarson%2Frpi-upsplus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdacarson%2Frpi-upsplus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdacarson%2Frpi-upsplus-exporter/lists"}