{"id":23094858,"url":"https://github.com/aexel90/shelly_exporter","last_synced_at":"2025-08-16T10:33:03.551Z","repository":{"id":57635165,"uuid":"326736623","full_name":"aexel90/shelly_exporter","owner":"aexel90","description":"Shelly humidity sensor exporter for prometheus ","archived":false,"fork":false,"pushed_at":"2023-01-29T21:44:44.000Z","size":1130,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-15T21:51:26.614Z","etag":null,"topics":["exporter","go","grafana","grafana-dashboard","humidity","humidity-monitoring","humidity-sensor","prometheus","prometheus-exporter","shelly","shelly-api","shelly-cloud"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aexel90.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}},"created_at":"2021-01-04T16:05:12.000Z","updated_at":"2024-03-30T12:30:10.000Z","dependencies_parsed_at":"2023-02-16T01:30:37.899Z","dependency_job_id":null,"html_url":"https://github.com/aexel90/shelly_exporter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexel90%2Fshelly_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexel90%2Fshelly_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexel90%2Fshelly_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aexel90%2Fshelly_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aexel90","download_url":"https://codeload.github.com/aexel90/shelly_exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230032692,"owners_count":18162491,"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":["exporter","go","grafana","grafana-dashboard","humidity","humidity-monitoring","humidity-sensor","prometheus","prometheus-exporter","shelly","shelly-api","shelly-cloud"],"created_at":"2024-12-16T22:18:26.463Z","updated_at":"2024-12-16T22:18:26.886Z","avatar_url":"https://github.com/aexel90.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prometheus Shelly Exporter and Grafana integration\n\nThis exporter exports some metrics from Shelly to Prometheus.\n\nTestes with:\n\n| Shelly H\u0026T  | Shelly Plus 2PM |\n| ------------- | ------------- |\n| \u003cimg src=\"https://www.shelly.cloud/_Resources/Persistent/d/3/4/6/d346492eefc1e0327b4413aa07f1cefcbdadb71f/s_ht_x1-1000x1000.webp\" width=\"250\"\u003e  | \u003cimg src=\"https://www.shelly.cloud/_Resources/Persistent/1/f/b/2/1fb2ef6f3ce8e6228fb22370937d97e88b4d4720/Plus-2PM-1200x1200.webp\" width=\"250\"\u003e  |\n## Shelly API\n\nShelly API: https://shelly-api-docs.shelly.cloud/#shelly-h-amp-t\n\nShelly cloud API access: https://shelly.cloud/documents/developers/shelly_cloud_api_access.pdf\n\nTest API with HTTP POST:\n    \n    https://\u003curl\u003e/device/status?auth_key=\u003cauth_key\u003e\u0026id=\u003cid\u003e\n## Configuration File: shelly-metrics.json\n\nDetermine \"auth_key\", \"id\" and \"url\" of your device via Shelly cloud API access and update in shelly-metrics.json.\n\"shelly_name\" and \"name\" can be determined on your own.\n\n    {\n    \"account\":{\n        \"auth_key\": \"...\",\n        \"url\": \"...\"\n    },\n    \"products\": [\n        {\n            \"type\": \"ht\",\n            \"export\": {\n                \"isok\": \"isok\",\n                \"temperature\": \"data.device_status.tmp.value\",\n                \"humidity\": \"data.device_status.hum.value\",\n                \"battery\": \"data.device_status.bat.value\",\n                \"has_update\": \"data.device_status.update.has_update\",\n                \"firmware\": \"data.device_status.getinfo.fw_info.fw\",\n                \"mac\": \"data.device_status.mac\",\n                \"updated\": \"data.device_status._updated\"\n            },\n            \"devices\": [\n                {\n                    \"id\": \"956b54\",                  \n                    \"shelly_name\": \"S1\",\n                    \"name\": \"Indoor\"\n                },\n                {\n                    \"id\": \"9574a8\",                   \n                    \"shelly_name\": \"S2\",\n                    \"name\": \"Outdoor\"\n                }\n            ]\n        },\n        ...\n\n## Build\n\n    go get github.com/aexel90/shelly_exporter/\n    cd $GOPATH/src/github.com/aexel90/shelly_exporter\n    go install\n\n## Execution\n\nUsage:\n\n    $GOPATH/bin/shelly_exporter -h\n\n    Usage of ./shelly_exporter:\n        -listen-address string\n                The address to listen on for HTTP requests. (default \"127.0.0.1:9784\")\n        -metrics-file string\n                The JSON file with the metric definitions. (default \"shelly-metrics.json\")\n        -test\n                Test configured metrics\n\n### Execute:\n\n    $GOPATH/go/bin/shelly_exporter -metrics-file $GOPATH/go/bin/shelly-metrics.json\n\n### Testing:\n\n    $GOPATH/go/bin/shelly_exporter -metrics-file $GOPATH/go/bin/shelly-metrics.json -test\n\n    Metric: shelly_ht_info\n    - Exporter Result:\n    - Exporter Result 0:\n        - humidity=\"53\"\n        - mac=\"E09806956B54\"\n        - name=\"Indoor\"\n        - isok=\"true\"\n        - shelly_name=\"S1\"\n        - temperature=\"22.88\"\n        - battery=\"85\"\n        - has_update=\"false\"\n        - firmware=\"\"\n        - updated=\"2021-11-23 19:43:54\"\n    - Exporter Result 1:\n        - has_update=\"false\"\n        - firmware=\"20210323-104951/v1.10.1-gf276b51\"\n        - isok=\"true\"\n        - name=\"Outdoor\"\n        - temperature=\"6.38\"\n        ...\n\n## Docker\n\n        cp shelly-metrics.json.template shelly-metrics.json\n        vi shelly-metrics.json\n        docker-compose up -d --build\n\n## Grafana Dashboard\n\n### weather widget\n\nhttps://weatherwidget.io/\n\n    \u003c!doctype html\u003e \u003chtml lang=\"de\"\u003e\n    \u003chead\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n    \u003ca class=\"weatherwidget-io\" href=\"https://forecast7.com/de/51d0513d74/dresden/\" data-label_1=\"DRESDEN\" data-theme=\"original\" data-highcolor=\"#88d976\" \u003eDRESDEN\u003c/a\u003e\n    \u003cscript\u003e\n    !function(d,s,id){\n        var js,fjs=d.getElementsByTagName(s)[0];\n        if(!d.getElementById(id)){\n        js=d.createElement(s);\n        js.id=id;\n        js.src='https://weatherwidget.io/js/widget.min.js';\n        fjs.parentNode.insertBefore(js,fjs);\n        setInterval('__weatherwidget_init()', 1800000) \u003c!-- refresh widget every 30 minutes (1800000 milliseconds): --\u003e\n        }\n    }(document,'script','weatherwidget-io-js');\n    \u003c/script\u003e\n    \u003c/body\u003e\n    \u003c/html\u003e\n\n### dashboard\n\nGrafana-ID: 13739\nhttps://grafana.com/grafana/dashboards/13739\n\n#### grafana.ini\n\n    [panels]\n    # If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.\n    disable_sanitize_html = true\n\n![Grafana](https://raw.githubusercontent.com/aexel90/shelly_exporter/main/grafana/screenshot_temp.jpg)\n![Grafana Rollo](https://raw.githubusercontent.com/aexel90/shelly_exporter/main/grafana/screenshot_rollo.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faexel90%2Fshelly_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faexel90%2Fshelly_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faexel90%2Fshelly_exporter/lists"}