{"id":18217419,"url":"https://github.com/ebaauw/homebridge-p1","last_synced_at":"2026-01-12T15:01:45.591Z","repository":{"id":43933408,"uuid":"122507684","full_name":"ebaauw/homebridge-p1","owner":"ebaauw","description":"Homebridge plugin for DSMR end-consumer (P1) interface","archived":false,"fork":false,"pushed_at":"2026-01-10T12:27:35.000Z","size":1132,"stargazers_count":53,"open_issues_count":0,"forks_count":11,"subscribers_count":10,"default_branch":"main","last_synced_at":"2026-01-11T03:40:17.123Z","etag":null,"topics":["dsmr","dsmrp1","homebridge-plugin","homekit","p1","smartmeter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ebaauw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["ebaauw"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.me/ebaauw/EUR"]}},"created_at":"2018-02-22T16:54:53.000Z","updated_at":"2026-01-10T12:27:38.000Z","dependencies_parsed_at":"2022-09-12T07:11:35.146Z","dependency_job_id":"6655b853-71f6-4ac6-a46c-fae28f2fa606","html_url":"https://github.com/ebaauw/homebridge-p1","commit_stats":{"total_commits":506,"total_committers":4,"mean_commits":126.5,"dds":"0.013833992094861691","last_synced_commit":"e75b44730dd7cf05b184650733d40ffdd637104d"},"previous_names":[],"tags_count":128,"template":false,"template_full_name":null,"purl":"pkg:github/ebaauw/homebridge-p1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebaauw%2Fhomebridge-p1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebaauw%2Fhomebridge-p1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebaauw%2Fhomebridge-p1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebaauw%2Fhomebridge-p1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebaauw","download_url":"https://codeload.github.com/ebaauw/homebridge-p1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebaauw%2Fhomebridge-p1/sbom","scorecard":{"id":364453,"data":{"date":"2025-08-11","repo":{"name":"github.com/ebaauw/homebridge-p1","commit":"ccf110e8bdc792138c31cb84269d69564f236dda"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T11:32:24.096Z","repository_id":43933408,"created_at":"2025-08-18T11:32:24.096Z","updated_at":"2025-08-18T11:32:24.096Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dsmr","dsmrp1","homebridge-plugin","homekit","p1","smartmeter"],"created_at":"2024-11-03T17:05:19.772Z","updated_at":"2026-01-12T15:01:45.578Z","avatar_url":"https://github.com/ebaauw.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ebaauw","https://www.paypal.me/ebaauw/EUR"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"homebridge-p1.png\" height=\"200px\"\u003e\n\u003c/p\u003e\n\u003cspan align=\"center\"\u003e\n\n# Homebridge P1\n[![Downloads](https://img.shields.io/npm/dt/homebridge-p1.svg)](https://www.npmjs.com/package/homebridge-p1)\n[![Version](https://img.shields.io/npm/v/homebridge-p1.svg)](https://www.npmjs.com/package/homebridge-p1)\n[![Homebridge Discord](https://img.shields.io/discord/432663330281226270?color=728ED5\u0026logo=discord\u0026label=discord)](https://discord.gg/8nfZrcV)\n[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)\n\n[![GitHub issues](https://img.shields.io/github/issues/ebaauw/homebridge-p1)](https://github.com/ebaauw/homebridge-p1/issues)\n[![GitHub pull requests](https://img.shields.io/github/issues-pr/ebaauw/homebridge-p1)](https://github.com/ebaauw/homebridge-p1/pulls)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n\u003c/span\u003e\n\n## Homebridge plugin for DSMR end-consumer (P1) interface\nCopyright © 2018-2026 Erik Baauw. All rights reserved.\n\nThis [Homebridge](https://github.com/homebridge/homebridge) plugin exposes a smart meter to Apple's [HomeKit](http://www.apple.com/ios/home/), using the end-consumer (P1) interface of the [Dutch Smart Meter Requirements (DSMR)](https://www.netbeheernederland.nl/_upload/Files/Slimme_meter_15_a727fce1f1.pdf).\nIt provides insight from HomeKit into your actual and historic energy consumption.\n\nThe smart meter sends a push notification (\"telegram\" in DSMR speak), every second, updating the electricity consumption almost in real time.\nOlder versions of DSMR might send notifications less frequently.\nGas consumption is updated once every five minutes.\nHomebridge P1 maintains the historic consumption.\n\nDepending on the smart meter capabilities, Homebridge P1 exposes up to three\nHomeKit accessories:\n- _Electricity_ for electricity consumed;\n- _Electricity Delivered_ for electricity delivered back to the network (if you have solar panels);\n- _Gas_ for natural gas consumed (if a smart gas meter has been linked to the smart electricity meter);\n\nEach accessory exposes a service with `Total Consumption`, just like an Eve Energy, enabling the [Eve](https://www.evehome.com/en/eve-app) app to display the consumption history.\nEve computes the `Total Cost` and `Projected Cost`.\n\nIn case of 3-phase electricity, the accessory contains a service per phase showing _Power_, _Current_, and _Voltage_.\n\n### Prerequisites\nYou need a smart meter that provides a P1 port that complies to DSMR (currently DSMR 5.0, DSMR 4.2, and DSMR 2.2+ are tested).\u003cbr\u003e\nThe companies maintaining the electricity and natural gas networks in the Netherlands, united in [Netbeer Nederland](https://www.netbeheernederland.nl) are [replacing](https://www.onsenergie.net/slimme-meter/) existing electricity and gas meters with smart meters.\nIn my home, they installed a [Landys +Gyr E350 (ZCF1100)](https://www.landisgyr.eu/product/landisgyr-e350-electricity-meter-new-generation/).\u003cbr\u003e\nSmart meters in [Flandres (Belgium)](https://www.fluvius.be/sites/fluvius/files/2019-12/e-mucs_h_ed_1_3.pdf), Luxembourg, and [Sweden](https://hanporten.se/svenska/protokollet/) might provide a P1 port as well.\nI don't know about the rollout plans in those countries.\nOne Flandres installation is reported working, see [#47](https://github.com/ebaauw/homebridge-p1/issues/47); one Swedish installation is reported not working, see [#50](https://github.com/ebaauw/homebridge-p1/issues/50).\n\nYou need a cable to connect the smart meter's P1 port to a USB port.\nI got mine [here](https://www.sossolutions.nl/slimme-meter-kabel), but you could also make one yourself, as described [here](http://gejanssen.com/howto/Slimme-meter-uitlezen/).\nThe cable is quite short (~1m) but you can extend it using a regular USB extension cable (female-A to A).\n\nYou need a server to run Homebridge.\nThis can be anything running [Node.js](https://nodejs.org): from a Raspberry Pi, a NAS system, or an always-on PC running Linux, macOS, or Windows.\nSee the [Homebridge Wiki](https://github.com/homebridge/homebridge/wiki) for details.\nI run Homebridge P1 on a Raspberry Pi 3B+.\n\nNote that Homebridge P1 uses the [`serialport`](https://github.com/serialport/node-serialport) package to connect to the P1 cable.\nThis package uses some non-JavasScript addons, that need to be compiled while installing Homebridge P1.\nThe server running Homebridge P1 needs to have the appropriate development tools installed.\n\nThe user running Homebridge needs privileges to list the serial port devices and to open the serial port device for the P1 cable.\nUnder Raspbian, user `pi` has these privileges by default.\nIf you run Homebridge under a different user, make sure it's member of the `dialout` group, and, for Buster, of the `gpio` group.\n\nTo interact with HomeKit, you need Siri or a HomeKit app on an iPhone, Apple Watch, iPad, iPod Touch, or Apple TV (4th generation or later).\nI recommend to use the latest released versions of iOS, watchOS, and tvOS.  \nPlease note that Siri and even Apple's [Home](https://support.apple.com/en-us/HT204893) app still provide only limited HomeKit support.\nTo use Homebridge P1, you want to check out some other HomeKit apps, like the [Eve](https://www.evehome.com/en/eve-app) app (free) or Matthias Hochgatterer's [Home+](https://hochgatterer.me/home/) app (paid).  \n\nAs HomeKit uses Bonjour to discover Homebridge, the server running Homebridge must be on the same subnet as your iDevices running HomeKit.\nFor remote access and for HomeKit automations, you need to setup an Apple TV (4th generation or later), HomePod, or iPad as [home hub](https://support.apple.com/en-us/HT207057).\n\n### Installation\nTo install Homebridge P1:\n- Follow the instructions on the [Homebridge Wiki](https://github.com/homebridge/homebridge/wiki) to install Node.js and Homebridge;\n- Install the Homebridge P1 plugin through Homebridge Config UI X or manually by:\n  ```\n  $ sudo npm -g i homebridge-p1 --unsafe-perm\n  ```\n- Edit `config.json` and add the `P1` platform provided by Homebridge P1, see [**Configuration**](#configuration).\n\n### Configuration\nHomebridge P1 should detect the USB serial cable automatically.\nIn case it doesn't or when you have multiple USB serial devices, you can specify the serialport in config.json:\n```json\n\"platforms\": [\n  {\n    \"platform\": \"P1\",\n    \"serialport\": \"/dev/ttyUSB0\"\n  }\n]\n```\nIf Homebridge P1 doesn't receive any data and you have a meter with an older DSMR version, you might need to specify:\n```json\n\"platforms\": [\n  {\n    \"platform\": \"P1\",\n    \"serialport\": \"/dev/ttyUSB0\",\n    \"dsmr22\": true\n  }\n]\n```\nIf Homebridge P1 receives data too late (i.e. after the Homebridge server has started) no accessories will be exposed to HomeKit.\nIn this case, set `\"timeout\"` in config.json and restart Homebridge.\nThis parameter specifies the number of seconds Homebridge P1 waits for data, before giving up and letting Homebridge startup continue without any P1 accessories.\nNote that accessories from other plugins will not be reachable while Homebridge P1 waits for data, so you want to set `\"timeout\"` as low as possible, while keeping in mind a telegram might be lost due to communication glitches.\nThe default of `\"timeout\": 5` assumes the meter sends a telegram every second.  DSMR v2.2 meters only send a telegram every 10 seconds, so when `\"dsmr22\": true` is set, a default `\"timeout\": 50` is used.\n\n### Caveats\nHomebridge P1 is a hobby project of mine, provided as-is, with no warranty whatsoever.  I've been running it successfully at my home for years, but your mileage might vary.\n\nThe HomeKit terminology needs some getting used to.\nAn _accessory_ more or less corresponds to a physical device, accessible from your iOS device over WiFi or Bluetooth.\nA _bridge_ (like Homebridge) is an accessory that provides access to other, bridged, accessories.\nAn accessory might provide multiple _services_.\nEach service corresponds to a virtual device (like a lightbulb, switch, motion sensor, ..., but also: a programmable switch button, accessory information, battery status).\nSiri interacts with services, not with accessories.\nA service contains one or more _characteristics_.\nA characteristic is like a service attribute, which might be read or written by HomeKit apps.\nYou might want to checkout Apple's [HomeKit Accessory Simulator](https://developer.apple.com/documentation/homekit/testing_your_app_with_the_homekit_accessory_simulator), which is distributed as an additional tool for `Xcode`.\n\nExposing the smart meter to HomeKit is a bit of a hack, lacking proper HomeKit support for smart meters.  Also, Eve lacks proper support for gas consumption.  The following limitations apply:\n- The Electricity consumption is the combined consumption under Normal and Low tariff.  If you have a dual-tariff contract, the cost computed by Eve will be inaccurate;\n- The Gas consumption is actually in m³, but Eve displays kWh.  If Homebridge P1 would expose different characteristics for gas consumption, Eve would display the correct units, but not the history.  To see the correct cost for Gas, you need to change the _Energy Cost_ under _Settings_ in Eve to match you Gas rate;\n- Eve doesn't take into account fixed (subscription) costs, so the cost displayed is only the variable cost.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febaauw%2Fhomebridge-p1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febaauw%2Fhomebridge-p1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febaauw%2Fhomebridge-p1/lists"}