-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing recording to other than default media folder on Home Assistant addon #6693
Comments
The media folders are added by name, I think it could make sense as a user to just add a share with the name |
Just tried this using the below method in 2023.6:
Received errors about being unable to create
Seems there either needs to be some guidance on how to set this up with the new Storage system in HASSOS, or an option as suggested here, to change the default recording path Frigate will use. |
It sounds like it doesn't have write access is the problem, otherwise we'd expect it to just ignore the NAS and keep writing to local storage |
That was my thought too. I was able to get it to work with the new NAS storage, but only by changing the
|
That is going to be required in the next version of frigate anyway due to performance issues using the db on remote storage |
@dm7500 I was able to get this to work by using your tips above, thx.
So far it seems to be working well. |
Just an update. Seems my method above isn't permanent and doesnt survive a reboot. I'm investigating why. |
And now it seems my method is official :-) |
Would you be able to paste some screenshots and further instructions of your workable solution? I am running exactly the same situation HA in a VM on my NAS (I am also using Samba). It seems I am able to create a Network Storage and I have the db config entry included exactly as mentioned as in the documentation. |
@erwindouna Did you make sure you stopped the Frigate addon before you start ? The behaviour you are describing is typical when Frigate still has hold of the /media/frigate folder. |
I tried your approach on testing to upload a file from Windows to the NAS SMB folder and try to see it in Media - Frigate. I didn't see the uploaded file showing up in HA. Best guess is that I configured something wrong on the NAS. When trying to update the configuration in HA, I am getting the error the mount is not empty. I'll have to look into this later (yet I have found a potential source for a solution: home-assistant/supervisor#4358 (comment)). |
Yeah - It may also be a permissions issue. Check to ensure the userid that runs the VM on the NAS has read/write access to the SMB folder |
Good morning, I have exactly the same problem, I use Haos on a VM and the media folder on my NAS Synology (NFS), if I restart Home Assitant (following an update for example) then frigate no longer saves on the NAS Synology :( Have you found a permanent solution? |
@xekil So far the only way I can get it to survive a full NAS reboot is to turn off the Start on Boot in the Frigate integration, and then when everything is up I start Frigate manually |
Thanks for the reply, I suspected that. It's no big deal, I'm going to switch to an LXC configuration. |
you can automate this by exposing the NAS SNMP and getting HA to read specifically the value of the status of the volume that your frigate folder is located on. When the status of that volume becomes available, depends what your NAS SNMP reports, you can then start/restart Frigate or restart HA itself. My experience described below: Note that my HA/Frigate setup is separate from my NAS. I use an automation to restart HA, leaving the Start on Boot enabled for Frigate, when the volume on my NAS that my Frigate is using reports itself to HA as "healthy" using SNMP. In my case restarting HA to mount the network share properly is more reliable than just starting/restarting frigate as sometimes HA doesn't remount the network share at all when it comes back online if HA starts before the network share is ready. With this setup I'm happy with my NAS rebooting anytime, including weekly reboots as my HA and Frigate will just fix itself. Now if only Frigate can have a fall back storage so that it continues working in the event the NAS share disappears. |
Closing this as from frigate's perspective using network shares for the addon is supported. Reconnection / other logic to the NAS is something that HA will need to clean up |
So where does the frigate.db file need to be? The instructions state to move it to the /config folder, but it was already there. |
The only reason it would already be there is if you already had that in your config, in 0.12 the default location is In 0.13 the default location will be |
Thank you. That helps explain that. |
it can be due to any number of reasons, more info is needed |
@NickM-27, thank you. |
I've tested Frigate recording on samba for some time now and It's mostly fine. The remote folder needs to be always on or the addon will start to record locally and not switch back. Right now i've setup a ha ping binary sensor that stops or starts the addon depending on the network state of the samba server. Not sure yet if it fixed anything. Update: it did. HA noticing/taking action for missing (currently active) network folder takes longer than 5 second ping interval. No Idea where is records up until the addon is stopped but somehow it recovers, once good ping. |
After monitoring for an evening I'm noticing that frigate is writing the videos to both locations (local storage and NAS). |
No, and this is not something that frigate has any control over. Frigate writes to one location inside the container if recordings are being written to both locations that is because multiple volumes have been bind mounted to the same location inside the frigate container. That is an HA / Supervisor issue (because that is what starts / stops / controls the frigate docker container) |
@navarrolux - did you ever solve this? Mine is currently writing both to my NAS and /media/frigate for both recording and clips |
@xAcrosonicx that is not possible to be writing to both locations, most likely you are misunderstanding the UI (they don't make it clear). The /media is just a mount of the NAS share, if you delete a file on the NAS it will be deleted in /media as well |
@NickM-27 - thank you for clarifying! I was using terminal to find the large directories/files and noticed it showed my /media/frigate as the largest - hence my confusion! |
With the upcoming release of Home Assistant 2023.6, we can now add a samba folder to ha media. It's not however (easily) possible to change the default recording path of frigate addon to the samba media folder, something like this:
The text was updated successfully, but these errors were encountered: