SgtBatten Home Assistant Blueprints

repository·main·Indexed 19 days ago

https://github.com/sgtbatten/ha_blueprints

A collection of Home Assistant automation blueprints featuring advanced notification logic for Frigate camera events. It provides extensive customization for notification content (thumbnails, snapshots, GIFs, videos), dynamic data integration with Double Take, and comprehensive filtering logic including zone, object, presence, and time filters. Requires Home Assistant 2024.11+, Frigate 0.14+, Frigate Integration 5.7.0+, and an MQTT broker.

Tokens
2.5K
Snippets
2
Records
14
Agent score
64%

What's inside ha_blueprints

  1. Overview of Frigate Notification features and filters

    main

    The Frigate Camera Notifications blueprint provides extensive customization for how and when you receive alerts.

    Notification Content

    • Media: Includes thumbnails, snapshots, GIFs, or videos of the event. Supports bounding box and crop options for images.
    • Dynamic Data: Automatically handles object types, zones, and face detection data from Double Take.
    • Customization: Configure titles, messages, colors, icons, and custom sounds (iOS).
    • Actions: Configure tap actions and up to 3 action buttons (e.g., View Clip, View Snapshot, Silence Notifications).

    Filtering Logic

    Use filters to reduce noise and ensure relevant alerts:

    • Zone Filter: Notify only on specific zones. Supports 'All' or 'Any' logic, and enforcing zones in a specific order (e.g., 'arriving' before 'leaving').
    • Object Filter: Specify which object types (e.g., person, car) trigger notifications.
    • Presence Filter: Disable notifications if a specific presence entity or group is home.
    • State Filter: Limit notifications based on the state of another entity.
    • Time Filter: Restrict notifications to specific hours of the day.
    • Cooldown/Silence: Use a cooldown to prevent back-to-back event spam, or a silence timer to temporarily mute notifications.
    • Loitering Timer: Notify you when stationary objects remain in view for a set period.
    • Custom Template Filters: For advanced logic.
  2. Install the Frigate Camera Notifications blueprint

    main

    You can install the Frigate Camera Notifications blueprint into Home Assistant using the official import badges. This blueprint sends notifications to your device when a Frigate event occurs for a selected camera. Notifications include a detection thumbnail and actionable buttons to view the clip and snapshot.

    There are two versions available:

    • Stable: Recommended for most users.
    • Beta: For testing new features.

    To install, click the corresponding import badge in the repository or use the direct URL provided below in your Home Assistant blueprint import interface.

    ### Stable Version Import URL
    https://raw.githubusercontent.com/SgtBatten/HA_blueprints/main/Frigate_Camera_Notifications/Stable.yaml
    
    ### Beta Version Import URL
    https://raw.githubusercontent.com/SgtBatten/HA_blueprints/main/Frigate_Camera_Notifications/Beta.yaml
  3. Enable Debugging in Frigate Camera Notifications

    main

    The Frigate Camera Notifications blueprint includes a built-in debug mode to help troubleshoot automation behavior.

    To enable debugging:

    1. Open the automation configuration in Home Assistant.
    2. Scroll to the bottom of the automation settings.
    3. Toggle the Debug option to on or true.
    4. (Optional) Use the redacted toggle to hide your Base URL from the debug output, which is useful when sharing logs for support.

    To increase the number of stored traces available for inspection, add the following configuration to the beginning or end of the automation while editing it in YAML mode:

    trace:
      stored_traces: 40
  4. Requirements for Frigate Camera Notifications

    main

    Before setting up the blueprint, ensure your environment meets the following minimum requirements:

    Software Versions

    • Home Assistant: 2024.11 or higher
    • Frigate: 0.14 or higher
    • Frigate Integration: 5.7.0 or higher
      • Crucial: You must enable the unauthenticated notification event proxy setting during the Frigate integration setup.
    • iOS: 15.0 or higher

    Infrastructure

    • An MQTT broker must be connected to both Home Assistant and Frigate.
  5. Configure Mobile Devices and Notification Groups

    main

    This section defines where notifications are sent.

    Mobile Device

    Mandatory field. Filters to display only devices with the Home Assistant companion app installed.

    Notification Group or Android/Fire TV

    Allows sending to a group of devices or a TV instead of a single mobile device. This overrides the Mobile Device input.

    Valid Inputs:

    • Full service: notify.android_tv
    • Entity ID without domain: android_tv
    • Friendly name (if it matches entity ID): Android TV

    Groups can contain a mix of Android, iOS, and TV devices.

  6. How to view and read Debug output in automation traces

    main

    Once the automation has been triggered with Debug enabled, you can inspect the detailed debug logs via the Home Assistant automation trace tool:

    1. Navigate to the automation in Home Assistant.
    2. Select Traces from the top right of the interface.
    3. In the visual trace depiction, look for the two nodes highlighted in red:
      • The first node represents the output for the initial notification.
      • The second node represents the output from all update loop cycles.
    4. Click on either red node to view the Result block, which contains the params and message containing the full debug state (including info, config, and filter test results).
  7. Configure required entities for Frigate Notifications

    main

    To use this blueprint, you must provide the following entities during automation configuration:

    1. Frigate Camera Name: Select the specific camera entity from your Frigate setup.
    2. Notify Device: Provide either a specific Mobile App Device, a Notification Group name, or a TV entity.

    Tip: To send notifications to multiple devices simultaneously, leave the Device field blank and use a notification group instead.

  8. Configure Base URL and MQTT Settings

    main

    Base URL

    Enter your external Home Assistant URL (e.g., https://ha.mydomain.com). The automation automatically strips trailing slashes.

    MQTT Topic

    By default, Frigate sends messages to frigate/events and frigate/reviews. If you have customized these topics in your Frigate configuration, update this field to match.

    Note: MQTT is required for this blueprint to function.

  9. Configure Notification Filters

    main

    Restrict when notifications are sent using these filters:

    • Event Type: Select specific event severities.
    • Master Condition: An overarching condition builder; if false, no notification is sent.
    • Zone Filter:
      • Required Zones: Enter lowercase zone names as defined in Frigate (e.g., front_porch).
      • Multi Zone Toggle: If enabled, requires all specified zones to be entered.
      • Zone Order Enforced: If enabled with Multi-Zone, requires zones to be entered in the specific order listed.
    • Object Filter: Select specific objects (e.g., person, car) to trigger notifications.
    • Presence Filter: Only notify if ALL selected presence entities are NOT home.
    • Time Filter: Restrict notifications to specific times of day.
    • Cooldown/Silence Timer: Prevent notification spam.