{"id":50362330,"url":"https://github.com/dacarson/eagle-exporter","last_synced_at":"2026-05-30T02:30:25.391Z","repository":{"id":351861707,"uuid":"1211910349","full_name":"dacarson/eagle-exporter","owner":"dacarson","description":"Exports data from the RainForest Eagle device to JSON and/or to InfluxDB","archived":false,"fork":false,"pushed_at":"2026-04-16T19:11:50.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T21:11:25.439Z","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T21:52:42.000Z","updated_at":"2026-04-16T19:11:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dacarson/eagle-exporter","commit_stats":null,"previous_names":["dacarson/eagle-exporter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dacarson/eagle-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2Feagle-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2Feagle-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2Feagle-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2Feagle-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dacarson","download_url":"https://codeload.github.com/dacarson/eagle-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacarson%2Feagle-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33678270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-05-30T02:30:24.179Z","updated_at":"2026-05-30T02:30:25.377Z","avatar_url":"https://github.com/dacarson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eagle-exporter\n\nLightweight Python exporter for the Rainforest Automation Eagle local API.\n\nIt polls Eagle devices (with a focus on electric meters), normalizes values, and can either:\n\n- print raw JSON snapshots to stdout, or\n- publish flattened fields to InfluxDB.\n\n## Features\n\n- Collects and refreshes device inventory\n- Polls electric meter devices by hardware address\n- Flattens nested API data into InfluxDB-friendly scalar fields\n- Skips unchanged meter writes using `last_contact`\n- Publishes additional `wifi_status` and `devices` measurements\n\n## Requirements\n\n- Python 3\n- An Eagle gateway with local API access\n- Eagle hardware product page: [Rainforest Automation Eagle-200/Eagle-3](https://rainforestautomation.com/us-retail-store/eagle-3-energy-gateway-and-smart-home-hub/)\n- `requests` (direct HTTP calls to the Eagle local API — no third-party Eagle library required)\n- (Optional) InfluxDB — this project uses the `influxdb` Python client, typically for InfluxDB 1.x HTTP API\n\nInstall Python dependencies:\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n## Usage\n\nBasic run (prints raw JSON only):\n\n```bash\npython3 eagle-exporter.py \\\n  --eagle_host 192.168.1.100 \\\n  --eagle_user YOUR_CLOUD_ID \\\n  --eagle_pass YOUR_INSTALLATION_ID \\\n  --raw\n```\n\nPublish to InfluxDB:\n\n```bash\npython3 eagle-exporter.py \\\n  --eagle_host 192.168.1.100 \\\n  --eagle_user YOUR_CLOUD_ID \\\n  --eagle_pass YOUR_INSTALLATION_ID \\\n  --influxdb \\\n  --influxdb_host 127.0.0.1 \\\n  --influxdb_port 8086 \\\n  --influxdb_db eagle\n```\n\n### Common arguments\n\n- `--eagle_host` (required): Eagle local API host/IP\n- `--eagle_user` (required): Eagle Cloud ID\n- `--eagle_pass` (required): Eagle Installation ID\n- `--raw`: print inventory/meter JSON payloads\n- `--influxdb`: enable InfluxDB publishing\n- `--influxdb_host` (default: `localhost`)\n- `--influxdb_port` (default: `8086`)\n- `--influxdb_user`\n- `--influxdb_pass`\n- `--influxdb_db` (default: `eagle`)\n- `--meter_poll_interval` (default: `10` seconds)\n- `--inventory_poll_interval` (default: `86400` seconds)\n- `--eagle_timeout` (default: `30` seconds)\n- `--verbose`: log Influx payloads and skip reasons\n- `--debug`: print raw request/response XML for each Eagle API call\n\n## Data model (InfluxDB)\n\nThe exporter writes:\n\n- `wifi_status`: flattened current Eagle Wi-Fi status\n- `devices`: one point per inventory device refresh\n- `device_\u003chardware_address\u003e`: meter variable fields for each electric meter\n\nFields are flattened and sanitized to scalar values. Non-scalar nested data is flattened using underscore-separated keys.\n\n## Running as a systemd service\n\nThis repository includes `eagle-exporter.service` for Raspberry Pi-style deployment.\n\nExample install:\n\n```bash\nsudo cp eagle-exporter.service /etc/systemd/system/eagle-exporter.service\nsudoedit /etc/default/eagle-exporter\nsudo systemctl daemon-reload\nsudo systemctl enable --now eagle-exporter\n```\n\nExample `/etc/default/eagle-exporter`:\n\n```bash\nEAGLE_EXPORTER_ARGS=\"\\\n--eagle_host 192.168.1.100 \\\n--eagle_user YOUR_CLOUD_ID \\\n--eagle_pass YOUR_INSTALLATION_ID \\\n--influxdb \\\n--influxdb_host 127.0.0.1 \\\n--influxdb_port 8086 \\\n--influxdb_db eagle \\\n--meter_poll_interval 30\"\n```\n\nCheck logs:\n\n```bash\njournalctl -u eagle-exporter -f\n```\n\n## Notes\n\n- Credentials are passed as CLI args in this project; prefer secure host practices and file permissions around environment files.\n- If you only need local inspection/debugging, run with `--raw` and without `--influxdb`.\n- The Eagle's local HTTP server can become overloaded if polled too frequently. If you see repeated 503 errors or XML parse failures, increase `--meter_poll_interval` and add `RestartSec=60` to the systemd unit to prevent rapid restart loops from hammering the device.\n- The exporter communicates with the Eagle directly over HTTP using Basic Auth (Cloud ID as username, Installation ID as password) — no third-party Eagle library is required.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdacarson%2Feagle-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdacarson%2Feagle-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdacarson%2Feagle-exporter/lists"}