Repository navigation
Offer the folder input in the Home Assistant app - #35
Merged
Merged
Conversation
The directory watcher has been in the standalone service since 0.23.0, but the app never offered it. Three things were missing, and the third made the other two pointless: - no folder_* options and no folder block in the generated config - frigate_url was mandatory, so a Frigate-less setup could not even be saved - /media and /share were not mounted, so no path under them was readable Requested in #31 by a user with five Reolink cameras and no Frigate, uploading snapshots to /media over FTP. An empty frigate_url now means no Frigate; frigate_client already derives enabled from the URL and returns the no-op client. run.sh refuses to start with neither input set, and warns when folder_path is missing inside the container, naming the two mounted roots - a path the app cannot see is the likeliest mistake. In folder mode the camera sensor is announced at startup. The folder has no camera list to query, so the name comes from the configuration; without it a fresh install shows no sensor until the first recognition and looks dead. Also fixes three options that were settable and inert: cross_risk_margin, self_outlier_ratio and history_keep were read by the service but never written by run.sh - the same defect as #24, in three more fields. A new test checks every option reaches the generated config, that schema and defaults cover each other, and that free text goes through the jq encoder. Verified by evaluating the real run.sh template against a options.json with quotes in the password and the camera name: the generated YAML parses, the quotes survive, and FolderIngest plus frigate_client accept it. The reported setup - one file overwritten per event - is covered by a test: three overwrites are three recognitions, one index entry. 72 tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🧪 Automated PR ChecksProfile: ✅ python-syntax — 5 Python file(s) compile cleanly hermes-work · branch |
The folder camera was added after the or-chain had already evaluated _frigate_cameras(). Harmless in pure folder mode - frigate_enabled is False there, so the method returns an empty set without touching the network - but pointless, and in a mixed setup (Frigate on plus folder) it means a network call with a timeout runs before a name that was already known locally. Local sources first, Frigate only when nothing is known. The folder camera still joins the configured ones rather than replacing them, so a setup with both inputs announces both. Two tests: Frigate is not queried when the folder name suffices, and is still queried when nothing else is known. 74 tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
the-codemole
Bot
dismissed
their stale review
October 6, 2026 10:33
No longer clean — approval withdrawn.
The previous commit let the folder camera short-circuit the discovery chain, so a setup running Frigate *and* the folder watcher never queried Frigate for its camera list and only got one sensor. The folder camera is now unioned onto the result instead of replacing it, and Frigate is skipped only when Frigate itself is disabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #31.
The directory watcher has been in the standalone service since 0.23.0, but the app never offered it. Three things were missing, and the third made the other two pointless:
folder_*optionsfrigate_urlmandatory/mediaand/sharenot mountedReported by a user with five Reolink cameras and no Frigate, uploading snapshots to
/mediaover FTP.What changed
frigate_urlis now optional. An empty URL means no Frigate —frigate_clientalready derivesenabledfrom the URL and returns the no-op client, so the gallery, unknown review and history stay usable.map: [media:ro, share:ro]. Read-only: FaceID never changes or deletes what it watches.folder_*options, written into afolder:block in the generated config.run.shrefuses to start with neither input configured, and warns whenfolder_pathdoes not exist inside the container — naming the two mounted roots, since a path the app cannot see is the likeliest mistake.A second defect, found by the new test
cross_risk_margin,self_outlier_ratioandhistory_keepwere offered by the app and read by the service, butrun.shnever wrote them into the generated config — settable and inert. Same defect as #24, in three more fields.tests/test_addon_options.pynow checks that every option reaches the generated config, thatschemaandoptionscover each other, and that free text goes through the jq encoder rather than being interpolated raw.Verified
The real
run.shtemplate was evaluated against anoptions.jsoncarrying quotes in both the MQTT password and the camera name:The generated YAML parses, and
FolderIngestplusfrigate_clientaccept it unchanged.The reported setup — one file overwritten per motion event — measured and pinned as a test: three overwrites are three recognitions, one index entry. The fingerprint is size and mtime, not the name.
72 tests green.
🤖 Generated with Claude Code