dermotduffy / frigate-hass-card

A Lovelace card for Frigate in Home Assistant
MIT License
498 stars 57 forks source link

Speech for Scan mode #1373

Open DrSpaldo opened 5 months ago

DrSpaldo commented 5 months ago

Checklist:

Release with the issue: 5.2.0

Last working release (if known):

Browser and Operating System: Edge - Windows 11

Description of problem:

The new speech feature is triggering the scan mode, which means there is a blank image instead of the Frigate camera image.

Frigate card diagnostic information

Card diagnostics. Please review for confidential information prior to sharing

{
  "ha_version": "2024.1.6",
  "card_version": "5.2.0",
  "browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0",
  "date": "2024-02-17T07:12:50.634Z",
  "frigate_version": {
    "89567bb430af9b1fff462d64f5de4d20": "5.0.1/0.13.2-6476f8a"
  },
  "lang": "en",
  "timezone": "Australia/Brisbane",
  "git": {
    "build_version": "5.2.0-HEAD+g69249b6",
    "build_date": "Fri, 23 Jun 2023 15:26:26 GMT",
    "commit_date": "Thu, 22 Jun 2023 09:21:26 -0600"
  },
  "config": {
    "type": "custom:frigate-card",
    "cameras": [
      {
        "camera_entity": "camera.frontdoor",
        "live_provider": "image",
        "frigate": {
          "camera_name": "frontdoor",
          "url": "http://192.168.1.22:5000/",
          "client_id": "frigate_proxmox"
        },
        "go2rtc": {
          "modes": [
            "webrtc"
          ]
        },
        "triggers": {
          "entities": [
            "binary_sensor.frontdoor_person_occupancy"
          ],
          "occupancy": false
        }
      },
      {
        "camera_entity": "camera.frontroad",
        "live_provider": "image",
        "frigate": {
          "client_id": "frigate_proxmox"
        },
        "triggers": {
          "entities": [
            "binary_sensor.frontroad_person_occupancy"
          ],
          "occupancy": false
        }
      },
      {
        "camera_entity": "camera.frontdriveway",
        "live_provider": "image",
        "frigate": {
          "client_id": "frigate_proxmox"
        },
        "triggers": {
          "entities": [
            "binary_sensor.frontdriveway_person_occupancy"
          ],
          "occupancy": false
        }
      },
      {
        "camera_entity": "camera.backdoor",
        "frigate": {
          "url": "http://192.168.1.22:5000/",
          "camera_name": "backdoor",
          "client_id": "frigate_proxmox"
        },
        "triggers": {
          "entities": [
            "binary_sensor.backdoor_person_occupancy"
          ],
          "occupancy": false
        },
        "live_provider": "image"
      }
    ],
    "timeline": {
      "style": "stack"
    },
    "view": {
      "scan": {
        "enabled": true,
        "untrigger_seconds": 20
      },
      "dark_mode": "auto",
      "timeout_seconds": 120,
      "update_seconds": 120,
      "default": "snapshot"
    },
    "menu": {
      "buttons": {
        "substreams": {
          "enabled": false
        },
        "snapshots": {
          "enabled": false
        },
        "download": {
          "enabled": false
        },
        "media_player": {
          "enabled": false
        },
        "cameras": {
          "enabled": false
        },
        "clips": {
          "icon": "mdi:content-cut"
        },
        "fullscreen": {
          "alignment": "matching"
        }
      },
      "position": "left",
      "alignment": "left",
      "style": "overlay"
    },
    "dimensions": {
      "aspect_ratio_mode": "static",
      "min_height": "280px"
    },
    "media_viewer": {
      "layout": {
        "position": {}
      }
    },
    "live": {
      "layout": {
        "fit": "cover",
        "position": {}
      },
      "controls": {
        "next_previous": {
          "style": "chevrons",
          "size": 20
        }
      },
      "auto_play": "selected"
    },
    "performance": {
      "style": {
        "box_shadow": true
      }
    },
    "view_layout": {
      "column": 2
    }
  }
}

Additional information:

Please add the option to remove speech from the scan trigger. I hope this makes sense

dermotduffy commented 5 months ago

The new speech feature is triggering the scan mode, which means there is a blank image instead of the Frigate camera image.

Interesting! Haven't played with the speech stuff at all. So scan mode triggers, and what happens? What do you want to happen?

DrSpaldo commented 5 months ago

Interesting! Haven't played with the speech stuff at all. So scan mode triggers, and what happens? What do you want to happen?

Thanks for the reply @dermotduffy . I love your card.

I am still trying to fine tune exactly how I have the card setup. Currently I have it set to scan mode and display the most recent snapshot. It was lagging my tablet when it was playing the live stream. Anyway, back to the question...

So scan mode triggers, and what happens? When the speech triggers the scan mode, it isn't super consistent. Most of the time it shows a snapshot, however, sometimes it just shows a blank box (grey screen). I need to work out if there is a better way to make it just show a new snapshot for the scan or if my current way is best.

What do you want to happen? It is fine when it shows the snapshot, but when it shows the blank screen it is no good. I guess on a side note, although I may not want the option, it may be worth considering that you can set what options trigger the scan. Ie. Only person detection.

I hope this makes sense...

dermotduffy commented 5 months ago

Thanks for the reply @dermotduffy . I love your card.

I love making it, and positive feedback spurs me on, thank you!

So scan mode triggers, and what happens? When the speech triggers the scan mode, it isn't super consistent. Most of the time it shows a snapshot, however, sometimes it just shows a blank box (grey screen).

I'm not sure why this would ever happen. It should be going to the live view of that camera, whether it's speech activated or not, I would have expected the live view to always work. Unless you sometimes see this grey screen even when you're manually selecting live?

I need to work out if there is a better way to make it just show a new snapshot for the scan or if my current way is best.

What do you want to happen? It is fine when it shows the snapshot, but when it shows the blank screen it is no good. I guess on a side note, although I may not want the option, it may be worth considering that you can set what options trigger the scan. Ie. Only person detection.

I'm working on #1344 right now, which is very related. When I'm finished I think the updating should be much more consistent, but I'm not not yet sure how it'll interact with speech stuff. I also like the idea of being able to narrow down what triggers it.