This repository builds the OpenClaw Assistant (DEV) Home Assistant add-on. The add-on packages OpenClaw + nginx + ttyd and manages startup/configuration glue.
- Add-on root metadata/docs:
README.mdDOCS.mdSECURITY.mdrepository.yaml
- Runtime implementation (all add-on behavior lives here):
openclaw_assistant_dev/run.sh(PID 1 orchestrator)openclaw_assistant_dev/oc_config_helper.py(safe JSON config edits)openclaw_assistant_dev/render_nginx.py(template rendering)openclaw_assistant_dev/nginx.conf.tplopenclaw_assistant_dev/landing.html.tplopenclaw_assistant_dev/config.yaml(HA options + schema)openclaw_assistant_dev/translations/*.yaml(all locale UI strings)openclaw_assistant_dev/Dockerfileopenclaw_assistant_dev/CHANGELOG.md
- Fix root causes, not symptoms.
- Keep edits surgical; do not refactor unrelated code.
- Never introduce insecure defaults.
- Never log secrets or auth tokens.
- Keep behavior backward-compatible unless the change explicitly requires a migration.
When adding/changing any add-on option, update all of the following in one change:
openclaw_assistant_dev/config.yamloptions:defaultschema:validation entry- comments/help text
openclaw_assistant_dev/translations/en.yamlopenclaw_assistant_dev/translations/bg.yamlopenclaw_assistant_dev/translations/de.yamlopenclaw_assistant_dev/translations/es.yamlopenclaw_assistant_dev/translations/pl.yamlopenclaw_assistant_dev/translations/pt-BR.yamlDOCS.mdconfiguration reference / troubleshooting if user-facingopenclaw_assistant_dev/CHANGELOG.md
If any of these are skipped, the UX becomes inconsistent in HA.
run.shruns withset -euo pipefail; avoid constructs that fail unexpectedly underset -e.- Validate all user-provided values from
/data/options.jsonbefore injecting into shell/nginx/openclaw config. - Keep
run.shidempotent on restart (multiple starts must not corrupt state). - Treat
/config/as persistent state; never wipe user data unless explicitly requested.
- OpenClaw v2026.2.22+ redacts sensitive values in
openclaw config get.- For token retrieval guidance, prefer:
jq -r '.gateway.auth.token' /config/.openclaw/openclaw.json.
- For token retrieval guidance, prefer:
trusted-proxymode may reject direct local CLI WS calls (trusted_proxy_user_missing); document this clearly instead of hiding it.- For
lan_httpscertificate logic, keep SAN generation deterministic and regeneration-triggered on SAN/IP changes.
- If adding placeholders in
landing.html.tplornginx.conf.tpl, updaterender_nginx.pyin the same change. - If landing-page guidance changes (commands/errors), sync corresponding troubleshooting text in
DOCS.md.
- User-visible changes should update:
openclaw_assistant_dev/CHANGELOG.mdopenclaw_assistant_dev/config.yamlversion
- Keep changelog entries user-facing and action-oriented.
- Shell: POSIX-friendly Bash, explicit quoting, descriptive variable names.
- Python: small focused helpers, explicit error handling, no hidden side effects.
- YAML/Markdown: preserve existing style and structure.
- Avoid adding dependencies unless necessary.
From repo root:
bash -n openclaw_assistant_dev/run.sh
python3 -m py_compile openclaw_assistant_dev/oc_config_helper.py
python3 -m py_compile openclaw_assistant_dev/render_nginx.pyFor option changes:
- verify
config.yamloption + schema + all translations exist - verify
DOCS.mdmatches current behavior
For startup/auth/proxy/cert changes:
- verify log messages remain clear and actionable
- verify
landing.html.tplinstructions match actual commands
- Group related changes only.
- Do not include unrelated formatting churn.
- Do not edit generated/cache folders (
__pycache__, temporary outputs).