frigate: Supervisor 2021.02.1 seams breaking the Addon

Dear @blakeblackshear thanks a lot for this awesome addon and customcomponent. It was runing like a charm. Unfortunately I face an isse after upgrading my supervisor (supervised install method of Home assistant).

Now each time I want to save my config I geet this error (Chrome console):

chunk.97b95a62afbc18471344.js:3350 Uncaught (in promise) TypeError: Cannot read property 'find' of null
    at HTMLElement.value (chunk.97b95a62afbc18471344.js:3350)
    at HTMLElement.performUpdate (entrypoint.cf81f6d9.js:35547)
    at HTMLElement._enqueueUpdate (entrypoint.cf81f6d9.js:35547)
Could not load content for webpack://home-assistant-frontend/chunk.97b95a62afbc18471344.js (HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)

image

image

{result: "ok", data: {}}
data: {}
result: "ok"

I dunno what’s going on here or how I can find the issue. If you might have a look in this. I guess this will impact other users with updated suervisor as well.

Please let me know if you need additional information.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 55 (26 by maintainers)

Most upvoted comments

Just pushed a new version of the addon. Frigate’s config can no longer be managed in the Configuration tab of the addon (at least for now). The addon expects a frigate.yml file to exist in the root of your homeassistant config directory. You can edit it using whatever editor you use for homeassistant config.

That I would love. Dont understand all this “in app configuration” that can not be version handled.

If you are using HassOS the snapshots take backups of your addon config too, but this is exactly why frigate does not have the ability to modify it’s own config. Even when it does, it will always just be a UI for modifying the config file with a clear option for those who want to save it out into source control since this is how I do it. There will never be a .storage folder for frigate.

As a work-around, I’ve backed up a JSON formatted version of my configuration (used faq to convert from YAML to JSON) and installed a watch on the option.json file to replace it by the backup as soon as it is overwritten by supervisor:

root@hassio:~# while true ; do inotifywait /usr/share/hassio/addons/data/be8d440d_frigate-beta/options.json ; cp /usr/share/hassio/addons/data/be8d440d_frigate-beta/options.json{.bak,} 
; done

Managed to do something similar to get the addon started again. Thanks for the tip.

An alternative may be to expose the config schema in the addon’s config.json to allow supervisor to use it.

I don’t think that will work because the developer docs state “Only nested arrays and dictionaries are supported with a deep of two size”.

I just updated to latest Supervisor version with own Api for configuration

https://github.com/home-assistant/developers.home-assistant/pull/794/files

BUT i get still an error:

 * Starting nginx nginx
   ...done.
Error parsing config: 'mqtt'

With config:

detectors:
  coral:
    type: edgetpu
    device: pci
mqtt:
  host: 192.168.1.41
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: hass
  password: hass
ffmpeg:
  global_args:
  - "-hide_banner"
  - "-loglevel"
  - panic
  hwaccel_args:
  - "-hwaccel"
  - vaapi
  - "-hwaccel_device"
  - "/dev/dri/renderD128"
  - "-hwaccel_output_format"
  - yuv420p
  input_args:
  - "-avoid_negative_ts"
  - make_zero
  - "-fflags"
  - nobuffer
  - "-flags"
  - low_delay
  - "-strict"
  - experimental
  - "-fflags"
  - "+genpts+discardcorrupt"
  - "-rtsp_transport"
  - tcp
  - "-stimeout"
  - '5000000'
  - "-use_wallclock_as_timestamps"
  - '1'
cameras:
  front_door:
    ffmpeg:
      inputs:
      - path: rtsp://hass:hass@40.40.40.224:88/videoMain
        roles:
        - detect
        - rtmp
        - clips
        - record
    width: 1280
    height: 720
    fps: 15
    record:
      enabled: true
      retain_days: 1
    zones:
      parking:
        coordinates: '554,333,611,274,708,281,763,265,823,260,948,285,1021,341,1078,359,1102,387,1137,381,1154,417,1120,596,760,504,754,318'
      mailbox:
        coordinates: '416,454,434,401,387,346,336,395,337,446'
      main_door:
        coordinates: '1200,697,1159,699,1071,699,936,695,553,663,530,449,1280,420'
  porch:
    ffmpeg:
      inputs:
      - path: rtsp://hassio:hassio@40.40.40.92:554/stream1
        roles:
        - detect
        - rtmp
        - clips
        - record
    width: 1920
    height: 1080
    fps: 15
    record:
      enabled: true
      retain_days: 1
    zones:
      door_porch_dining_room:
        coordinates: '1243,1080,1292,85,961,162,929,1080'
  garage:
    ffmpeg:
      inputs:
      - path: rtsp://40.40.40.220:554/media/stream1
        roles:
        - detect
        - rtmp
        - clips
        - record
    width: 1280
    height: 720
    fps: 15
    record:
      enabled: true
      retain_days: 1
    zones:
      garage_door:
        coordinates: 0,158,0,504,383,493,397,213
      refrigiator:
        coordinates: '1186,259,1159,665,1038,646,1070,259'
      table:
        coordinates: '269,486,0,486,0,720,142,720,592,720,256,482,145,720,376,720,588,720'
      window_front_house:
        coordinates: '599,265,605,419,507,418,514,250'
  garden:
    ffmpeg:
      inputs:
      - path: rtsp://40.40.40.14:554/media/stream1
        roles:
        - detect
        - rtmp
        - clips
        - record
    width: 1280
    height: 720
    fps: 15
    record:
      enabled: true
      retain_days: 1

Config is saved but somehow not? Nothing in Chrome Console

this is in logs:

21-02-04 16:52:04 WARNING (MainThread) [supervisor.addons.options] Unknown options detectors
21-02-04 16:52:04 WARNING (MainThread) [supervisor.addons.options] Unknown options mqtt
21-02-04 16:52:04 WARNING (MainThread) [supervisor.addons.options] Unknown options ffmpeg
21-02-04 16:52:04 WARNING (MainThread) [supervisor.addons.options] Unknown options cameras
21-02-04 16:52:04 WARNING (MainThread) [supervisor.addons.options] Unknown options detectors
21-02-04 16:52:04 WARNING (MainThread) [supervisor.addons.options] Unknown options mqtt
21-02-04 16:52:04 WARNING (MainThread) [supervisor.addons.options] Unknown options ffmpeg
21-02-04 16:52:04 WARNING (MainThread) [supervisor.addons.options] Unknown options cameras

@hawkeye217 As this is a problem for me, too, could you add some information how you installed the watch on the file? Thx, Sebastian

I’m really surprised that this isn’t breaking lots of addons. It doesn’t seem to be possible to disable schema validation and allow an open ended yaml configuration anymore. The schema validation builtin to the supervisor is not advanced enough for frigate. If that was intentional, I will have to move to reading the config file from homeassistant’s config directory instead, and it will no longer be possible to use the addon configuration tab to edit your config.

As a work-around, I’ve backed up a JSON formatted version of my configuration (used faq to convert from YAML to JSON) and installed a watch on the option.json file to replace it by the backup as soon as it is overwritten by supervisor:

root@hassio:~# while true ; do inotifywait /usr/share/hassio/addons/data/be8d440d_frigate-beta/options.json ; cp /usr/share/hassio/addons/data/be8d440d_frigate-beta/options.json{.bak,} 
; done

Sadly, Supervisor 2021.02.5 is out of beta, so it is now auto upgrading from 2021.01.x but the Frigate addon is still no longer compatible (same Error parsing config: 'mqtt' error as already reported above).

Downgrading to 2021.01.8 does not help as it will re-upgrade to 2021.02.5 right after startup:

root@hassio:~# docker exec -ti hassio_cli ha supervisor update --version 2021.01.8
Processing... Done.

Command completed successfully.
[11:35:50] INFO: Starting local supervisor watchdog...                                                                                                                                   
21-02-08 11:35:50 INFO (MainThread) [__main__] Initializing Supervisor setup                                                                                                             
...
21-02-08 11:35:59 INFO (MainThread) [__main__] Running Supervisor
21-02-08 11:35:59 INFO (MainThread) [supervisor.supervisor] Update Supervisor to version 2021.02.5
21-02-08 11:35:59 INFO (SyncWorker_5) [supervisor.docker.interface] Downloading docker image homeassistant/amd64-hassio-supervisor with tag 2021.02.5.
21-02-08 11:36:03 INFO (MainThread) [supervisor.supervisor] Fetching AppArmor profile https://version.home-assistant.io/apparmor.txt
21-02-08 11:36:03 INFO (MainThread) [supervisor.host.apparmor] Adding/updating AppArmor profile: hassio-supervisor
21-02-08 11:36:03 INFO (MainThread) [supervisor.host.services] Reloading local service hassio-apparmor.service
21-02-08 11:36:03 INFO (MainThread) [supervisor.api] Stopping API on 172.30.32.2
21-02-08 11:36:03 INFO (MainThread) [supervisor.misc.scheduler] Shutting down scheduled tasks
21-02-08 11:36:03 INFO (MainThread) [supervisor.core] Supervisor is down - 0
21-02-08 11:36:03 INFO (MainThread) [__main__] Closing Supervisor

I guess the solution is to wait until the next bugfix release or roll your install back.

facing the same problem, now i can load the configuration but it stuck on the mqtt