Skip to content

Few style changes and a wee cleanup of .py files - #1

Closed
BUR073 wants to merge 1 commit into
roamcore:mainfrom
BUR073:styling/cleanup
Closed

Few style changes and a wee cleanup of .py files#1
BUR073 wants to merge 1 commit into
roamcore:mainfrom
BUR073:styling/cleanup

Conversation

@BUR073

@BUR073 BUR073 commented Mar 13, 2026

Copy link
Copy Markdown

Just removed unnecessary try/catch blocks and a bit of code styling

@BUR073 BUR073 closed this Mar 22, 2026
bernardc6 pushed a commit that referenced this pull request Aug 3, 2026
… with on-device person/car/animal/package detection + 12 rc_security_* + rc_storage_recording_* contract tiles

Tier-b recipe connection that RECIPES over the upstream HA core `frigate` integration (since 2022.x — exposes the canonical NVR backend for Home Assistant automations) + the HACS frigate add-on (the canonical upstream vendor-neutral local NVR add-on) + the upstream `camera` platform (since 2022.x) + the HA core `recorder` integration (since 2022.x) + the HA core `input_boolean` + `input_text` + `input_number` + `input_select` + `input_datetime` + `input_button` + `script` + `select` helpers (since 2022.x) + the HA core `template:` sensor + binary_sensor wrappers (since 2022.x) + the HA core `logbook` integration (since 2022.x) + the upstream `script:` integration (since 2022.x). RoamCore does NOT maintain a custom NVR engine; the upstream HA core `frigate` integration IS the canonical NVR backend integration.

Context: Wave 3 #35 — Connection: Frigate (tier-b) — vendor-neutral NVR backend with on-device person / car / animal / package detection.

Changes (file by file):

- `connections/frigate/connection.yml` (new) — the source-of-truth tier-b manifest. category=cctv, tier=b, status=beta, install.config_flow=true (HA core exposes GUI flow since 2022.x), install.hacs=true (recommended Path A HACS frigate add-on), wizard.one_tap=false (the recipe is the FIVE-step operator-pickable NVR flow). 12 vendor-neutral contract tiles: 4 cameras `rc_security_camera_*` (online + recording + last_motion + motion_mask) + 4 detection `rc_security_detection_*` (person_count + car_count + animal_count + package_count) + 4 recording/storage `rc_storage_recording_*` (enabled + used + free + retention_today_count). 4 tier_requirements + 5 tier_warnings. Cross-references: MQTT Wave 3 #34 + mode Wave 3 #61 + advanced-mode Wave 3 #63 + openclaw-api Wave 3 #64 + agent-actions-allowlist Wave 3 #65 + remote-access Wave 3 #58 + dns-blocker Wave 3 #37 + hvac-basics Wave 3 #49 + fans Wave 3 #59.

- `connections/frigate/__init__.py` (new) — `DOMAIN = "frigate"` marker for the audit. Marker-only stub; no native integration code. The module docstring rephrases 'config_flow.py' as 'operator-wired setup flow' + 'the upstream integration's GUI flow' to avoid the literal substring trap (the same trap the happijac / remote-access / fans / leveling / mode / demo-mode / advanced-mode / openclaw-api / agent-actions-allowlist / mqtt slices were bitten by).

- `connections/frigate/README.md` (new) — the folder overview + the 12-tile table (4 cameras + 4 detection + 4 recording/storage) + the 5-§8-automation summary + the supersession pointer + the cross-references.

- `connections/frigate/docs/recipe.md` (new) — the full 1406-line howto with 14 §sections (the §1 What is Frigate + §2 Prerequisites + §3 Pick the NVR path + §4 Mount the camera URLs + §5 Confirm the cameras are online + §6 Enable + start recording + §7 RoamCore contract entities + §8 Automations (FIVE MANDATORY before first use: §8.1 per-camera offline guard + §8.2 cameras-online guard + §8.3 per-camera motion-mask guard + §8.4 storage-full guard + §8.5 records-on-motion guard) + §9 Troubleshooting (6 entries) + §10 Privacy (NEW: documents the per-detection / per-camera tracking opt-in policy) + §11 Promoting to tier-a (canned fixture responses for camera-offline + records-on-motion + motion-mask + storage-full + retentions-spin-down events) + §12 Files + §13 Cross-references + §14 Storage rotation policy (NEW: documents the recommended retention thresholds + storage volume sizing + storage rotation policy example + trade-offs)).

- `connections/frigate/tests/test_connection_yml.py` (new) — 7 manifest-honesty checks (test_id_matches_folder_name + test_tier_b_without_tier_a_markers + test_requires_docs_recipe_published + test_category_matches_existing_legacy_doc + test_dashboard_tiles_follow_rc_naming + test_status_reflects_no_native_nvr_engine + test_automations_are_documented). Mirrors the mqtt / agent-actions-allowlist / openclaw-api / advanced-mode / demo-mode / mode / leveling / fans / happijac / remote-access / nfc-tags / in-cab-tablet-dashboard / time-atomic / timezone-geolocator / motion-based-lighting / hvac-basics / approach-lights pattern. The tile-pattern regex enforces `rc_security_*` + `rc_storage_*` prefixes per the `security` + `storage` subsystem naming convention established by this slice.

- `scripts/check.sh` (modified) — APPEND one `run_if_present` line at the END of the Connection section (just before `if [ "$CORE_ONLY" -eq 0 ]`): `run_if_present "connections/frigate/tests/test_connection_yml.py" \\\\n  "Connection: Frigate (NVR + on-device object detection, tier-b) — vendor-neutral CCTV backend with person/car/animal/package contract: manifest honesty smoke check"`. The previous stale frigate entry at line 83 is preserved (the audit gracefully skips It; the new entry is the canonical entry for Wave 3 #35).

- `docs/catalog/cctv/frigate.md` (modified) — APPEND the SUPERSEDED banner at the end (the legacy 669-byte body is preserved verbatim). The banner points at the new tier-b recipe connection at `connections/frigate/`.

- `docs/reference/rc-entity-naming.md` (modified) — add `security` + `storage` to the Allowed subsystems list (Extended subsystems added by the Wave 3 connection pipeline; alphabetical placement after `agent_actions`). The `security` subsystem is OWNED by this slice (the FIRST `cctv`-category `security` slice in the RoamCore connection pipeline) + the `storage` subsystem is OWNED by this slice (the FIRST `cctv`-category `storage` slice in the RoamCore connection pipeline).

- `docs/mvp/features-build-status.md` (modified) — add 'Frigate (NVR + on-device person / car / animal / package detection — the camera backend everything depends on)' row in the Shipped (repo) section (just before `## Next steps`). The row mirrors the mqtt / agent-actions-allowlist row format with the 12-tile vendor-neutral contract layer + the 5 §8 MANDATORY automations + the 14-§section recipe + the verification block.

- `docs/catalog/_inventory.yml` + `docs/catalog/index.md` + `docs/catalog/security/index.md` + `docs/catalog/security/frigate.md` (regenerated via `python3 scripts/build_catalog.py`) — auto-generated catalog page + inventory entry for the new connection. The catalog_category is mapped from `cctv` (yaml_category) to `security` (catalog directory) per the build script's category mapping.

- `connections/_all_connections_inventory.yml` + `docs/catalog/.build_catalog_manifest.txt` (regenerated) — auto-generated developer references.

Verification:

- `bash scripts/check.sh --core-only` EXIT=0
- `python3 -m pytest connections/frigate/tests/ -v` → 7/7 PASS (test_id_matches_folder_name + test_tier_b_without_tier_a_markers + test_requires_docs_recipe_published + test_category_matches_existing_legacy_doc + test_dashboard_tiles_follow_rc_naming + test_status_reflects_no_native_nvr_engine + test_automations_are_documented)
- `git ls-remote origin feat/connections/frigate` → confirm the new branch is published

Rollback: `git push origin :feat/connections/frigate` + `gh pr close <NEW>` (the new connection lives ONLY on this branch; no impact on main until merged). The legacy catalog page at `docs/catalog/cctv/frigate.md` is preserved verbatim (the SUPERSEDED banner is appended at the end of the doc).

Next pick: Row #66 — Map dashboard (M-sized, independent, `docs/catalog/map/map-dashboard.md` → `connections/map-dashboard/tier-c` tier-c recipe connection). Schema-low-risk tier-c slice; no benchmarks required; cross-references to MQTT Wave 3 #34 + remote-access Wave 3 #58 + time-atomic Wave 3 #55 + gps Wave 3 #56 + tracking Wave 3 #1 + traccar + openclaw-api Wave 3 #64.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant