AlexxIT/go2rtc · warning
no hass config
Error message
no hass config
What it means
When go2rtc runs inside Home Assistant OS, it imports camera entities from the Hass storage file .storage/core.config_entries. If importConfig fails (config path not set/incorrect, file missing, or invalid JSON), the api/hass endpoint is registered as a stub that always returns "no hass config" with 404, since no Hass entities can be listed.
Solutions
- Set hass: config: in go2rtc.yaml to the directory containing Home Assistant's .storage/core.config_entries (e.g. /config)
- Verify the file .storage/core.config_entries exists and is readable by go2rtc
- Check the trace log line "[hass] can't import config: ..." for the underlying cause (file vs JSON error)
- If running outside Hass OS, don't rely on /api/hass — define streams manually in go2rtc.yaml instead
Example fix
# before go2rtc.yaml without hass section -> GET /api/hass 404 "no hass config" # after hass: config: /config # -> GET /api/hass 200 with camera entities
Defensive patterns
Strategy: fallback
Validate before calling
// check endpoint availability before using
const res = await fetch('/api/hass');
if (res.status === 404) {
// "no hass config" — fall back to manual stream config
} Try / catch
const res = await fetch('/api/hass');
if (res.status === 404 && (await res.text()).includes('no hass config')) {
console.warn('go2rtc hass integration not configured; configure hass: config: path');
} Prevention
- Set hass: config: in go2rtc.yaml to the HA config directory when running as an add-on
- Verify .storage/core.config_entries exists and is readable
- Don't rely on /api/hass in standalone go2rtc installs outside Hass OS
- Check trace logs for "can't import config" to diagnose the import failure early
When it happens
Trigger: Requesting GET /api/hass when the hass: config section is missing from go2rtc.yaml, or its config path doesn't point to the Home Assistant config directory containing .storage/core.config_entries.
Common situations: Running go2rtc standalone (not as a Hass add-on) where /config/.storage doesn't exist; wrong hass: config: path; Home Assistant storage file corrupted or unreadable due to permissions; fresh install where no camera integrations exist yet.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- api.StreamNotFound
- config file disabled
- exec: rtsp module disabled
- homekit: can't work without SRTP server
- res.Status
AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07).
Data as JSON: /api/errors/83a9d9c697159840.
Report an issue: GitHub.
Appendix: source
Thrown at internal/hass/hass.go:64
return location + "#" + rawQuery, nil
}
return location, nil
}
return "", nil
})
streams.HandleFunc("hass", func(source string) (core.Producer, error) {
// support hass://supervisor?entity_id=camera.driveway_doorbell
return hass.NewClient(source)
})
// load static entries from Hass config
if err := importConfig(conf.Mod.Config); err != nil {
log.Trace().Msgf("[hass] can't import config: %s", err)
api.HandleFunc("api/hass", func(w http.ResponseWriter, _ *http.Request) {
http.Error(w, "no hass config", http.StatusNotFound)
})
return
}
api.HandleFunc("api/hass", func(w http.ResponseWriter, _ *http.Request) {
once.Do(func() {
// load WebRTC entities from Hass API, works only for add-on version
if token := hass.SupervisorToken(); token != "" {
if err := importWebRTC(token); err != nil {
log.Warn().Err(err).Caller().Send()
}
}
})
var items []*api.Source
for name, url := range entities {
items = append(items, &api.Source{
Name: name, URL: "hass:" + name, Location: url,View on GitHub (pinned to c245815e75)