{"id":51127675,"url":"https://github.com/khmm12/ha-smd-key","last_synced_at":"2026-06-25T09:01:29.271Z","repository":{"id":358151826,"uuid":"1240243834","full_name":"khmm12/ha-smd-key","owner":"khmm12","description":"Home Assistant custom integration for SMD D-KEYS intercoms","archived":false,"fork":false,"pushed_at":"2026-05-15T23:36:14.000Z","size":183,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-16T02:14:56.358Z","etag":null,"topics":["custom-integration","hacs","home-assistant","homeassistant","intercom","smd"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/khmm12.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":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-15T23:15:53.000Z","updated_at":"2026-05-15T23:54:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/khmm12/ha-smd-key","commit_stats":null,"previous_names":["khmm12/ha-smd-key"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/khmm12/ha-smd-key","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khmm12%2Fha-smd-key","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khmm12%2Fha-smd-key/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khmm12%2Fha-smd-key/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khmm12%2Fha-smd-key/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khmm12","download_url":"https://codeload.github.com/khmm12/ha-smd-key/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khmm12%2Fha-smd-key/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34767548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"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":["custom-integration","hacs","home-assistant","homeassistant","intercom","smd"],"created_at":"2026-06-25T09:01:27.631Z","updated_at":"2026-06-25T09:01:29.265Z","avatar_url":"https://github.com/khmm12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMD D-KEYS\n\nHome Assistant custom integration for SMD / D-KEYS intercom accounts.\n\n## What This Does\n\n- Authenticates with the same phone + call-code flow used by the Android app.\n- Discovers the account's available doors.\n- Lets you choose which doors become Home Assistant entities.\n- Sends the reverse-engineered SMD open-door command.\n- Exposes live RTSP intercom video as Home Assistant `camera` entities when SMD advertises video for the selected door.\n- Starts Home Assistant reauthentication when SMD rejects the saved token.\n\nThe lock state is assumed. After a successful open command, the entity reports unlocked for the configured relock delay and then returns to locked. It is not a physical door contact or magnetic lock sensor.\n\n## Installation\n\n### HACS\n\n1. Open HACS.\n2. Open three-dot menu \u003e Custom repositories.\n3. Add this repository URL with category `Integration`.\n4. Install `SMD D-KEYS`.\n5. Restart Home Assistant.\n6. Add the integration from Settings \u003e Devices \u0026 services.\n\nThis repository is HACS-ready through `hacs.json`, `custom_components/smd_d_keys/manifest.json`, bundled brand assets, and the validation workflow in `.github/workflows/validate.yaml`.\n\n### Local Test Home Assistant\n\nFor fast local testing, run Home Assistant with Docker Compose from the repository root:\n\n```bash\ndocker compose up -d\n```\n\nOpen `http://localhost:8123`, complete the first-run wizard, then add `SMD D-KEYS` from Settings \u003e Devices \u0026 services.\n\nThe compose setup mounts:\n\n- `./custom_components/smd_d_keys` into Home Assistant as a read-only custom integration.\n- `./.local/homeassistant/config` as the local Home Assistant config directory.\n\nLocal Home Assistant runtime files under `.local/` are ignored by git.\n\nUseful commands:\n\n```bash\ndocker compose logs -f homeassistant\ndocker compose restart homeassistant\ndocker compose down\n```\n\n### Development Checks\n\nRun the same local checks expected before pushing:\n\n```bash\nuv run poe validate\n```\n\nThis runs formatting, linting, tests, and hassfest. To run only hassfest:\n\n```bash\nuv run poe hassfest\n```\n\n### Manual\n\nCopy `custom_components/smd_d_keys` into your Home Assistant `custom_components` directory and restart Home Assistant.\n\n## Configuration\n\n1. Enter the phone number used in the D-KEYS app.\n2. SMD will call your phone. Enter the last 6 digits of the caller number.\n3. Select the doors to expose in Home Assistant.\n\nManual token entry is intentionally not supported.\n\n## Options\n\n- `Doors`: which discovered doors should have lock/camera entities.\n- `Assumed relock delay`: seconds before the entity returns to locked after a successful open command.\n\n## Camera Support\n\nLive camera support uses the Android app's account-level `getVideo` and `getVideoBroadcastByProtocol` flow. The integration returns an RTSP source to Home Assistant; Home Assistant's stream stack and go2rtc can then restream it for dashboards and companion apps.\n\nThe current MVP is live-stream-only. Still images and thumbnails are not fetched from SMD yet.\n\nArchive playback, incoming video calls, WebRTC handling, and push-event handling are intentionally left for later iterations.\n\n## Troubleshooting\n\nIf the SMD token expires or is revoked, Home Assistant starts the integration reauthentication flow. Enter the phone number and call code again; selected doors and options are preserved.\n\nDiagnostics redact tokens, phone numbers, account IDs, selected door IDs, and command server URLs.\n\n## Reverse-Engineering Notes\n\nSanitized APK/API notes are in `docs/research/`. Binary APK/XAPK files, decompiled output, captured traffic, tokens, phone numbers, addresses, and real door identifiers must stay out of git.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhmm12%2Fha-smd-key","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhmm12%2Fha-smd-key","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhmm12%2Fha-smd-key/lists"}