Frigate Mobile App Notifications 2.0

Why does it fail?

What conditions does the trace say were false

Ivan trying to import this blueprint but getting an unknown error when I press preview. I dont have any issues with other blueprints.

Thi is the error in logs

Logger: homeassistant.components.websocket_api.http.connection
Source: components/blueprint/importer.py:168
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 09:25:36 (4 occurrences)
Last logged: 09:35:39

[140602456796992] Error handling message: Unknown error (unknown_error) Imran from 127.0.0.1 (Mozilla/5.0 (Linux; Android 14; Pixel 6 Pro Build/UQ1A.240105.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/121.0.6167.143 Mobile Safari/537.36 Home Assistant/2024.1.5-12102 (Android 14; Pixel 6 Pro))
[140602691096000] Error handling message: Unknown error (unknown_error) Imran from 127.0.0.1 (Mozilla/5.0 (Linux; Android 14; Pixel 6 Pro Build/UQ1A.240105.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/121.0.6167.143 Mobile Safari/537.36 Home Assistant/2024.1.5-12102 (Android 14; Pixel 6 Pro))
[140602695290304] Error handling message: Unknown error (unknown_error) Imran from 127.0.0.1 (Mozilla/5.0 (Linux; Android 14; Pixel 6 Pro Build/UQ1A.240105.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/121.0.6167.143 Mobile Safari/537.36 Home Assistant/2024.1.5-12102 (Android 14; Pixel 6 Pro))
[140602570045504] Error handling message: Unknown error (unknown_error) Imran from 127.0.0.1 (Mozilla/5.0 (Linux; Android 14; Pixel 6 Pro Build/UQ1A.240105.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/121.0.6167.143 Mobile Safari/537.36 Home Assistant/2024.1.5-12102 (Android 14; Pixel 6 Pro))
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/blueprint/websocket_api.py", line 76, in ws_import_blueprint
    imported_blueprint = await importer.fetch_blueprint_from_url(hass, msg["url"])
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/blueprint/importer.py", line 257, in fetch_blueprint_from_url
    imported_bp = await func(hass, url)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/blueprint/importer.py", line 168, in fetch_blueprint_from_github_url
    resp = await session.get(import_url, raise_for_status=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 689, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1059, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('https://raw.githubusercontent.com/SgtBatten/HA_blueprints/main/Frigate+Camera+Notifications/Stable')

Any help appreciated

To the best of my knowledge, it appears that the message may not be getting updated in the repeat loop when the entered_zones becomes available?

It looks like initial_entered_zones may be set in the beginning, whether entered_zones is available or not (and the message doesnā€™t use initial_entered_zones), but when entered_zones is filled on a subsequent repeat, the message isnā€™t updated.

Perhaps that occur here?

  message: |
    {% if sub_label %} 
      {{message | replace('A Person', sub_label|title) | replace('Person', sub_label|title)}}
    {%else%}
      {{message}}
    {%endif%}

Is there a reason you donā€™t want to use the long preset and modify it?

It uses enteredzones where as initial_entered_zones is only ever the first Mqtt message

Not sure sorry.

You can always just copy the raw blueprint from GitHub and save it in the blueprints folder like any other one.

No, I want to use the long preset as is and Iā€™m getting those errors about entered_zones not being available.

Maybe it was the restart, group notifications now work on all devices. Thank you for walking me through it.

Is it possible to only allow critical notifications for the Android device?

Use the beta. entered_zones is buggy for a long time. Beta changes it to enteredzones

Also, the message does update if the notification is updated. Do you have update attachment on, it is the most common mechanism for the update loop to have a reason to update. Given me an idea too

Hello, thanks for this, much appreciated.

Canā€™t get it to work though.

The old one worked for me for a while, but this one doesnā€™t. Not even a test run ā€¦ ( clicking Run on the Automation )

Iā€™ve enabled debug logs but no entries in settings ā†’ System ā†’ Logs

How could i see whatā€™s wrong ?

You canā€™t test it that way. Need more information to know whatā€™s wrong

me too brother

frigate is running
HA is running
MQTT is running, topic, frigate/camera-1

Not even a ā€œrunā€ button is working, which should send test notification, right?

No.

Are you using the beta or stable?

stablestablestable.

maybe itā€™s this [Bug]: cameras with _1 suffix no longer trigger automation Ā· Issue #32 Ā· SgtBatten/HA_blueprints Ā· GitHub

After setting up, how do you know if itā€™s working if Run button is not test button ?

The stable doesnā€™t give you an option for a custom topic. So you canā€™t uses frigate/camera-1, only frigate/events

Iā€™ve no idea, you have not shared enough information

You would need to publish an Mqtt message that matches the frigate output. Or walk outside and trigger the camera.

so should I change topic in frigate? i donā€™t quite understand this now ā€¦

ah, got it ā€¦ it works now! thanks for your work man, love it.

Iā€™d like to trigger only when the front door hasnā€™t been opened for at least 10 seconds. The reason I want to do this is that I get notifications when people leave the house. I only want a notification when new people come to the front door.

Now there is a State Filter entity option. But this only filteres on state, but not on time in a specific state.

But maybe I need to create a specific custom entry for this? Or are there better ways to do this?