{"id":16900274,"url":"https://github.com/ilshidur/zwave-prometheus-exporter","last_synced_at":"2025-08-19T05:32:44.335Z","repository":{"id":40313758,"uuid":"410356286","full_name":"Ilshidur/zwave-prometheus-exporter","owner":"Ilshidur","description":"(UNMAINTAINED) Listens to Z-Wave nodes and exports Prometheus metrics.","archived":false,"fork":false,"pushed_at":"2024-11-27T05:11:56.000Z","size":60,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-16T22:53:37.718Z","etag":null,"topics":["exporter","metrics","prometheus","prometheus-exporter","z-wave","zwave"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/zwave-prometheus-exporter","language":"JavaScript","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/Ilshidur.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}},"created_at":"2021-09-25T18:50:29.000Z","updated_at":"2022-11-02T13:34:03.000Z","dependencies_parsed_at":"2024-12-16T09:43:11.284Z","dependency_job_id":"c4ef35d7-9cf6-4b05-b752-7973062a9e7d","html_url":"https://github.com/Ilshidur/zwave-prometheus-exporter","commit_stats":{"total_commits":51,"total_committers":3,"mean_commits":17.0,"dds":0.4117647058823529,"last_synced_commit":"efb9f07fa3263a3873c274c8548d1c3269d006a2"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ilshidur%2Fzwave-prometheus-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ilshidur%2Fzwave-prometheus-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ilshidur%2Fzwave-prometheus-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ilshidur%2Fzwave-prometheus-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ilshidur","download_url":"https://codeload.github.com/Ilshidur/zwave-prometheus-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230326800,"owners_count":18209051,"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","metrics","prometheus","prometheus-exporter","z-wave","zwave"],"created_at":"2024-10-13T17:52:33.041Z","updated_at":"2024-12-18T19:11:07.484Z","avatar_url":"https://github.com/Ilshidur.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⚡ zwave-prometheus-exporter\n\n![stability-stable](https://img.shields.io/badge/stability-stable-green.svg)\n\n[![npm version][version-badge]][version-url]\n[![Known Vulnerabilities][vulnerabilities-badge]][vulnerabilities-url]\n[![dependency status][dependency-badge]][dependency-url]\n[![devdependency status][devdependency-badge]][devdependency-url]\n[![Code Climate][maintainability-badge]][maintainability-url]\n[![downloads][downloads-badge]][downloads-url]\n\n[![NPM][npm-stats-badge]][npm-stats-url]\n\n[![dockeri.co](https://dockeri.co/image/ilshidur/zwave-prometheus-exporter)](https://hub.docker.com/r/ilshidur/zwave-prometheus-exporter)\n\nListens to Z-Wave nodes and exports Prometheus metrics.\n\n## ⚡ Installation\n\n### Using Docker\n\n```bash\ndocker run \\\n  -p 9850:9850 \\\n  -v $(pwd)/metrics.json:/home/app/metrics.json \\\n  -v $(pwd)/keys.json:/home/app/keys.json \\\n  --device=/dev/ttyUSB0:/dev/ttyUSB0 \\\n  --name zwave-prometheus-exporter \\\n  --rm \\\n  ilshidur/zwave-prometheus-exporter\n```\n\n### As a global npm module\n\n**Node.js required.**\n\n```bash\nnpm i -g zwave-prometheus-exporter\nzwave-prometheus-exporter\n```\n\n### By cloning the git project\n\n**Node.js required.**\n\n```bash\ngit clone https://github.com/Ilshidur/zwave-prometheus-exporter.git\nnpm ci\nnode cli.js\n```\n\n## ⚡ Usage\n\n```\nUsage: zwave-prometheus-exporter [options]\n\nOptions:\n  -V, --version                 output the version number\n  -k, --keys \u003ckeys path\u003e        the keys file path (default: \"keys.json\")\n  -m, --metrics \u003cmetrics path\u003e  the metrics file path (default: \"metrics.json\")\n  -i, --input \u003cinput path\u003e      the serial port file path (default: \"/dev/ttyUSB0\")\n  -p, --port \u003cport\u003e             the port where the prometheus metrics will be exposed (default: 9850)\n  -h, --help                    display help for command\n```\n\n## ⚡ Configuration files\n\nThe CLI needs 2 files to run : `metrics.json` and `keys.json`. If no path is provided, the CLI will try to load `zwave-prometheus-exporter/metrics.json` and `zwave-prometheus-exporter/keys.json`.\n\n**Those 2 files are required for the CLI to run.**\n\n### `metrics.json`\n\nThis file contains the Z-Wave values to monitor and export as Prometheus metrics.\n\n**Each field being :**\n\n* **`name`** : the name with which this Z-Wave value will be exposed as a Prometheus metric.\n* **`commandClass`** : the Command Class of the value to export.\n* **`property`** : the Command Class property of the value to export.\n* **`propertyKey`** : the Command Class property key of the value to export.\n\n```json\n[\n  {\n    \"name\": \"power_consumption_watts\",\n    \"commandClass\": \"0x32\",\n    \"property\": \"value\",\n    \"propertyKey\": 66049\n  },\n  {\n    \"name\": \"power_consumption_volts\",\n    \"commandClass\": \"0x32\",\n    \"property\": \"value\",\n    \"propertyKey\": 66561\n  },\n  {\n    \"name\": \"power_consumption_amperes\",\n    \"commandClass\": \"0x32\",\n    \"property\": \"value\",\n    \"propertyKey\": 66817\n  }\n]\n```\n\n### `keys.json`\n\nThis file contains the Z-Wave keys used to communicate securely with the Z-Wave nodes. Each key is a 32 hex caracters length with different content. Sharing keys between multiple security classes is a security risk!\n\n\u003e *You can find more details on the [Z-Wave JS docs](https://zwave-js.github.io/node-zwave-js/#/getting-started/security-s2).*\n\n```json\n{\n  \"s2\": {\n    \"accessControl\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n    \"authenticated\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n    \"unauthenticated\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n  },\n  \"s0\": {\n    \"legacy\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n  }\n}\n```\n\n## ⚡ TODO\n\n* Process to securely add a node into the Z-Wave network.\n\n\u003chr/\u003e\n\n\u003cp align=\"center\"\u003e\n  Don't forget to 🌟 Star 🌟 the repo if you like this project !\u003cbr/\u003e\n  \u003ca href=\"https://github.com/Ilshidur/zwave-prometheus-exporter/issues/new\"\u003eYour feedback is appreciated\u003c/a\u003e\n\u003c/p\u003e\n\n[version-badge]: https://img.shields.io/npm/v/zwave-prometheus-exporter.svg\n[version-url]: https://www.npmjs.com/package/zwave-prometheus-exporter\n[vulnerabilities-badge]: https://snyk.io/test/npm/zwave-prometheus-exporter/badge.svg\n[vulnerabilities-url]: https://snyk.io/test/npm/zwave-prometheus-exporter\n[dependency-badge]: https://david-dm.org/ilshidur/zwave-prometheus-exporter.svg\n[dependency-url]: https://david-dm.org/ilshidur/zwave-prometheus-exporter\n[devdependency-badge]: https://david-dm.org/ilshidur/zwave-prometheus-exporter/dev-status.svg\n[devdependency-url]: https://david-dm.org/ilshidur/zwave-prometheus-exporter#info=devDependencies\n[build-badge]: https://travis-ci.org/Ilshidur/zwave-prometheus-exporter.svg\n[build-url]: https://travis-ci.org/Ilshidur/zwave-prometheus-exporter\n[maintainability-badge]: https://api.codeclimate.com/v1/badges/1460cc66adbf6478806d/maintainability\n[maintainability-url]: https://codeclimate.com/github/Ilshidur/zwave-prometheus-exporter/maintainability\n[downloads-badge]: https://img.shields.io/npm/dt/zwave-prometheus-exporter.svg\n[downloads-url]: https://www.npmjs.com/package/zwave-prometheus-exporter\n[npm-stats-badge]: https://nodei.co/npm/zwave-prometheus-exporter.png?downloads=true\u0026downloadRank=true\n[npm-stats-url]: https://nodei.co/npm/zwave-prometheus-exporter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filshidur%2Fzwave-prometheus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filshidur%2Fzwave-prometheus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filshidur%2Fzwave-prometheus-exporter/lists"}