Hi everyone! ![]()
I’d like to share an open-source project I’ve been developing: Codex for Home Assistant—an HAOS Add-on that brings OpenAI Codex directly inside your Home Assistant OS server!
Why build this?
Like many of you, I’ve used external LLMs (like ChatGPT or Claude) to write YAML automations and custom Lovelace dashboards. However, external AI tools always hit the same limit:
-
They lack real-time context: They don’t know your exact entity IDs or current sensor states.
-
No empirical testing: They generate code, but you still have to manually copy-paste, check
ha-config-check, review Core logs, and test whether a Lovelace layout breaks on mobile screens.
I wanted an AI assistant that doesn’t just write code, but actually operates, verifies, and tests automations and UI natively inside HAOS.
Key Features
- Native
/configAccess & Real-Time Log Diagnostics
-
Runs as an isolated container inside HAOS with direct access to your
/configenvironment. -
Reads Core/Supervisor logs, runs
ha-config-checkautomatically, and pinpoints exact root causes (e.g., entity mismatches, SmartThings transition bugs) before proposing clean git diffs.
- Built-in Headless Browser & UI Rendering Verification
-
Equipped with Playwright and headless Chromium.
-
Codex tests your Lovelace dashboards across desktop (1440x900) and mobile (e.g., iPhone 16 Pro 402x874) viewports to verify layout bounds, button overlaps, and browser console/network errors.
- Interactive Decision UI
- For complex or sensitive tasks (like presence detection refactoring or breaking changes), Codex presents interactive decision modals rather than acting unilaterally, allowing you to approve options safely.
- ChatGPT Mobile Remote (SSH Public Key Support)
- Includes an internal SSH server with
authorized_keyssupport. You can connect your smartphone’s ChatGPT Mobile Remote directly to the HAOS Codex app-server for on-the-go management via VPN.
Quick Installation
You can add the repository to your Home Assistant Supervisor with one click:
Manual Repository URL:
https://github.com/Kanu-Coffee/codex-for-home-assistant
1. Go to **Settings → Apps → App store → Repositories** (top right) and add the URL above.
2. Install **Codex for Home Assistant** (AMD64 architecture).
3. Open **WEB UI** and run `ha-codex-login` to complete authentication, then launch `ha-codex`.
---
### 📌 GitHub Repository & Documentation
* **GitHub Repository:** [Kanu-Coffee/codex-for-home-assistant](https://github.com/Kanu-Coffee/codex-for-home-assistant)
* **Stage:** `experimental` / `amd64` architecture support
I created this tool to make my own smart home setup more reliable, and I'd love to get your thoughts, feedback, or suggestions! Feel free to ask any questions below.
Thanks! 🙌