{"id":22436990,"url":"https://github.com/entorb/shelly-api","last_synced_at":"2025-08-17T01:09:47.536Z","repository":{"id":198151800,"uuid":"700182724","full_name":"entorb/shelly-api","owner":"entorb","description":"Example Python code for accessing the API of (password-protected) Shelly devices","archived":false,"fork":false,"pushed_at":"2025-06-23T19:00:38.000Z","size":24,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T15:52:01.826Z","etag":null,"topics":["api","python","python3","rfc7616","shelly","shelly-plug-s","shelly-plugs"],"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/entorb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-10-04T05:30:48.000Z","updated_at":"2025-06-23T19:00:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"622b299c-800d-4215-80d8-99ca74de9c60","html_url":"https://github.com/entorb/shelly-api","commit_stats":null,"previous_names":["entorb/shelly-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/entorb/shelly-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fshelly-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fshelly-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fshelly-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fshelly-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entorb","download_url":"https://codeload.github.com/entorb/shelly-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fshelly-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270793456,"owners_count":24646595,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"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":["api","python","python3","rfc7616","shelly","shelly-plug-s","shelly-plugs"],"created_at":"2024-12-06T00:10:33.975Z","updated_at":"2025-08-17T01:09:47.509Z","avatar_url":"https://github.com/entorb.png","language":"Python","readme":"# shelly-api\n\nExample Python (3.13) code for accessing the API of (password-protected) Shelly devices.\n\nWritten for Shelly Plug S and Plus Plug S according to [API gen1 spec](https://shelly-api-docs.shelly.cloud/gen1/#shelly-plug-plugs-meter-0) and [API gen2 spec](https://shelly-api-docs.shelly.cloud/gen2/General/Authentication).\n\nMotivation: Shelly Plug S does not support local MQTT connection in parallel to cloud connection. Hence, I needed to retrieve the data (for my local InfluxDB and Grafana) via API instead.\n\nNote: Password protection/authentication is activated in my devices, hence needed here as well.\n\n* `credentials.py` set Shelly IP and login credentials\n* `read_api_v1.py` example code for Shelly Plug S using API gen1\n* `read_api_v2.py` example code for Shelly Plus Plug S using API gen2\n\n## Features\n\n* [x] access Shelly Plug S API gen1 via basic authentication\n* [x] access Shelly Plus Plug S API gen2 via digest authentication / [RFC7616](https://datatracker.ietf.org/doc/html/rfc7616)\n* [x] read meter power and energy data\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentorb%2Fshelly-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentorb%2Fshelly-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentorb%2Fshelly-api/lists"}