Trying to install Frigate but get, "Failed to Connect"

I set up MQTT and the broker but when I add the Frigate integration it fails. I’m not sure where I should look for the problem.

I’m following this: Home Assistant Integration | Frigate

In the logs I see, “2022-08-14 15:52:50.446 ERROR (MainThread) [custom_components.frigate.api] Error fetching information from http://ccab4aaf-frigate:5000/api/stats: Cannot connect to host ccab4aaf-frigate:5000 ssl:default [Name does not resolve]”. I don’t know what that means.

Any hints greatly appreciated.

Here’s a screenshot:

Is your Frigate application running? Are you able to reach the frigate application at that URL [http://ccab4aaf-frigate:5000]?
image

Did you installed frigate addon?
For integration I use http://homeassistant.local:5000
And you have to create frigate config file. Check manual on their page.

1 Like

I can’t access [http://ccab4aaf-frigate:5000/].

I added Frigate.yml to the config. I Installed the Frigate NVR (Full Access) application and start it but every time I go back to it I have to restart it.

I’m still having a failure when I try to add the Frigate integration.

I appreciate the help.

You shouldnt restart addon if everything is oke. That’s is why you get this error in integration. Frigate container is not running therefore it cannot connect.
What camera are you trying to integrate?

I was getting the error before I saw that the Frigate addon wasn’t running. At the bottom it doesn’t show stop it shows start. I just looked again and there’s no CPU usage showing and the start button shows.

I’ve integrated an Amcrest IP8M-2496EW which is supported I believe. It shows up in my Entities.

Start addon and check log file. Refresh it few times. It will probably show some error so paste it here

Looks like the config file?
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] done.
[services.d] starting services
[services.d] done.



*** Your config file is not valid! ***
*** Please check the docs at ***
*** Configuration File | Frigate ***



*** Config Validation Errors ***


1 validation error for FrigateConfig
root
FrigateConfig expected dict not NoneType (type=type_error)
[2022-08-14 18:28:31] frigate.app INFO : Starting Frigate (0.10.1-83481af)
Traceback (most recent call last):
File “pydantic/main.py”, line 507, in pydantic.main.BaseModel.parse_obj
TypeError: ‘NoneType’ object is not iterable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/opt/frigate/frigate/app.py”, line 312, in start
self.init_config()
File “/opt/frigate/frigate/app.py”, line 77, in init_config
user_config = FrigateConfig.parse_file(config_file)
File “/opt/frigate/frigate/config.py”, line 904, in parse_file
return cls.parse_obj(config)
File “pydantic/main.py”, line 510, in pydantic.main.BaseModel.parse_obj
pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
root
FrigateConfig expected dict not NoneType (type=type_error)


*** End Config Validation Errors ***


[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Is this the correct placement for frigate.yml?

Sorry was looking on my mob didnt saw it right. Yes frigate.yml is in correct directory. I believe you dont need those camera settings in configuation.yaml. Those goes to frigate.yml.
This is my file

mqtt:
  host: your_ha_ip
  user: create_mqtt_user
  password: password_for_mqtt_user
  port: 1883
cameras:
  doorbell:
    ffmpeg:
      hwaccel_args:
      - -hwaccel
      - vaapi
      - -hwaccel_device
      - /dev/dri/renderD128
      - -hwaccel_output_format
      - yuv420p
      inputs:
        - path: rtsp://username:password@camera_ip_address:554
          roles:
            - detect
            - rtmp
database: 
  path: /media/frigate/frigate.db
record:
  enabled: False
  retain:
    days: 14
    mode: motion

You can check rtsp stream with vlc ie. Also pay attention to spaces in frigate.yml file. Wrong spacing will throw an error. Yes, I know its frustrating, but it is how it is.

OK I moved the camera settings and double checked the spacing. I think it’s correct but there’s still no change. Checking the rtsp stream with vlc ie? Is vlc that video player? I can already see the camera stream on my devices using the IP address. I also already use Blue Iris where the camera works well.

Again, I really appreciate the help. Enough for tonight though, It’s getting late here.

Please share your config file, I’ll be happy to tell what is wrong. Also to clarify what was previously said, Frigate does not know anything about the HA entities setup so adding the amcrest integration will not do anything for frigate.

Thanks but I’ve decided to abandon Frigate until I get a little more familiar with HA. Blue Iris runs great for me so I have camera coverage.

I was thoroughly confused trying to set Frigate up. Way over my head at this point.

Not sure if you are still struggling with this or not, but for you and anyone else that might be having this issue. If you are using the Frigate (Full Access) Add-on you will need to use: http://ccab4aaf-frigate-fa:5000/ note the -fa after frigate. This worked for me with the Full Access add-on and I think it will solve your issue as well.

27 Likes

Thanks but I’ve figured it out and have Frigate on my dashboard now. I’m very pleased with it.

It did take some figuring out as far as the config file but it’s been running very smoothly.

I appreciate your followup.

1 Like

Your dead right . Put -fa after frigate full access and it works. Thanks again

2 Likes

Thanks for this, it solved my problem!

So simple but I’ll probably forget next time I mess it up. I did a snapshot restore and had to set up my addons again so I used Frigate full access. Thanks for the help

Thank you!! How did you find this out?

Thank you so much.
Ive added as per your instruction.

http://ccab4aaf-frigate-fa:5000/

Tks!!! It finally worked.