homecore-server
homecore-server is the alpha integration binary for HOMECORE. It runs one
shared state machine, event bus, service registry, REST/WebSocket API, optional
SQLite recorder, automation engine, intent endpoint, BFF gateway, and static
dashboard.
It is not a drop-in replacement for the complete Home Assistant API. The exact
implemented and deferred surfaces are listed in
docs/homecore-capabilities.md.
Security defaults
Authentication fails closed. Set one or more comma-separated bearer tokens:
--insecure-dev-auth explicitly allows any non-empty bearer token and must only
be used in an isolated development environment. The browser UI does not contain
a default token. Configure allowed browser origins with
HOMECORE_CORS_ORIGINS.
Runtime behavior
- SQLite recording is enabled by default at
sqlite://homecore.db. - Entity/device registries are restored from
.homecore/storagebefore recorder states, listeners, automations, and API startup. - The latest recorder state for each entity is restored deterministically.
Restored snapshots retain their timestamps and carry a
homecore.restorecontext marker; malformed rows are logged and isolated. - Synthetic entities are disabled by default; opt in with
--seed-demo-entities. - Automations can be loaded with
--automations <file>orHOMECORE_AUTOMATIONS. Ctrl-Cinitiates graceful HTTP shutdown and emitsHomeCoreStop.- The
ruvectorfeature enables the recorder's semantic index. - Plugin and HAP crates are libraries in this workspace, but this binary does not claim to load plugins or advertise a HomeKit server yet.
API
All API requests require Authorization: Bearer <token>.
Built-in executable services are homecore.ping,
homecore.snapshot_state, and turn_on/turn_off/toggle for the
homeassistant, light, and switch domains. Unsupported services are left
unregistered and return an error rather than a false acknowledgement.
Configuration
| Flag | Environment | Default |
|---|---|---|
--bind |
HOMECORE_BIND |
0.0.0.0:8123 |
--db |
HOMECORE_DB |
sqlite://homecore.db |
--storage-dir |
HOMECORE_STORAGE_DIR |
.homecore/storage |
--restore-limit |
HOMECORE_RESTORE_LIMIT |
100000 |
--location-name |
HOMECORE_LOCATION |
Home |
--automations |
HOMECORE_AUTOMATIONS |
unset |
--insecure-dev-auth |
HOMECORE_INSECURE_DEV_AUTH |
false |
--seed-demo-entities |
— | false |
--no-recorder |
— | false |
Validation