YLifeOnlyOnce/dsh-smarthome ↗★ 2
dsh-smarthome
Home Assistant control for DeepSeek Harness agents — read entity states, query history, and call services behind an approval gate.
AI 分析
该插件用于连接 DeepSeek Harness 智能体与 Home Assistant。适合需要通过 AI 智能体控制智能家居、查询设备状态及历史的用户,支持审批机制以保障服务调用安全。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:YLifeOnlyOnce/dsh-smarthomeドキュメント
README 全文を読む ↗⚙️ Configuration
Create a long-lived access token in Home Assistant: Profile → Security → Long-lived access tokens.
Override the plugin row in your profile's cordis.patch.yml (later layers win):
- id: smarthome
config:
baseUrl: http://192.168.1.10:8123 # your Home Assistant instance
token: '' # prefer tokenEnv over committing a token
tokenEnv: HOME_ASSISTANT_TOKEN # env var holding the token
timeoutMs: 15000
requireApproval: true # human approval for state-changing calls
allowedDomains: [] # e.g. ["light", "switch"]; empty = all domains
maxHistoryEvents: 200
wsEnabled: true # real-time events + area registry (WebSocket)
eventBufferSize: 50 # rolling ha_events buffer size
Then run dsh with the variable set:
HOME_ASSISTANT_TOKEN= dsh --profile web
baseUrl defaults to http://homeassistant.local:8123 (the standard Home Assistant mDNS host). If no token is configured the plugin still loads — every tool call fails with a clear "not configured" message instead of crashing the harness.
How the token is resolved
tokenEnv is a credential reference resolved through the harness's credential seam: when the credentials service is present, the value is read from its layered sources (process environment → /.env → $DSH_HOME/.env), falling back to process.env directly otherwise. The token is re-resolved per request / per socket connection, so a rotated credential reaches the very next call without a restart.