Help #612
Replies: 4 comments 2 replies
|
The missing piece is the integration database, not the Home Assistant recorder database. In the current setup path, If if face_recognition and person_gallery is None:
LOGGER.warning(
"Face recognition is enabled but person gallery is unavailable; "
"disabling face recognition for this entry."
)
face_recognition = FalseSo migrating Home Assistant recorder to Postgres can still leave the gallery unavailable. Recorder storage and the HGA gallery pool are separate concerns. The face service being healthy is also necessary, but it is downstream of the DAO; the DAO has to exist before I would check these in order:
There is also a probable bug in the service path you hit: If this points you to the HGA database/subentry rather than the recorder database, please mark the answer as solved. |
|
Your direct check lines up with the current code. I do not think the recorder database or the add-on discovery metadata is the main boundary here. In
If none of those are present, it returns The interesting source mismatch is that the repository already has So the fix surface looks like: from .flows.pgvector_db_subentry_flow import PgVectorDbSubentryFlow
...
return {
SUBENTRY_TYPE_DATABASE: PgVectorDbSubentryFlow,
SUBENTRY_TYPE_MODEL_PROVIDER: ModelProviderSubentryFlow,
...
}with The add-on's After that is wired, I would still validate the actual host value from the Home Assistant core container. The recommended defaults in the integration are |
|
Thanks for the thorough report, and thanks @yudin-s for the diagnosis — it is right on the mechanism. Let me fill in the piece that was missing. What creates the gallery: Why you cannot find it: "Database" is intentionally not one of the
The trap is that in Advanced mode the feature subentries are written before the Database step. If the wizard is closed at that step — for instance after a "cannot connect" error — you end up with all four features configured and no database, and the entry loads without complaint. That matches your description of the rebuild. Fix on your side:
What is a bug on my side: Please report back once the Database step is saved — if it still fails after that, post the |
|
@marvinludigkeit-cloud the fix for #615 is in PR #616 and will ship as v3.39.1 shortly. I can't reproduce your starting state on my own system (my entry has a database), so you are the ideal person to verify it in the field. Would you mind running through this once the release shows up in HACS? 1. Update to v3.39.1 with your entry still in its current state (no Database subentry, don't fix it first):
2. Then fix the configuration: + Setup → Advanced, click through the features, complete the Database setup form (
If step 2's Database form reports "cannot connect", that is the thing to chase and I'd like to hear about it — the repair issue is designed to clear as soon as the subentry exists, even if the connection fails, so please tell me what the entry's state is in that case. Thanks for the detailed report; it turned up a couple of things beyond your case (the repair issue would have fired on every fresh install, for one), all fixed in the same PR. |
Uh oh!
There was an error while loading. Please reload this page.
Title: Face recognition: “person gallery is unavailable” — enroll_person always fails with AttributeError: 'NoneType' object has no attribute 'enroll_from_image' (even after a complete reset including a Postgres recorder migration)
Description:
I can’t get face recognition working. On every startup, this warning appears:
WARNING (MainThread) [custom_components.home_generative_agent] Face recognition is enabled but person gallery is unavailable; disabling face recognition for this entry.
Every call to enroll_person fails with:
File "/config/custom_components/home_generative_agent/init.py", line 3297, in _handle_enroll_person
ok = await dao.enroll_from_image(
AttributeError: 'NoneType' object has no attribute 'enroll_from_image'
Environment:
What I’ve already tried/verified:
Question: What exactly initializes the dao object (the “person gallery”)? Is there an additional, undocumented configuration step or service call required to explicitly initialize the gallery, beyond setting face_api_url + face_recognition: true?
Thanks for any help — everything else in the integration (chat, camera analysis, Sentinel) works flawlessly with ChatGPT as the provider.
All reactions