Closed IxcheI closed 1 month ago
Hello there & thanks for using this app!
So the key here is the log that states WRN Config file could not be read
. The default location for the config file is /app/config.yml
, or it can be overriden by using the FN_CONFIGFILE
environment variable as shown here.
In the config shared, it looks like you're mounting the config to /app/config/config.yml
- so my best guess is that the app can't find it. I would suggest either updating the volume map to /app/config.yml
, or use the env var if you like!
Edit: I see the docs might be a little confusing on the default file location - I'll make a note to update this to clarify it
@0x2142 Hi, thanks for the quick answer. The solution was indeed that simple. The documentation installation page has it correct, I just failed to see my mistake. Maybe there could be a dedicated error for not finding the config.
Now im getting:
WRN Cannot reach Frigate server at http://localhost:5000 error="Get \"http://localhost:5000/api/stats\": dial tcp [::1]:5000: connect: connection refused" attempt=1 interval=30 max_tries=5
But I'm already happy seeing a different error. When checking the api/stats in browser, it returns json without issue.
This may also be a very beginner level problem but I hope simple questions will also help others in the future. Want me to open a separate issue for this or is it also an easy fix? Thanks again.
That should be a simple fix as well 😊
In the current frigate-notify config, it's using server: localhost:5000
- which is telling frigate-notify to check port 5000 on itself, not the Frigate container.
In your docker-compose.yml
, you can set a container_name
for Frigate, which can then be accessed via DNS by frigate-notify. So update your compose file for the Frigate container to include that, like shown below:
services:
frigate:
container_name: frigate
...
Then, in the frigate-notify config - try setting the server
value to frigate:5000
instead & try restarting.
Please note that since you're running both apps in the same compose file, you may still see frigate-notify say it can't reach that at first, since it may take Frigate a moment to start up & the API to be accessible. But once Frigate starts & the API is available, then frigate-notify should connect.
Perfect! Everything is working now, thanks a lot for the help :D
I noticed that the notifications are only sent after an event has concluded, is it possible to sent one as soon as an object is being detected? My use case is kind of like a doorbell so speed is of the essence. If you think its theoretically possible but not with the current implementation I will also accept that as answer.
I will close the issue with this comment since my problems have been resolved and this is more of a general question.
Glad to hear it's working for you!
So currently you're set up to use the Web API to check for events, not MQTT. With the Web API, we have to pull events manually from Frigate - which is done on a scheduled interval. By default, this is every 30 seconds but this can be overridden in the config here. That being said the Web API will always be a bit slow because we can't process the event until Frigate processes & publishes it to the API + the lag between that & when frigate-notify runs the next API query to look for events.
If you want instantaneous, you would need to look at using MQTT instead. The way this works, is that there is a separate message broker that frigate-notify subscribes to. Any time there is an event, Frigate will publish the event info to that message broker immediately - and since we're subscribed to those events, that means frigate-notify gets those events as soon as they're published.
The Web API polling method is here since not everyone wants to use MQTT, since it is an additional service to run. However, there are some limitations & speed of detection-to-notification time is one of them.
Hope that helps!
Hi, I'm trying to set up notifications for my use case and currently can't even get frigate-notify to run in docker.
This is the ever repeating log:
I'm running frigate through docker and WSL (Ubuntu) on a windows machine with Nvidia GPU. Frigate is running without any issues so I'd hope its not my general setup.
Here is my compose file:
And my notify config:
The mounting works fine, I can see and open the config within docker. From the error I would assume, the issue is with the contents of my config? Is localhost not an acceptable address? I tried all kinds of addresses and ports, nothing worked. I don't know anything about mqtt, so I haven't use that in frigate.
If you need to know anything else, let me know! Thanks for your help, your work is greatly appreciated.