frigate-hass-integration: “failed to connect” with frigate instance running via web ui
hi, i am trying to integrate frigate on home assistant but i get the error “failed to connect”; i can reach Frigate through https://192.168.x.xx:8971, the latter is installed on docker (with a separate compose file from home assistant) on a debian 12 linux mini pc; I have not yet added any cameras on frigate and home assistant is installed with the core version via docker in the same mini pc and has as I said a separate compose file. I integrated MQTT (and here I am a bit confused but I see that it connects quietly with the rest of the system) and set the Frigate configuration file (config.yml) as follows:
cameras: name_of_your_camera: # <------ Name the camera enabled: true ffmpeg: inputs: - path: rtsp://10.0.10.10:554/rtsp # <----- The stream you want to use for detection roles: - detect detect: enabled: false # <---- disable detection until you have a working camera feed. width: 1280 height: 720 version: 0.15-1
mqtt:
host: “http://127.0.0.1”
user: “myusername”
password: “mypassword”
port: “1883”
topic_prefix: “frigate”
client_id: “frigate”
the compose file dedicated to frigate is as follows:
version: “3.9” services: frigate: container_name: frigate restart: unless-stopped stop_grace_period: 30s image: ghcr.io/blakeblackshear/frigate:stable shm_size: “512mb” # set shared memory devices: - /dev/bus/usb:/dev/bus/usb # If you use Coral USB, change it for other devices volumes: - /etc/localtime:/etc/localtime:ro - /home/deb/frigate/config:/config - /home/deb/frigate/storage:/media/frigate - type: tmpfs # Use memory for cache, reduce SSD consumption target: /tmp/cache tmpfs: size: 1000000000 # 1 GB of memory for cache ports: - “8971:8971” # Port for authenticated UI and API. - “8554:8554” # RTSP feed - “8555:8555/tcp” # WebRTC for real-time video - “8555:8555/udp” # WebRTC for real-time video (UDP) environment: FRIGATE_RTSP_PASSWORD: “password” # Set a password for RTSP (you can change it)
here the logs about frigate
2025-03-02 10:58:22.527256712 [2025-03-02 10:58:22] watchdog.name_of_your_camera ERROR : Ffmpeg process crashed unexpectedly for name_of_your_camera. 2025-03-02 10:58:22.527446604 [2025-03-02 10:58:22] watchdog.name_of_your_camera ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2025-03-02 10:58:22.527801954 [2025-03-02 10:58:22] ffmpeg.name_of_your_camera.detect ERROR : [tcp @ 0x557fe2264280] Connection to tcp://10.0.10.10:554?timeout=5000000 failed: Connection timed out 2025-03-02 10:58:22.527810767 [2025-03-02 10:58:22] ffmpeg.name_of_your_camera.detect ERROR : [in#0 @ 0x557fe2262d80] Error opening input: Connection timed out 2025-03-02 10:58:22.527815637 [2025-03-02 10:58:22] ffmpeg.name_of_your_camera.detect ERROR : Error opening input file rtsp://10.0.10.10:554/rtsp. 2025-03-02 10:58:22.527892200 [2025-03-02 10:58:22] ffmpeg.name_of_your_camera.detect ERROR : Error opening input files: Connection timed out
here the logs abount MQTT:
docker logs mosquitto
1740827116: mosquitto version 2.0.20 starting
1740827116: Config loaded from /mosquitto/config/mosquitto.conf.
1740827116: Opening ipv4 listen socket on port 1883.
1740827116: Opening ipv6 listen socket on port 1883.
1740827116: mosquitto version 2.0.20 running
1740827123: New connection from 172.18.0.1:54238 on port 1883.
1740827123: New client connected from 172.18.0.1:54238 as 1ktmTJ1iMaQBOsE1nPkjes (p2, c1, k60, u’deb’).
1740827244: Client 1ktmTJ1iMaQBOsE1nPkjes closed its connection.
1740827248: New connection from 172.18.0.1:55944 on port 1883.
1740827248: New client connected from 172.18.0.1:55944 as 4ZlMry6pwwG1nFdCaD3nfJ (p2, c1, k60, u’deb’).
1740828286: New connection from 172.18.0.1:58546 on port 1883.
1740828286: Client 0G5C7d8oOcB1srDi7oQop9 disconnected, not authorised.
1740828300: New connection from 172.18.0.1:51142 on port 1883.
1740828300: New client connected from 172.18.0.1:51142 as 54xDLWfQ3I8CVOhpY4OCjR (p2, c1, k60, u’deb’).
1740828300: Client 54xDLWfQ3I8CVOhpY4OCjR disconnected.
1740828300: Client 4ZlMry6pwwG1nFdCaD3nfJ disconnected.
1740828300: New connection from 172.18.0.1:51156 on port 1883.
1740828300: New client connected from 172.18.0.1:51156 as 77Igm00o41U8F4TifPA2yc (p2, c1, k60, u’deb’).
1740828845: New connection from 172.18.0.1:60502 on port 1883.
1740828845: Client <unknown> disconnected due to protocol error.
1740828917: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740829631: New connection from 192.168.0.40:53255 on port 1883.
1740829631: Client 7MaNgeVRi8t7J0fH42znn8 disconnected, not authorised.
1740830413: mosquitto version 2.0.20 terminating
1740830413: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740830413: mosquitto version 2.0.20 starting
1740830413: Config loaded from /mosquitto/config/mosquitto.conf.
1740830413: Opening ipv4 listen socket on port 1883.
1740830413: Opening ipv6 listen socket on port 1883.
1740830413: mosquitto version 2.0.20 running
1740830423: New connection from 172.18.0.1:36958 on port 1883.
1740830423: Client 77Igm00o41U8F4TifPA2yc disconnected, not authorised.
1740830465: New connection from 192.168.0.40:58949 on port 1883.
1740830465: New client connected from 192.168.0.40:58949 as 6OlqoB4uQ16ivRPzib8chZ (p2, c1, k60, u’marcos4248’).
1740830465: Client 6OlqoB4uQ16ivRPzib8chZ disconnected.
1740830465: New connection from 192.168.0.40:54129 on port 1883.
1740830465: New client connected from 192.168.0.40:54129 as 2G6mneMWndfCXs2nTIrlUX (p2, c1, k60, u’marcos4248’).
1740830465: Client 2G6mneMWndfCXs2nTIrlUX disconnected.
1740830465: New connection from 192.168.0.40:57951 on port 1883.
1740830465: New client connected from 192.168.0.40:57951 as 1z56XcgFnijhO0RfTM1Ngq (p2, c1, k60, u’marcos4248’).
1740830483: Client 1z56XcgFnijhO0RfTM1Ngq closed its connection.
1740830488: New connection from 192.168.0.40:43115 on port 1883.
1740830488: New client connected from 192.168.0.40:43115 as 3o47SktyWlxpfv3JaWIqKv (p2, c1, k60, u’marcos4248’).
1740830663: Client 3o47SktyWlxpfv3JaWIqKv closed its connection.
1740830668: New connection from 192.168.0.40:46859 on port 1883.
1740830668: New client connected from 192.168.0.40:46859 as 6I8CK0jo9Cqluq4pfpHMTQ (p2, c1, k60, u’marcos4248’).
1740830905: Client 6I8CK0jo9Cqluq4pfpHMTQ closed its connection.
1740830910: New connection from 192.168.0.40:52465 on port 1883.
1740830910: New client connected from 192.168.0.40:52465 as 2tUS7wIEgz3mXVtxHe47ss (p2, c1, k60, u’marcos4248’).
1740831175: New connection from 172.18.0.1:44593 on port 1883.
1740831175: New client connected from 172.18.0.1:44593 as 0l1Cra3o7xtUfK9nLf96lx (p2, c1, k60, u’marcos4248’).
1740831175: Client 0l1Cra3o7xtUfK9nLf96lx disconnected.
1740831175: Client 2tUS7wIEgz3mXVtxHe47ss disconnected.
1740831175: New connection from 172.18.0.1:50295 on port 1883.
1740831175: New client connected from 172.18.0.1:50295 as 6kAfnfhNTmDJS8zFFXP9XX (p2, c1, k60, u’marcos4248’).
1740831175: Client 6kAfnfhNTmDJS8zFFXP9XX disconnected.
1740831175: New connection from 172.18.0.1:40773 on port 1883.
1740831175: New client connected from 172.18.0.1:40773 as 2wAuNZbNkmImtEifswI033 (p2, c1, k60, u’marcos4248’).
1740832214: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740832701: mosquitto version 2.0.20 terminating
1740832701: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740832702: mosquitto version 2.0.20 starting
1740832702: Config loaded from /mosquitto/config/mosquitto.conf.
1740832702: Warning: File /mosquitto/config/mosquitto.passwd has world readable permissions. Future versions will refuse to load this file.
To fix this, use chmod 0700 /mosquitto/config/mosquitto.passwd.
1740832702: Opening ipv4 listen socket on port 1883.
1740832702: Opening ipv6 listen socket on port 1883.
1740832702: mosquitto version 2.0.20 running
1740832711: New connection from 172.18.0.1:43951 on port 1883.
1740832711: New client connected from 172.18.0.1:43951 as 2wAuNZbNkmImtEifswI033 (p2, c1, k60, u’marcos4248’).
1740834503: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740836304: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740837743: mosquitto version 2.0.20 terminating
1740837743: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740837755: mosquitto version 2.0.20 starting
1740837755: Config loaded from /mosquitto/config/mosquitto.conf.
1740837755: Warning: File /mosquitto/config/mosquitto.passwd has world readable permissions. Future versions will refuse to load this file.
To fix this, use chmod 0700 /mosquitto/config/mosquitto.passwd.
1740837755: Opening ipv4 listen socket on port 1883.
1740837755: Opening ipv6 listen socket on port 1883.
1740837755: mosquitto version 2.0.20 running
1740837828: mosquitto version 2.0.20 terminating
1740837828: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740837861: mosquitto version 2.0.20 starting
1740837861: Config loaded from /mosquitto/config/mosquitto.conf.
1740837861: Warning: File /mosquitto/config/mosquitto.passwd has world readable permissions. Future versions will refuse to load this file.
To fix this, use chmod 0700 /mosquitto/config/mosquitto.passwd.
1740837861: Opening ipv4 listen socket on port 1883.
1740837861: Opening ipv6 listen socket on port 1883.
1740837861: mosquitto version 2.0.20 running
1740839662: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740841463: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740842367: New connection from 172.18.0.1:46155 on port 1883.
1740842367: New client connected from 172.18.0.1:46155 as 0KTpMlwsWLkrVANekly5Au (p2, c1, k60, u’marcos4248’).
1740842367: Client 0KTpMlwsWLkrVANekly5Au disconnected.
1740842367: New connection from 172.18.0.1:49687 on port 1883.
1740842367: New client connected from 172.18.0.1:49687 as 56UMMfUcyqgj2sTSPEFQIj (p2, c1, k60, u’marcos4248’).
1740842367: Client 56UMMfUcyqgj2sTSPEFQIj disconnected.
1740842367: New connection from 172.18.0.1:58941 on port 1883.
1740842367: New client connected from 172.18.0.1:58941 as 78TjIpCLzpkvm1JW9wcGdZ (p2, c1, k60, u’marcos4248’).
1740842372: Client 78TjIpCLzpkvm1JW9wcGdZ disconnected.
1740842372: New connection from 172.18.0.1:48723 on port 1883.
1740842372: New client connected from 172.18.0.1:48723 as 589XSV523AiL1KXyWGezwi (p2, c1, k60, u’marcos4248’).
1740842399: Client 589XSV523AiL1KXyWGezwi closed its connection.
1740842405: New connection from 172.18.0.1:44007 on port 1883.
1740842405: New client connected from 172.18.0.1:44007 as 0DjwUVgfyf5uWM3P13o6KE (p2, c1, k60, u’marcos4248’).
1740843243: Client 0DjwUVgfyf5uWM3P13o6KE closed its connection.
1740843248: New connection from 172.18.0.1:54029 on port 1883.
1740843248: New client connected from 172.18.0.1:54029 as 3dIczDeqoRBtwu2U0hdSpj (p2, c1, k60, u’marcos4248’).
1740843264: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740845065: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740846866: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740848667: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740850468: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740851695: New connection from 172.18.0.1:57508 on port 1883.
1740851695: New client connected from 172.18.0.1:57508 as 1lxrvSwcmUVeCXGS1NLFMI (p2, c1, k60, u’marcos4248’).
1740851695: Client 1lxrvSwcmUVeCXGS1NLFMI disconnected.
1740851695: Client 3dIczDeqoRBtwu2U0hdSpj disconnected.
1740851695: New connection from 172.18.0.1:57514 on port 1883.
1740851695: New client connected from 172.18.0.1:57514 as 18UYM4RTHpZmc2N1FZ5ThN (p2, c1, k60, u’marcos4248’).
1740851695: Client 18UYM4RTHpZmc2N1FZ5ThN disconnected.
1740851695: New connection from 172.18.0.1:57524 on port 1883.
1740851695: New client connected from 172.18.0.1:57524 as 7xytNsonRyVCIozL1yxv0c (p2, c1, k60, u’marcos4248’).
1740851708: Client 7xytNsonRyVCIozL1yxv0c closed its connection.
1740851713: New connection from 172.18.0.1:39916 on port 1883.
1740851713: New client connected from 172.18.0.1:39916 as 6gi7Oqs0qB3xyvLAYoNET3 (p2, c1, k60, u’marcos4248’).
1740851974: Client 6gi7Oqs0qB3xyvLAYoNET3 closed its connection.
1740851979: New connection from 172.18.0.1:56094 on port 1883.
1740851979: New client connected from 172.18.0.1:56094 as 2gtwho4eRx0QrfrmKllUyI (p2, c1, k60, u’marcos4248’).
1740852269: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740854070: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740854493: mosquitto version 2.0.20 terminating
1740854493: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740854531: mosquitto version 2.0.20 starting
1740854531: Config loaded from /mosquitto/config/mosquitto.conf.
1740854531: Warning: File /mosquitto/config/mosquitto.passwd has world readable permissions. Future versions will refuse to load this file.
To fix this, use chmod 0700 /mosquitto/config/mosquitto.passwd.
1740854531: Opening ipv4 listen socket on port 1883.
1740854531: Opening ipv6 listen socket on port 1883.
1740854531: mosquitto version 2.0.20 running
1740854541: New connection from 172.18.0.1:45414 on port 1883.
1740854541: New client connected from 172.18.0.1:45414 as 4fRYTNn78jHNb3RXcz5K7a (p2, c1, k60, u’marcos4248’).
1740856332: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740858133: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740859934: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740861735: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740863536: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740863857: New connection from 172.18.0.1:56886 on port 1883.
1740863857: New client connected from 172.18.0.1:56886 as mqttjs_f2fe1ad9 (p5, c1, k60, u’marcos4248’).
1740865337: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740867138: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740868939: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740870740: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740872541: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740874342: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740876143: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740877944: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740879745: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740881546: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740883347: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740885148: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740886949: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740888750: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740890551: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740892352: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740894153: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740895954: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740897755: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740899556: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740901357: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740903158: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740904959: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740906488: Client mqttjs_f2fe1ad9 disconnected.
1740906498: New connection from 172.18.0.1:34748 on port 1883.
1740906498: New client connected from 172.18.0.1:34748 as mqttjs_f76cb5f4 (p5, c1, k60, u’marcos4248’).
1740906760: Saving in-memory database to /mosquitto/data//mosquitto.db.
1740908561: Saving in-memory database to /mosquitto/data//mosquitto.db
and here the logs about home assistant when I try to connect through the integration by entering the ip address of frigate and the username and password with which I enter frigate:
Questo errore ha avuto origine da un’integrazione personalizzata.
Registratore: custom_components.frigate.api Fonte: custom_components/frigate/api.py:381 Integrazione: Frigate (documentazione, problemi) Prima occorrenza: 09:19:44 (2 occorrenze) Ultimo accesso: 09:19:58
Client response error (400) for URL http://192.168.0.xx:8971/api/stats: Bad Request Client response error (400) for URL http://192.168.0.xx:8971/api/login: Bad Request
I tried several combinations (https/https, with and without username and password, reconfiguring MQTT) but could not solve. I apologize for the length of the message and hope I have included all the necessary information, thank you in advance
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (1 by maintainers)
This has already been added, will be released soon