[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80148":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":13,"rankGlobal":10,"rankLanguage":10,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":17,"hasPages":17,"topics":19,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":13,"starSnapshotCount":13,"syncStatus":15,"lastSyncTime":28,"discoverSource":29},80148,"gatekeeper-ha","rusty4444\u002Fgatekeeper-ha","rusty4444","QR-code-based temporary guest access for Home Assistant.","",null,"Python",54,0,52,2,"MIT License",false,"main",[20,21,22,23,24],"guest-access","home-assistant","home-automation","lovelace","qr-code","2026-06-12 02:03:58","\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Flogo.png\" alt=\"Gatekeeper HA\" width=\"320\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">Gatekeeper HA\u003C\u002Fh1>\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fbuymeacoffee.com\u002Frusty4\" target=\"_blank\">\n    \u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fv2\u002Fdefault-yellow.png\" alt=\"Buy Me A Coffee\" height=\"50\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\n\n\u003Cp align=\"center\">\u003Cstrong>QR-code-based temporary guest access for Home Assistant.\u003C\u002Fstrong>\u003C\u002Fp>\n\nA native custom integration + Lovelace card that lets you generate time-limited, scoped guest tokens and serve them via a standalone guest page — no app install required. The [Lovelace card lives in its own repo](https:\u002F\u002Fgithub.com\u002Frusty4444\u002Fgatekeeper-card).\n\n## Features\n\n- **🔑 Scoped guest tokens** — generate time-limited URLs that grant access only to specific entities, domains, and services\n- **📱 Standalone guest page** — guests just scan a QR code or open a link. No HA login, no app install\n- **⏱️ Auto-expiry** — tokens expire after a configured duration. Use limits also supported\n- **🛡️ Guest mode** — toggle a full guest mode that disables selected automations and revokes all tokens on exit\n- **📋 Admin Lovelace card** — create\u002Frevoke tokens, see remaining time, display QR code, toggle guest mode — all from a card on your dashboard\n- **🧩 Automation blueprints** — shipped with doorbell → auto-token, token expiry alert, and lock-code → guest mode blueprints\n- **⚙️ Fully UI-configurable** — set up via Settings → Devices & Services, no YAML editing\n\n## Preview\n\n![Gatekeeper HA Screenshot](docs\u002Fscreenshot.png)\n\n## Quick Start\n\n### 1. Install via HACS\n\nGatekeeper HA is not yet in the default HACS store. For now:\n\n1. Add as a **Custom Repository** in HACS:\n   - URL: `https:\u002F\u002Fgithub.com\u002Frusty4444\u002Fgatekeeper-ha`\n   - Category: Integration\n2. Download the integration\n3. Restart Home Assistant\n\n### 2. Install the Lovelace Card\n\nThe [Gatekeeper Guest Portal card](https:\u002F\u002Fgithub.com\u002Frusty4444\u002Fgatekeeper-card) is distributed from its own repository, with independent versioning and releases.\n\n1. Go to HACS → Frontend → Custom Repositories\n2. Add: `https:\u002F\u002Fgithub.com\u002Frusty4444\u002Fgatekeeper-card`\n3. Category: Lovelace\n4. Search for **Gatekeeper Guest Portal** and install\n5. Add the resource: `\u002Fhacsfiles\u002Fgatekeeper-card\u002Fgatekeeper-card.js` (Type: JavaScript Module)\n6. Add card to any dashboard: `type: custom:gatekeeper-card`\n\nFor full card documentation, see the [gatekeeper-card repo](https:\u002F\u002Fgithub.com\u002Frusty4444\u002Fgatekeeper-card).\n\n### 3. Configure\n\n1. Go to **Settings → Devices & Services → Add Integration**\n2. Search for \"Gatekeeper HA\"\n3. Configure the guest page port (default: 8921) and default token expiry\n4. The card will appear in your Lovelace card picker\n\n### 4. Share access\n\n1. From the Gatekeeper card, tap **+ New Token**\n2. Set a label (e.g. \"Plumber Wednesday\"), scope (e.g. `lock.*`, `light.*`), and duration\n3. The card shows a QR code — screenshot it, or copy the guest URL\n4. Guest opens the link and gets a simple page with the controls you allowed\n\n## Configuration\n\nAll configuration is via the UI. Go to **Settings → Devices & Services → Gatekeeper HA → Configure**.\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| Guest page port | 8921 | Port for the standalone guest web page |\n| Default token expiry | 24h | Default hours for new guest tokens |\n| Auto-disable after | 48h | Auto-disable guest mode after N hours (0 = manual) |\n\n## Blueprints\n\nThree automation blueprints are bundled in `\u002Fblueprints\u002F`:\n\n| Blueprint | What it does |\n|-----------|-------------|\n| `guest_arrived.yaml` | Someone rings the doorbell → auto-creates a 4-hour token, sends it to your phone |\n| `token_expiry_alert.yaml` | Every 15 minutes checks if any token is near expiry → sends alert |\n| `guest_mode_lock.yaml` | Guest enters a specific lock code → activates guest mode with auto-disable |\n\n## Architecture\n\n```\nCustom integration (custom_components\u002Fgatekeeper\u002F)\n├── token_manager.py      # Token CRUD, bcrypt hashing, expiry engine\n├── guest_mode.py         # State machine, automation snapshot\u002Frestore\n├── auth_proxy.py         # Standalone asyncio HTTP server (guest page + proxy)\n├── config_flow.py        # Full UI-based setup\n├── services.yaml         # 6 HA services (create\u002Frevoke token, activate\u002Fdeactivate mode, etc.)\n└── ...\n\nLovelace card — see [rusty4444\u002Fgatekeeper-card](https:\u002F\u002Fgithub.com\u002Frusty4444\u002Fgatekeeper-card)\n├── src\u002Findex.js          # LitElement card — admin panel, QR display, token management\n└── ...\n\nBlueprints (blueprints\u002F)\n├── guest_arrived.yaml\n├── token_expiry_alert.yaml\n└── guest_mode_lock.yaml\n```\n\n## Security\n\n- Guest tokens never expose the raw secret in logs (hashed with bcrypt)\n- The guest page runs on a separate port (configurable, defaults to 8921)\n- All scope enforcement happens server-side — the guest's JS never overrides permissions\n- Token IDs are generated with `secrets.token_urlsafe(32)`\n- Tokens can be use-limited (N API calls) in addition to time-limited\n- Guest mode snapshots automations on activate and restores them on deactivate\n\n## Guest Proxy & Reverse Proxy\n\nThe guest page is served by a lightweight HTTP server embedded in the integration, bound to `0.0.0.0:8921` by default (reachable from any device on your LAN). This is required for the QR-code flow — guests scan the code from their phone.\n\n**If you run HA behind a reverse proxy** (Nginx, Caddy, Traefik, etc.) and only want the guest page accessible through that proxy:\n\n1. Set the guest port to a high local-only port (e.g. 58921) in **Settings → Devices & Services → Gatekeeper HA → Configure**\n2. Add a location block in your proxy config pointing to `http:\u002F\u002F127.0.0.1:58921`\n3. Restrict with your proxy's usual auth \u002F IP allowlist rules\n\nThe bind host can also be changed to `127.0.0.1` via [the options flow](#configuration) if you do not want it exposed on the LAN directly.\n\n## Development\n\n```bash\n# Clone\ngit clone https:\u002F\u002Fgithub.com\u002Frusty4444\u002Fgatekeeper-ha\ncd gatekeeper-ha\n\n# Install test deps\npip install -r requirements-dev.txt\n\n# Run tests\npytest tests\u002F\n\n# Build Lovelace card (separate repo)\ngit clone https:\u002F\u002Fgithub.com\u002Frusty4444\u002Fgatekeeper-card\ncd gatekeeper-card && npm install && npm run build\n```\n\n## Requirements\n\n- Home Assistant 2025.8.0+\n- Python 3.12+\n\nThis project was developed with the assistance of AI tools.\n\n## License\n\nMIT\n","Gatekeeper HA 是一个基于二维码的临时访客访问解决方案，专为Home Assistant设计。它允许用户生成限时、限定范围的访客令牌，并通过独立的访客页面提供访问，无需安装任何应用程序。核心功能包括生成具有时间限制和特定权限的URL、自动生成二维码供访客扫描进入、自动过期机制以及通过Lovelace卡片进行管理等。此外，还支持通过自动化蓝图实现门铃触发自动令牌生成等功能。该项目非常适合需要临时给予访客有限制的家庭自动化系统访问权限的场景，如家庭聚会时让客人控制特定智能家居设备。","2026-06-11 03:59:26","CREATED_QUERY"]