{"id":15714095,"url":"https://github.com/d1ceward/shellyplug-exporter","last_synced_at":"2025-05-07T02:43:44.106Z","repository":{"id":62803891,"uuid":"459790524","full_name":"d1ceward/shellyplug-exporter","owner":"d1ceward","description":"Prometheus Exporter for Shelly plugs","archived":false,"fork":false,"pushed_at":"2025-03-12T20:24:35.000Z","size":238,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T05:33:06.223Z","etag":null,"topics":["docker","plug","prometheus","prometheus-exporter","shelly"],"latest_commit_sha":null,"homepage":"https://d1ceward.github.io/shellyplug-exporter","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d1ceward.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-15T23:58:48.000Z","updated_at":"2025-03-30T15:31:03.000Z","dependencies_parsed_at":"2024-07-19T15:53:19.752Z","dependency_job_id":"0faa6401-3334-4e71-8f14-1dda99fba992","html_url":"https://github.com/d1ceward/shellyplug-exporter","commit_stats":{"total_commits":83,"total_committers":3,"mean_commits":"27.666666666666668","dds":0.03614457831325302,"last_synced_commit":"9a3539b3db58e348714ea841b48df7b61d8d4839"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1ceward%2Fshellyplug-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1ceward%2Fshellyplug-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1ceward%2Fshellyplug-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d1ceward%2Fshellyplug-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d1ceward","download_url":"https://codeload.github.com/d1ceward/shellyplug-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252802608,"owners_count":21806537,"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","plug","prometheus","prometheus-exporter","shelly"],"created_at":"2024-10-03T21:34:43.966Z","updated_at":"2025-05-07T02:43:44.037Z","avatar_url":"https://github.com/d1ceward.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](.github/images/shelly_plug_s.png)\n\n# shellyplug-exporter (v1.10.1)\n![GitHub Workflow Status (main)](https://github.com/d1ceward/shellyplug-exporter/actions/workflows/main.yml/badge.svg?branch=master)\n[![Docker Pulls](https://img.shields.io/docker/pulls/d1ceward/shellyplug-exporter.svg)](https://hub.docker.com/r/d1ceward/shellyplug-exporter)\n[![GitHub issues](https://img.shields.io/github/issues/d1ceward/shellyplug-exporter)](https://github.com/d1ceward/shellyplug-exporter/issues)\n[![GitHub license](https://img.shields.io/github/license/d1ceward/shellyplug-exporter)](https://github.com/d1ceward/shellyplug-exporter/blob/master/LICENSE)\n\nPrometheus exporter for Shelly plugs model S written in Crystal.\n\u003e **Note** It uses the api provided by the plug, it does not use the MQTT protocol\n\n:rocket: Suggestions for new improvements are welcome in the issue tracker.\n\n## Installation and Usage\n\nThe `SHELLYPLUG_HOST` environment variable is required to retrieve information from the plug, `SHELLYPLUG_PORT` is optional (default 80).\nAuthentication variables `SHELLYPLUG_AUTH_USERNAME` and `SHELLYPLUG_AUTH_PASSWORD` depend on whether http authentication is enabled on the plug.\n\nThe `shellyplug-exporter` listens on HTTP port 5000 by default. See the environment variable `EXPORTER_PORT` to change this behavior.\n\n### Docker\n\nWith `docker run` command :\n```shell\ndocker run -d \\\n  -p 8080:5000 \\\n  -e SHELLYPLUG_HOST=\"shelly-plug-hostname-or-ip\" \\\n  -e SHELLYPLUG_PORT=\"80\" \\\n  -e SHELLYPLUG_AUTH_USERNAME=\"username-for-http-auth\" \\\n  -e SHELLYPLUG_AUTH_PASSWORD=\"password-for-http-auth\" \\\n  -e EXPORTER_PORT=5000 \\\n  ghcr.io/d1ceward/shellyplug-exporter:latest # Or with Docker Hub: d1ceward/shellyplug-exporter:latest\n```\n\nWith docker-compose file :\n```yaml\n---\nservices:\n  plug_exporter:\n    image: ghcr.io/d1ceward/shellyplug-exporter:latest # Or with Docker Hub: d1ceward/shellyplug-exporter:latest\n    restart: unless-stopped\n    ports:\n      - 8080:5000\n    environment:\n      SHELLYPLUG_HOST: shelly-plug-hostname-or-ip\n      SHELLYPLUG_PORT: 80\n      SHELLYPLUG_AUTH_USERNAME: username-for-http-auth\n      SHELLYPLUG_AUTH_PASSWORD: password-for-http-auth\n      EXPORTER_PORT: 5000\n```\n\n### Linux\n\nDownload the executable file :\n```shell\nwget --no-verbose -O shellyplug-exporter https://github.com/d1ceward/shellyplug-exporter/releases/download/v1.10.1/shellyplug-exporter-linux-amd64\n```\n\nModify the executable's permissions :\n```shell\nchmod +x shellyplug-exporter\n```\n\nExecution example :\n```shell\nshellyplug-exporter run \\\n  --plug-host=shelly-plug-hostname-or-ip \\\n  --plug-port=80 \\\n  --plug-auth-username=username-for-http-auth \\\n  --plug-auth-password=password-for-http-auth \\\n  --port 5000\n```\n\nDocumentation available here : https://d1ceward.github.io/shellyplug-exporter/\n\n## Metrics\n\nBase path: `/metrics`\n\nName                   | Description                          | Type    |\n-----------------------|--------------------------------------|---------|\nshellyplug_power       | Current power drawn in watts         | Gauge   |\nshellyplug_overpower   | Overpower drawn in watts             | Gauge   |\nshellyplug_total_power | Total power consumed in watt-minute  | Counter |\nshellyplug_temperature | Plug temperature in celsius          | Gauge   |\nshellyplug_uptime      | Plug uptime in seconds               | Gauge   |\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/d1ceward/shellyplug-exporter. By contributing you agree to abide by the Code of Merit.\n\n1. Fork it (\u003chttps://github.com/d1ceward/shellyplug-exporter/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Development building and running\n\n1. Install corresponding version of Crystal lang (cf: `.crystal-version` file)\n2. Install Crystal dependencies with `shards install`\n3. Build with `shards build`\n\nThe newly created binary should be at `bin/shellyplug-exporter`\n\n### Running tests\n\n```shell\ncrystal spec\n```\n\n## Contributors\n\n- [d1ceward](https://github.com/d1ceward) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd1ceward%2Fshellyplug-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd1ceward%2Fshellyplug-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd1ceward%2Fshellyplug-exporter/lists"}