Skip to content

Commit 0a272bc

Browse files
noreplyclaude
andcommitted
v10.7.0 — Media Browser provider for downloaded events (local + NAS)
Adds a media_source platform exposing event recordings under "Media → Bosch SHC Camera". Two backends are auto-detected from the existing options: * Local — when enable_auto_download + download_path are configured. Tree: Camera → Date → Event. * NAS / SMB — when enable_smb_upload is on. Tree: Year → Month → Day → Event, matching the on-disk layout. Files are streamed on demand via smbprotocol with HTTP Range support so MP4 seeking works; nothing is cached on the HA host. Each event title shows time + type + camera. JPEGs serve as thumbnails for matching MP4 clips. macOS resource-forks (._*) are filtered. Files are served by an authenticated /api/bosch_shc_camera/event/… view; path-traversal is blocked, only image/jpeg and video/mp4 MIME types are returned. New options-flow dropdown "media_browser_source" (auto / local / smb / none) overrides the auto-detect when both backends are active but only one should appear in the browser. Forum context: simon42 community post #14. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 90bba12 commit 0a272bc

10 files changed

Lines changed: 761 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ versions see this file or the [GitHub Releases page](https://github.com/mosandlt
77

88
---
99

10+
## v10.7.0
11+
12+
**Event recordings now appear in HA's Media Browser — both local and NAS.** New `media_source` provider exposes downloaded events under **Media → Bosch SHC Camera**, with two backends auto-detected from existing options:
13+
14+
* **Local** — when *Events automatically download* is enabled with a `download_path`. Tree: *Camera → Date → Event*.
15+
* **NAS / SMB** — when *SMB upload* is enabled (default for users who don't want to fill HA's small disk). Tree: *Year → Month → Day → Event*; matches the on-disk layout, all cameras share a day folder. Files are streamed on-demand via smbprotocol with HTTP `Range` support so MP4 seeking works.
16+
17+
Each event title shows time, type, and camera (e.g. `09:15:23 — MOVEMENT (Garten)`). MP4 clips play inline; JPEG snapshots double as thumbnails for the matching clip. macOS resource-fork files (`._*`) are filtered out — relevant for FRITZ.NAS / Time Machine targets.
18+
19+
When only one backend is configured, the source-chooser is hidden so the tree opens straight at the meaningful content. With both backends enabled the user picks *Lokal* vs *NAS* at the entry root.
20+
21+
**Manual filter — `Media Browser source` option.** New options-flow dropdown overrides the auto-detect when needed: *Auto* (default — show every backend with data), *Nur Lokal*, *Nur NAS*, *Deaktiviert* (hide the Media Browser entry entirely). Useful when both download_path and SMB upload are active but only one of them should appear in the browser.
22+
23+
Files are served by an authenticated `/api/bosch_shc_camera/event/…` view; path-traversal is blocked, only `image/jpeg` and `video/mp4` are returned. Forum thread context: [simon42 community post #14](https://community.simon42.com/t/bosch-smart-home-kameras-vollstaendig-in-home-assistant-custom-integration-mit-live-stream-bewegungssensoren-cloud-api-kein-shc-noetig/81743/14) — same UX as Reolink's `Media → Reolink` entry.
24+
1025
## v10.6.2
1126

1227
**Branding fix — switched to the right Bosch app icon.** v10.6.1 mistakenly used the blue *Bosch Smart Home* hub icon. v10.6.2 uses the red *Bosch Smart Camera* app icon (Robert Bosch GmbH, sourced from the official iOS App Store listing) — that's the camera-specific Bosch branding which matches what this integration actually does. Pure asset swap.

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,31 @@ Set **Low disk warning threshold (MB)** to receive an alert when the NAS runs lo
506506
1. The configured **notify service** (e.g. Signal, mobile app) if set
507507
2. **HA persistent notification** as fallback (always shown in the sidebar)
508508

509+
### Media Browser
510+
511+
Once events are being saved — either to the local download folder (`enable_auto_download`) or to a NAS via SMB upload — they appear under **Media → Bosch SHC Camera** in HA's built-in media browser. No extra setup needed; the integration auto-detects which backends have data.
512+
513+
**Tree shape**
514+
- *Local backend:* `Camera → Date → Event`
515+
- *NAS backend:* `Year → Month → Day → Event` (matches the on-disk layout, all cameras share a day folder)
516+
517+
Each event title is `HH:MM:SS — TYPE (Camera)`, e.g. `09:15:23 — MOVEMENT (Garten)`. MP4 clips play inline with HTTP `Range` support so the player can seek; the matching JPEG snapshot doubles as a thumbnail. macOS resource-fork files (`._*`) are filtered out — relevant for FRITZ.NAS / Time Machine targets.
518+
519+
When only one backend is configured the source-chooser is hidden and the tree opens straight at the meaningful content. With both backends enabled the entry root shows *Lokal* and *NAS \\server\share* as siblings.
520+
521+
**Manual filter — `Media Browser source` option**
522+
523+
Settings → Devices & Services → Bosch SHC Camera → Configure → **Quelle des Media Browsers**:
524+
525+
| Value | Effect |
526+
|-------|--------|
527+
| Auto (default) | Show every backend that has data |
528+
| Nur Lokal | Hide the NAS even if SMB upload is active |
529+
| Nur NAS | Hide local files even if auto-download is active |
530+
| Deaktiviert | Hide the Media Browser entry entirely |
531+
532+
Files are served by an authenticated `/api/bosch_shc_camera/event/…` view; path-traversal is blocked, only `image/jpeg` and `video/mp4` are returned. NAS files are streamed on demand via `smbprotocol` — no local cache, no HA disk usage.
533+
509534
### HA Events
510535

511536
The integration fires events on the HA event bus for custom automations:
@@ -1116,8 +1141,8 @@ Features investigated or intentionally parked — listed here so the direction i
11161141

11171142
## Releases
11181143

1119-
Latest stable: **v10.6.2** — see the GitHub release page for full notes:
1120-
[**v10.6.2 release notes →**](https://github.com/mosandlt/Bosch-Smart-Home-Camera-Tool-HomeAssistant/releases/tag/v10.6.2)
1144+
Latest stable: **v10.7.0** — see the GitHub release page for full notes:
1145+
[**v10.7.0 release notes →**](https://github.com/mosandlt/Bosch-Smart-Home-Camera-Tool-HomeAssistant/releases/tag/v10.7.0)
11211146

11221147
| | |
11231148
|---|---|

custom_components/bosch_shc_camera/config_flow.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,18 @@ async def async_step_init(self, user_input=None):
451451
"download_path",
452452
description={"suggested_value": opts.get("download_path", "")},
453453
): str,
454+
vol.Optional(
455+
"media_browser_source",
456+
default=str(opts.get("media_browser_source", "auto")),
457+
): SelectSelector(SelectSelectorConfig(
458+
options=[
459+
SelectOptionDict(value="auto", label="Auto (alles Aktive anzeigen)"),
460+
SelectOptionDict(value="local", label="Nur Lokal (download_path)"),
461+
SelectOptionDict(value="smb", label="Nur NAS (SMB-Upload)"),
462+
SelectOptionDict(value="none", label="Provider deaktivieren"),
463+
],
464+
mode=SelectSelectorMode.DROPDOWN,
465+
)),
454466
# SHC local API — camera light + privacy mode
455467
vol.Optional(
456468
"shc_ip",

custom_components/bosch_shc_camera/const.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
"enable_snapshot_button": True,
3535
"enable_auto_download": False,
3636
"download_path": "",
37+
# Filter for the Media Browser provider (separate from upload/download).
38+
# auto = show every backend that has data; local/smb = show only that one;
39+
# none = hide the provider entirely.
40+
"media_browser_source": "auto",
3741
"shc_ip": "",
3842
"shc_cert_path": "",
3943
"shc_key_path": "",

custom_components/bosch_shc_camera/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"name": "Bosch Smart Home Camera",
44
"codeowners": ["@mosandlt"],
55
"config_flow": true,
6-
"dependencies": ["my", "http"],
6+
"dependencies": ["my", "http", "media_source"],
77
"documentation": "https://github.com/mosandlt/Bosch-Smart-Home-Camera-Tool-HomeAssistant",
88
"integration_type": "hub",
99
"iot_class": "cloud_push",
1010
"issue_tracker": "https://github.com/mosandlt/Bosch-Smart-Home-Camera-Tool-HomeAssistant/issues",
1111
"loggers": ["bosch_shc_camera"],
1212
"requirements": ["requests>=2.28.0", "firebase-messaging>=0.4.0", "smbprotocol>=1.10.0"],
13-
"version": "10.6.2"
13+
"version": "10.7.0"
1414
}

0 commit comments

Comments
 (0)