{"id":30503560,"url":"https://github.com/robertoschwald/homebridge-obis-powermeter","last_synced_at":"2025-08-25T13:03:47.651Z","repository":{"id":189915093,"uuid":"681566430","full_name":"robertoschwald/homebridge-obis-powermeter","owner":"robertoschwald","description":"Homebridge plugin to read OBIS SmartMeter data","archived":false,"fork":false,"pushed_at":"2025-08-24T06:57:02.000Z","size":225,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-24T13:52:53.077Z","etag":null,"topics":["homebridge","homekit","infrared-decoder","infrared-reader","obis","serial-communication","smartmeter","sml"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/robertoschwald.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-22T09:38:01.000Z","updated_at":"2025-08-24T06:57:05.000Z","dependencies_parsed_at":"2024-06-13T10:27:48.514Z","dependency_job_id":"ddf6272e-b29e-4bee-b07b-aad596d9e271","html_url":"https://github.com/robertoschwald/homebridge-obis-powermeter","commit_stats":null,"previous_names":["robertoschwald/homebridge-sml","robertoschwald/homebridge-obis-powermeter"],"tags_count":2,"template":false,"template_full_name":"homebridge/homebridge-plugin-template","purl":"pkg:github/robertoschwald/homebridge-obis-powermeter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoschwald%2Fhomebridge-obis-powermeter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoschwald%2Fhomebridge-obis-powermeter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoschwald%2Fhomebridge-obis-powermeter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoschwald%2Fhomebridge-obis-powermeter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertoschwald","download_url":"https://codeload.github.com/robertoschwald/homebridge-obis-powermeter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertoschwald%2Fhomebridge-obis-powermeter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271923714,"owners_count":24844239,"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-24T02:00:11.135Z","response_time":111,"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":["homebridge","homekit","infrared-decoder","infrared-reader","obis","serial-communication","smartmeter","sml"],"created_at":"2025-08-25T13:02:27.936Z","updated_at":"2025-08-25T13:03:47.637Z","avatar_url":"https://github.com/robertoschwald.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://img.shields.io/npm/v/homebridge-obis-powermeter)](https://www.npmjs.com/package/homebridge-obis-powermeter)\n[![npm downloads](https://img.shields.io/npm/dm/homebridge-obis-powermeter)](https://www.npmjs.com/package/homebridge-obis-powermeter)\n[![GitHub release](https://img.shields.io/github/v/release/robertoschwald/homebridge-obis-powermeter?display_name=tag\u0026sort=semver)](https://github.com/robertoschwald/homebridge-obis-powermeter/releases)\n[![Build](https://github.com/robertoschwald/homebridge-obis-powermeter/actions/workflows/npm-publish.yml/badge.svg?branch=main)](https://github.com/robertoschwald/homebridge-obis-powermeter/actions/workflows/npm-publish.yml)\n\n# Homebridge OBIS Powermeter\n\nA Homebridge plugin to read OBIS smart meter values.\n\n\u003cimg alt=\"Plugin Icon\" src=\"doc/icon.svg\" width=\"100\" height=\"100\" /\u003e\n\n![Supported devices and wiring](doc/devices.jpg)\n\nFeatures\n- Power Consumption: net import power (W)\n- Power Return (optional): export power (W). Hidden by default\n- Voltage L1/L2/L3: per‑phase voltages (V)\n- Energy Import (Total, kWh): cumulative imported energy\n\nTested with ZPA power meter. Feedback for other models (Landis+Gyr, Elster, Itron, …) is welcome. D0 should theoretically work, but is currently untested — please report issues if you try it.\n\n## Requirements\n- Node.js \u003e= 20\n- Homebridge \u003e= 1.8.0\n- A supported SML/D0 interface on your meter (e.g. IR head via USB)\n\n## Install\n```bash\nnpm i -g homebridge-obis-powermeter\n```\n\n## Configure\nUse the Homebridge UI (recommended) or edit config.json. Platform name is OBIS.\n\nMinimal example:\n```json\n{\n  \"platform\": \"OBIS\",\n  \"serialPort\": \"/dev/ttyUSB0\"\n}\n```\n\nFull example with options:\n```json\n{\n  \"platform\": \"OBIS\",\n  \"serialPort\": \"/dev/ttyUSB0\",\n  \"protocol\": \"SmlProtocol\",\n  \"serialBaudRate\": 9600,\n  \"serialDataBits\": 8,\n  \"serialStopBits\": 1,\n  \"serialParity\": \"none\",\n  \"pollInterval\": 60,\n  \"hidePowerConsumptionDevice\": false,\n  \"hidePowerReturnDevice\": true,\n  \"debugLevel\": 0\n}\n```\nNotes:\n- Power Return is hidden by default. Set hidePowerReturnDevice to false to show it.\n- Voltage sensors (L1/L2/L3) are always enabled.\n- protocol can be SmlProtocol (default) or D0Protocol.\n- You can also set OBIS_DEBUG=0|1|2 in the child bridge environment for extra logs.\n\n## What values are shown?\nThe plugin computes net active power (in watts) and feeds it to two accessories:\n- Power Consumption displays net power when \u003e 0 (import).\n- Power Return displays the absolute value when net \u003c 0 (export).\n\nPriority of OBIS sources (first available wins):\n1) 1-0:16.7.0 (or 1-0:16.7.0*255) — total instantaneous active power\n2) 1-0:1.7.0 (import) minus 1-0:2.7.0 (export)\n3) Sum of per-phase import (21.7.0/41.7.0/61.7.0) minus export (22.7.0/42.7.0/62.7.0)\n4) Sum of 36.7.0/56.7.0/76.7.0 as a fallback\n\nVoltage sensors map directly to:\n- L1: 1-0:32.7.0*255\n- L2: 1-0:52.7.0*255\n- L3: 1-0:72.7.0*255\n\nEnergy totals map directly to:\n- Import total (kWh): 1-0:1.8.0*255 (fallback 1-0:1.8.0)\n\nUnits: kW -\u003e W for power, kV -\u003e V for voltage, Wh -\u003e kWh for energy when needed; otherwise values are used as-is.\n\nHomeKit service used: CurrentAmbientLightLevel (Light Sensor). Values are always \u003e= 0.0001 as required by HomeKit. Accessories are categorized as SENSOR to avoid bulb icons in some clients.\n\n### Display precision (Home app)\nApple’s Home app heavily rounds Light Sensor values at higher magnitudes. For example, a meter reading of 1-0:1.8.0*255 like 11165.0976 kWh can display as 11200. The precise value is still written to the characteristic; use apps like Eve or Home+ to see raw readings.\n\n## Troubleshooting\n- Serial device not found: verify the serialPort path (prefer /dev/serial/by-id on Linux) and permissions.\n- No readings / timeouts: confirm protocol matches your meter; try increasing pollInterval; check logs.\n- D0 meters: you may need different baud rate/parity according to your device.\n- Debugging: set debugLevel to 1 or 2 or use OBIS_DEBUG env var on the child bridge.\n- Icon looks wrong: remove cached accessories in Homebridge UI and restart Homebridge.\n\n## Development\n- Build: `npm run build`\n- Watch \u0026 link for Homebridge dev: `npm run watch`\n- Tests: `npm test`\n\nProject structure:\n- src/Platform.ts — platform and meter reading\n- src/Accessories/PowerConsumption.ts — consumption accessory\n- src/Accessories/PowerReturn.ts — export accessory (optional)\n- src/Accessories/VoltageSensor.ts — per-phase voltage accessories\n- src/Accessories/EnergyImport.ts — total energy import (kWh)\n\n## Roadmap\n- [ ] [Get certified by Homebridge team](https://github.com/homebridge/plugins/issues/864#issuecomment-3193759718)\n- [ ] Support History for power consumption/return (Eve app)\n- [ ] Support D0 protocol (untested)\n- [ ] Add more OBIS sources if needed\n- [ ] Improve error handling and logging\n- [ ] Support for other transports if needed (TCP/IP, LocalFile, StdIn)\n- [ ] Support of JsonEfrProtocol for EFR Smart Grid Hub (JSON)\n- [ ] Multiple meters (e.g. multiple serial ports)\n\n## License\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertoschwald%2Fhomebridge-obis-powermeter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertoschwald%2Fhomebridge-obis-powermeter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertoschwald%2Fhomebridge-obis-powermeter/lists"}