Hi everyone,
I built HA ChatGPT Gateway, an open-source, self-hosted Docker gateway for connecting a personal ChatGPT GPT Action to Home Assistant.
The goal was to let a Custom GPT discover entities, inspect states, analyse selected history, and call authorised Home Assistant services — without giving the Home Assistant long-lived token to ChatGPT and without using an OpenAI API key.
Repository: GitHub - aferende/ha-chatgpt-gateway · GitHub
Latest release: Release v0.3.0 · aferende/ha-chatgpt-gateway · GitHub
How it works
ChatGPT GPT Action → public HTTPS → HA ChatGPT Gateway → local Home Assistant REST API
The Home Assistant token remains exclusively inside the gateway container. The GPT Action only receives a separate gateway API key.
Main features
- Docker / Docker Compose deployment, including NAS, Raspberry Pi, mini-PC and Linux server examples
- OpenAPI 3.1 schema designed for ChatGPT GPT Actions
- Entity and service discovery limited to authorised Home Assistant domains
- Explicit domain and entity allowlists
- Generic, policy-checked Home Assistant service calls rather than a transparent API proxy
- Optional
READ_ONLY=truemode - Areas, devices and entity discovery to help the GPT understand the home structure
- Bounded state-history endpoint for selected entities
- Automation configuration inspection with sensitive configuration values redacted
- Multi-architecture container images for amd64 and arm64
It is not a Home Assistant integration or an MCP server: it is a narrow REST gateway intended specifically for a personal GPT Action.
For safety, I recommend starting with a small whitelist of non-critical entities. Locks, alarm panels, gates, security scripts, NAS controls and similar devices should remain excluded unless there is a deliberate reason to expose them.
The project does not require an OpenAI API key. It does require a ChatGPT account/plan that supports GPT Actions and a publicly reachable HTTPS endpoint, typically via a reverse proxy or secure tunnel.
I would appreciate feedback on the security model, supported Home Assistant setups, documentation, and real-world use cases.