{"id":28718801,"url":"https://github.com/biohazardious/openbeken-prometheus-exporter","last_synced_at":"2026-04-13T00:40:31.392Z","repository":{"id":296105158,"uuid":"992309676","full_name":"biohazardious/Openbeken-Prometheus-Exporter","owner":"biohazardious","description":"Lightweight Prometheus exporter that collects real-time metrics from OpenBeken-based smart plugs","archived":false,"fork":false,"pushed_at":"2025-06-14T17:03:34.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-14T18:19:57.371Z","etag":null,"topics":["docker","docker-compose","grafana","iot","openbeken","prometheus","prometheus-exporter","prometheus-metrics","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/biohazardious.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,"zenodo":null}},"created_at":"2025-05-29T00:29:54.000Z","updated_at":"2025-06-14T17:03:37.000Z","dependencies_parsed_at":"2025-05-29T01:35:14.906Z","dependency_job_id":"281cb66b-11a2-4738-ba3a-6704ee12336d","html_url":"https://github.com/biohazardious/Openbeken-Prometheus-Exporter","commit_stats":null,"previous_names":["biohazardious/openbeken-prometheus-exporter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/biohazardious/Openbeken-Prometheus-Exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biohazardious%2FOpenbeken-Prometheus-Exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biohazardious%2FOpenbeken-Prometheus-Exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biohazardious%2FOpenbeken-Prometheus-Exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biohazardious%2FOpenbeken-Prometheus-Exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biohazardious","download_url":"https://codeload.github.com/biohazardious/Openbeken-Prometheus-Exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biohazardious%2FOpenbeken-Prometheus-Exporter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259924673,"owners_count":22932782,"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":["docker","docker-compose","grafana","iot","openbeken","prometheus","prometheus-exporter","prometheus-metrics","python"],"created_at":"2025-06-15T05:04:36.591Z","updated_at":"2026-04-13T00:40:31.336Z","avatar_url":"https://github.com/biohazardious.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔌 OpenBeken Prometheus Exporter\n\nThis project is a lightweight Prometheus exporter that collects real-time metrics from **OpenBeken-based smart plugs** and exposes them in Prometheus-compatible format for monitoring and visualization via Grafana or similar tools.\nMetrics data is compatible with Gizex's Tuya dashboard. (https://grafana.com/grafana/dashboards/23018-power/)\n\n---\n\n## 📈 Metrics Exported\n\n| Metric Name                     | Description                                         |\n|--------------------------------|-----------------------------------------------------|\n| `tuya_smartplug_power`         | Instantaneous power usage in watts (W)             |\n| `tuya_smartplug_voltage`       | Voltage in volts (V)                                |\n| `tuya_smartplug_current`       | Current in milliamps (mA)                           |\n| `tuya_smartplug_switch_on`     | Device state (1 = ON, 0 = OFF)                      |\n| `tuya_smartplug_power_kwh_day` | Estimated energy usage per day in kilowatt-hours    |\n\n---\n\n## ⚙️ Configuration\n\nEdit the `config.yaml` file to define your smart plugs:\n\n```yaml\ndevices:\n  - name: plug_livingroom\n    ip: 192.168.1.10\n  - name: plug_kitchen\n    ip: 192.168.1.11\n```\n\n## 🚀 Quick Start with Docker Compose\n1. Clone the Repository\n\ngit clone https://github.com/biohazardious/Openbeken-Prometheus-Exporter.git\n\ncd Openbeken-Prometheus-Exporter\n\n2. Run with Docker Compose\n\ndocker compose up --build -d\n\nThe exporter will be accessible at:\n\nhttp://localhost:9345/metrics\n\n## 📡 Prometheus Integration\n\nAdd the following job to your prometheus.yml:\n\nscrape_configs:\n  - job_name: 'openbeken_smartplugs'\n    static_configs:\n      - targets: ['host.docker.internal:9345']\n\nOr if Prometheus is running in the same Docker network:\n\n      - targets: ['openbeken-exporter:9345']\n\n## 🐳 Dockerfile\n\nThe project includes a minimal Dockerfile using Python 3.11 slim:\n```Dockerfile\nFROM python:3.11-slim\nWORKDIR /app\nCOPY requirements.txt .\nRUN pip install --no-cache-dir -r requirements.txt\nCOPY . .\nCMD [\"python\", \"exporter.py\"]\n```\n\n## 📦 Requirements\n    Python 3.11+\n    Prometheus\n    Docker + Docker Compose\n\n## 🧑‍💻 Author\n\nCreated with ❤️ by @biohazardious\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiohazardious%2Fopenbeken-prometheus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiohazardious%2Fopenbeken-prometheus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiohazardious%2Fopenbeken-prometheus-exporter/lists"}