Add WS-based pairing flow, replacing config.json with token file
Replace the static config.json with a dynamic pairing flow: the TV shows a 6-digit PIN, the user enters it on the HA pairing web page, and the TV polls for the provisioned token. On success the token is persisted and the WS connection fetches entity config via luma/get_config. New modules: - ha_token: atomic read/write/remove of HA credentials file - ha_pairing: background HTTP poll service with getrandom PIN generation Key changes: - Settings UI: new HA section with URL entry, connect/disconnect, PIN display - ha_client: WS config fetch (luma/get_config), Option<u64> pending tracking - main.rs: token-based startup, pairing effects consolidated into effects() - renderer: cached GL uniform locations (u_aa, u_texture, u_clip_rounded, u_clip_radius, u_edge_fade) — no more per-batch GetUniformLocation calls - view.rs: extracted card_glow() helper, slider_card_target() method - Pairing thread detached (no join in Drop) to avoid blocking the render loop Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
483b19f286
commit
ba4a5d2346
13 files changed
+928
-280
No files matched your search
@@ -1254,5 +1254,77 @@
|
||||
"zh": "滚动测试卡片,没有可启动的应用。",
|
||||
"pt": "Card de teste para rolagem; não abre nenhum app.",
|
||||
"it": "Scheda di test per lo scorrimento; nessuna app da avviare."
|
||||
},
|
||||
"homeAssistant": {
|
||||
"en": "Home Assistant",
|
||||
"de": "Home Assistant",
|
||||
"es": "Home Assistant",
|
||||
"zh": "Home Assistant",
|
||||
"pt": "Home Assistant",
|
||||
"it": "Home Assistant"
|
||||
},
|
||||
"haServerUrl": {
|
||||
"en": "Server URL",
|
||||
"de": "Server-URL",
|
||||
"es": "URL del servidor",
|
||||
"zh": "服务器地址",
|
||||
"pt": "URL do servidor",
|
||||
"it": "URL del server"
|
||||
},
|
||||
"haConnect": {
|
||||
"en": "Connect",
|
||||
"de": "Verbinden",
|
||||
"es": "Conectar",
|
||||
"zh": "连接",
|
||||
"pt": "Conectar",
|
||||
"it": "Connetti"
|
||||
},
|
||||
"haDisconnect": {
|
||||
"en": "Disconnect",
|
||||
"de": "Trennen",
|
||||
"es": "Desconectar",
|
||||
"zh": "断开",
|
||||
"pt": "Desconectar",
|
||||
"it": "Disconnetti"
|
||||
},
|
||||
"haConnected": {
|
||||
"en": "Connected",
|
||||
"de": "Verbunden",
|
||||
"es": "Conectado",
|
||||
"zh": "已连接",
|
||||
"pt": "Conectado",
|
||||
"it": "Connesso"
|
||||
},
|
||||
"haPairing": {
|
||||
"en": "Pairing",
|
||||
"de": "Koppeln",
|
||||
"es": "Emparejando",
|
||||
"zh": "配对中",
|
||||
"pt": "Emparelhando",
|
||||
"it": "Associazione"
|
||||
},
|
||||
"haPairingPin": {
|
||||
"en": "Enter this PIN on your pairing page",
|
||||
"de": "Diesen PIN auf der Kopplungsseite eingeben",
|
||||
"es": "Introduzca este PIN en la página de emparejamiento",
|
||||
"zh": "在配对页面输入此PIN码",
|
||||
"pt": "Insira este PIN na página de emparelhamento",
|
||||
"it": "Inserisci questo PIN nella pagina di associazione"
|
||||
},
|
||||
"haWaiting": {
|
||||
"en": "Waiting for pairing…",
|
||||
"de": "Warten auf Kopplung…",
|
||||
"es": "Esperando emparejamiento…",
|
||||
"zh": "等待配对…",
|
||||
"pt": "Aguardando emparelhamento…",
|
||||
"it": "In attesa di associazione…"
|
||||
},
|
||||
"haUrlHint": {
|
||||
"en": "e.g. https://ha.example.org",
|
||||
"de": "z.B. https://ha.example.org",
|
||||
"es": "p. ej. https://ha.example.org",
|
||||
"zh": "例如 https://ha.example.org",
|
||||
"pt": "ex. https://ha.example.org",
|
||||
"it": "es. https://ha.example.org"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user