Literally the one tab in the docs I didn’t click on LOL
Thanks!
Well I upgraded from the beta to the regular addon and 0.8.1 and saw no errors for days. This morning I updated HA to 2021.2.1 and now I’m seeing more errors…
frigate.video INFO : frigate_driveway: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video INFO : frigate_driveway: ffmpeg process is not running. exiting capture thread...
ffmpeg.frigate_driveway.detect ERROR : [swscaler @ 0x563da5fd7a40] deprecated pixel format used, make sure you did set range correctly
I went to follow your advice to increase log level, but your notes say all FFmpeg logs are sent as error level.
I tried the format you have listed in the docs just in case this hasn’t been updated with the new release and all I can get is:
logger:
logs: ffmpeg.frigate_driveway.detect debug
which then complains on trying to restart saying:
Error parsing config: expected a dictionary for dictionary value @ data['logger']['logs']
If I put in the colon as per the docs like this:
logger:
logs: ffmpeg.frigate_driveway.detect: debug
it says invalid yaml and I can’t even save the config.
I’ve tried with other modules and the same thing happens.
What am I missing?
Running the Frigate NVR HA addon Version 1.6 (0.8.1…non beta) and HA integration.
Thanks
Hi,
I updated Frigate in homeassistant under supervisor from 1.3 to 1.6.
Now my image looks vague, it looks like gray streaks. See screenshot.
The height and width of the stream are right. That worked well under version 1.3
thanks in advance for the help
Add-on within the HA VM, but with pcie m.2 coral
Is it possible to senda a link to an event clip let’s say as a notification link?
How can you tell that a clip is done for viewing.
Here is how I do it on android. It is possible that the clip isnt ready yet, but it doesnt take long.
automation:
- alias: Notify of detected objects
trigger:
platform: mqtt
topic: frigate/events
condition:
- "{{ trigger.payload_json['after']['entered_zones']|length > 0 }}"
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
- "{{ trigger.payload_json['type'] != 'end' }}"
action:
- service: notify.pixel
data_template:
message: 'A {{trigger.payload_json["after"]["label"]}} was detected on the {{trigger.payload_json["after"]["camera"]}} camera.'
data:
image: 'https://public.hass.url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
tag: '{{trigger.payload_json["after"]["id"]}}'
- alias: Send end event notification
trigger:
platform: mqtt
topic: frigate/events
condition:
- "{{ trigger.payload_json['after']['entered_zones']|length > 0 }}"
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
- "{{ trigger.payload_json['type'] == 'end' }}"
action:
- service: notify.pixel
data_template:
message: 'A {{trigger.payload_json["after"]["label"]}} was detected on the {{trigger.payload_json["after"]["camera"]}} camera.'
data:
image: 'https://public.hass.url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
tag: '{{trigger.payload_json["after"]["id"]}}'
clickAction: 'https://public.hass.url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg'
actions:
- action: "URI"
title: "View Video"
uri: 'https://public.hass.url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/{{trigger.payload_json["after"]["camera"]}}/clip.mp4'
- action: "URI"
title: "View Snapshot"
uri: 'https://public.hass.url/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg'
Thats’ just lovley! Let’s see how I implement this in my HA…
Big thanks for the ideas and your automation…
First of all, you’ve created a wonderful tool. It’s very polished and well documented. Thank you greatly.
This is the node-red subflow I use to receive notifications from two cameras. It use’s frigate’s snapshot.
[{"id":"d63c2249.7ded4","type":"subflow","name":"Frigate Cameras","info":"","category":"","in":[],"out":[{"x":800,"y":40,"wires":[{"id":"ca9e5b38.abe418","port":0}]},{"x":800,"y":120,"wires":[{"id":"ca9e5b38.abe418","port":1}]}],"env":[]},{"id":"f5966ede.288ea","type":"json","z":"d63c2249.7ded4","name":"","property":"payload","action":"","pretty":false,"x":230,"y":80,"wires":[["91840427.8c9108"]],"info":"Convert JSON Strings to Objects"},{"id":"91840427.8c9108","type":"rbe","z":"d63c2249.7ded4","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload.after.id","x":350,"y":80,"wires":[["370a7044.b20b4"]],"info":"Block any Messages that have duplicate After ID. Cuts down on multiple mqtt messages for the same notification"},{"id":"c7213546.9fb9e8","type":"mqtt in","z":"d63c2249.7ded4","name":"","topic":"frigate/events","qos":"2","datatype":"auto","broker":"e33289d8.a4fe58","x":90,"y":80,"wires":[["f5966ede.288ea"]]},{"id":"ca9e5b38.abe418","type":"switch","z":"d63c2249.7ded4","name":"Camera ID","property":"payload.after.camera","propertyType":"msg","rules":[{"t":"eq","v":"front","vt":"str"},{"t":"eq","v":"bsmnt","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":630,"y":80,"wires":[[],[]]},{"id":"370a7044.b20b4","type":"delay","z":"d63c2249.7ded4","name":"Rate Limit","pauseType":"rate","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"60","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":480,"y":80,"wires":[["ca9e5b38.abe418"]]},{"id":"e33289d8.a4fe58","type":"mqtt-broker","z":"","name":"MQTT","broker":"192.168.1.999","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"49c04ea7.36bad","type":"switch","z":"978a726.748069","name":"Property","property":"payload.after.current_zones","propertyType":"msg","rules":[{"t":"eq","v":"property","vt":"str"},{"t":"neq","v":"property","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":320,"y":1320,"wires":[["f51e9439.eeedf8"],[]]},{"id":"cc06bc9e.f652f","type":"subflow:d63c2249.7ded4","z":"978a726.748069","name":"","env":[],"x":120,"y":1340,"wires":[["49c04ea7.36bad"],["50f749dc.3d74a8"]]},{"id":"f51e9439.eeedf8","type":"api-call-service","z":"978a726.748069","name":"Notification - Front","server":"d19eaeb5.e5534","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_iphone","entityId":"","data":"{\"data\":{\"attachment\":{\"url\":\"https://your.public.has.address.org/api/frigate/notifications/{{payload.after.id}}/snapshot.jpg?format=android\",\"content-type\":\"jpeg\"}},\"message\":\"Your camera spotted someone on the property\",\"title\":\"Person ⋅ Front\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":1320,"wires":[[]],"info":"Change the following:\nService- to be your mobile in Home Assistant\n\nDATA- url in attachment to be your Homeassistant public url. \n \nInfo:\nFor Android users you may need to add the following after the url:-\n?format=android\n\nI.E.\nhttps://your.public.hass.address.com/api/frigate/notifications/{{payload.after.id}}.jpg?format=android\n\n\n\n{{payload.after.camera}} = Name of Camera\n"},{"id":"50f749dc.3d74a8","type":"api-call-service","z":"978a726.748069","name":"Notification - Basement","server":"d19eaeb5.e5534","version":1,"debugenabled":false,"service_domain":"notify","service":"mobile_app_iphone","entityId":"","data":"{\"data\":{\"attachment\":{\"url\":\"https://URL/api/frigate/notifications/{{payload.after.id}}/snapshot.jpg?format=android\",\"content-type\":\"jpeg\"}},\"message\":\"Your camera spotted someone on the property\",\"title\":\"Person ⋅ Basement\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":370,"y":1380,"wires":[[]],"info":"Change the following:\nService- to be your mobile in Home Assistant\n\nDATA- url in attachment to be your Homeassistant public url. \n \nInfo:\nFor Android users you may need to add the following after the url:-\n?format=android\n\nI.E.\nhttps://your.public.hass.address.com/api/frigate/notifications/{{payload.after.id}}.jpg?format=android\n\n\n\n{{payload.after.camera}} = Name of Camera\n"},{"id":"d19eaeb5.e5534","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
Most of it is borrowed from the members of the frigate github discussion boards. I put it all into a subflow, added a rate limiter and an output for each camera. I’d like to eventually make it more dynamic instead of having a notification for each camera but that’s beyond my skill set at the moment
Thank you again for working on this.
I had this one camera and I noticed it seemed rotated so I reversed the H/W and works even though its wrong
Thanks, this was the fix!
Weird but it works
I managed to get a mjpeg stream to work with these settings. But I cant get the clips playable in the web interface or in home-assistant. Is there any more settings I need to add for ffmpeg?
anyone getting Error parsing config: ‘mqtt’ after updating to the latest home assistant?
Everyone using the addon should avoid updating. The latest supervisor is not compatible with frigate.
Is there anyway to speed up the detection?
I have a Rpi4 (with Coral) and 2 cameras with substream at 7fps. I have Inference speed of about 15ms and have an automation that notifies me if it detects someone in the driveway. However, the notification always comes after the doorbell is pushed so kind of useless. It takes about 5-10 seconds to walk the length of my driveway. I cant work out why its so delayed.
- id: '9825365749416'
alias: Frigate - Person
trigger:
platform: mqtt
topic: frigate/events
condition:
condition: and
conditions:
- condition: state
entity_id: alarm_control_panel.alarmo
state: 'disarmed'
- condition: template
value_template: "{{ trigger.payload_json['after']['label'] == 'person' }}"
- condition: template
value_template: "{{ trigger.payload_json['after']['camera'] == 'driveway' }}"
- condition: template
value_template: "{{ as_timestamp(now()) - as_timestamp(states.frigate_person.attributes.last_triggered) | int > 120 }}"
- condition: state
entity_id: binary_sensor.hall_frontdoor
state: 'off'
for:
seconds: 10
action:
- service: notify.mobile_app_stephen_s20
data_template:
message: "Someone is at the front door"
data:
image: 'https://xxxxxxxxxxxxxxxxxxxxxxx.ui.nabu.casa/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
tag: '{{trigger.payload_json["after"]["id"]}}'
- service: script.alexa_announce
data:
message: "Someone is at the door"
- service: script.camera_cast_shield
I’ve found most delays are caused by a delay in the camera stream not so much a delay in the detection process. A lot of cameras run a few seconds behind. It’s an easy one to test. Turn on RTMP sharing, open the feed and walk in front of the camera while watching it.
Well I’m no expert here and it’s hard to read on my phone, but your automation shows all of your conditions need to be off for 10 seconds before it will fire doesn’t it?
Wth… I dont use auto update but it seems that HA updated to latest.
The result is that frigate dont work anymore.
Any way to get it running again under 2020.2…1?
Edit:
Deletet the lines with MQTT settings and now there is a added line wich states:
mqtt:
host: core-mosquitto.local.hass.io
Im pretty sure I didnt put it there… What’s going on?
The latest supervisor is not compatible with frigate: https://github.com/blakeblackshear/frigate/issues/703
This mqtt line is default value.
I think that’s just for my contact sensor on my front door - but I could also be wrong?
WTH… I was so glad you posted this and said fine… I wont update…
Since when does HA auto update?!!!