Network share on Frigate HASSOS with nabucasa(SSL)
Tutorial for HASSOS, proxmox LXC, netowork share, Frigate sidebar, nginx, nabucasa
I have sucessfuly install Frigate on Proxmox LXC with network share.
I would like to share it with you, feel free to give like or comment
1.Story
2.Start
3.Remove/uninstall Frigate addon.
4.Proxmox Virtual Environment 6.3-6
5.Go to your router and check that the loaded container receive IP and make it static. Make a note about IP
6.Proxmox ssh
7.Proxmox ssh inside container - Install docker
8.Proxmox ssh inside container - install docker-compose
9.Proxmox ssh inside container - install frigate docker
10.Running Frigate docker
11.Nabucasa - not finished
12.Automating container (mounts,docker,frigate docker) - not finished
1.Story
Why?
The HASSOS frigate addon is perfect but doesnt have / or i didn’t find the option to mount network share.
How?
I want HASSOS to be able to access frigate on seperate container on local lan (or host only local lan PROXMOX)
Tools needed:
Proxmox
Sambashare addon installed and activated (remember login/password change in configuration)
I am not using any coral, for that you need assistance from somebody else afterwards :>
I’m using integrated INTEL graphics
Ready to copy / paste
Frigate thread:
https://community.home-assistant.io/t/local-realtime-person-detection-for-rtsp-cameras/
2.Start
If you have don’t Frigate addon installed, jump to step 4
3.Remove/uninstall Frigate addon.
As it is duplicate of what we will do
Keep the file frigate.yml we will need it later but renamed to config.yml
4.Proxmox Virtual Environment 6.3-6
Goto local storage on sidebar
Click templates
Search Debian 10 Buster (standard) (why? because i <3 debian)
Click download,after finish close
click Create CT (tick advance)
Hostname frigate
Uncheck unprivilage container (to be able to access network shares)
Put any password (i don’t know what is it for)
Click next
Choose template that you downloaded, next
Put 12GB storage,next
Put how many cores you want to use, next
Put how many RAM you want (me 3072),leave cache 512, next
Choose DHCP for IPv4,IPv6 leave untouched, next,next
Make sure start container after creation is ticked, Finish
Shutdown the container
edit option->Features->Netsting tick
Goto /etc/pve/lxc/ with containerid.config
edit file
nano /etc/pve/lxc/<CTID>.config
add this lines
lxc.apparmor.profile = unconfined
lxc.cgroup.devices.allow = a
lxc.cap.drop =
lxc.cgroup.devices.allow = c 226:0 rwm
lxc.cgroup.devices.allow = c 226:128 rwm
lxc.cgroup.devices.allow = c 29:0 rwm
lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry = /dev/fb0 dev/fb0 none bind,optional,create=file
start the container
5.Go to your router and check that the loaded container receive IP and make it static. Make a note about IP
6.Proxmox ssh + inside container
Connect to proxmox ssh
cd /var/lib/lxc/containerID/
Here is config file for the configuration for the container.
now write in shell “pct enter ID” my is 107 so “pct enter 107” hit enter
you will see change to root@frigate:/#
Now you are in the container.
Run next command (non mandatory,just for easy use)
apt update;apt install nano;apt install mc -y
Run next command (mandatory)
apt update;apt install cifs-utils -y
apt upgrade -y
nano /root/.bashrc
put on the last line
export PATH=$PATH:/usr/local/bin
cd /root/
7.Proxmox ssh inside container - Install docker
apt install apt-transport-https ca-certificates curl software-properties-common gnupg2 -y
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
apt update
apt install docker-ce -y
Check that its loaded (active (running)) by
systemctl status docker
Enable autorun
systemctl enable docker
If locale error Troubleshooting look 21
8.Proxmox ssh inside container - install docker-compose
Goto on your PC in your browser
Copy link of docker-compose-Linux-x86_64
My is
https://github.com/docker/compose/releases/download/1.29.1/docker-compose-Linux-x86_64
write to shell
curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-Linux-x86_64" -o /usr/local/bin/docker-compose
write to shell
chmod +x /usr/local/bin/docker-compose
now write in shell
reboot now
after 5sec reconect to container by
pct enter 107
you will see this root@frigate:/#
write to shell
docker-compose --version
output should be something like this
docker-compose version 1.29.1, build c34c88b2
Go to your root folder /root/
write
mkdir dockfrigate
cd dockfrigate
U see root@frigate:~/dockfrigate#
write
nano docker-compose.yml
9.Proxmox ssh inside container - install frigate docker
Goto on PC
Read the latest settings for docker
Copy them to docker-compose.yml
Change the <path_to_config_file> to
/mnt/hassconfig/config.yml
Change the <path_to_directory_for_media> to
/mnt/media
Change frigate_rtsp_password on some random letters
Change <specify_version_tag> to
stable-amd64
Save & exit
Now write
mkdir /mnt/media
mkdir /mnt/hassconfig
Test that the mounts will go through
mount -vvv -t cifs -o username=<username>,password=<password>,domain=WORKGROUP //ipANDpathTOnasMEDIAstorage /mnt/media
mount -vvv -t cifs -o username=<username>,password=<password>,domain=WORKGROUP //ipTOhassOSsambashare/config /mnt/hassconfig
Troubleshooting 24 (mount special device error)
Later you can put mouns to /etc/fstab to make it automount (i did’nt do that because i’m missing some settings, its not always comming up)
10.Running Frigate docker
write
cd /root/dockfrigate/
Now change the name of the file frigate.yml in HASSOS to config.yml
then go back to ssh container
ip a
mark down the ip for HASSOS setup
And run
docker-compose up
Troubleshooting see number 20
Troubleshooting see number 22
Troubleshooting see number 23
Now check that its working
http://<markDOWNip>:5000/
11.Setting up HASSOS
We need to add integration
create a folder in File editor on HASS
custom_components
Download this zip file
https://github.com/blakeblackshear/frigate-hass-integration
connect to the samba HASSOS from your PC and upload frigate folder to HASSOS samba share custom_components folder
add line to config.yml
database:
path: /config/frigate.db
restart fully HASSOS Supervisor->System->Restart host
Go to Configuration->Integration and search for Frigate
Troubleshooting 25
Add the marked IP address
Click finish
Goto file editor again
configuration.yaml add this lines
panel_iframe:
router:
title: "Frigate"
url: "http://<your mark ip>:5000/"
restart fully HASSOS Supervisor->System->Restart host
If everything is working then in the container stop frigate
goto /root/dockfrigate
docker-compose stop
Then run it again to doublecheck
docker-compose run
If everything is ok then detach the process so you can exit
docker-compose stop
docker-compose run -d
exit/close all
Troubleshotting
If you have some problems, just disable docker in container and start it, then docker-compose up in dockfrigate folder
11.Nabucasa
As the HTTPS->HTTP iframe is not working we need to make a server nginx witch we translate http->https
On PC you will see the iframe Frigate, but on mobile no.
To be continued… When i will be having more free time.
Troubleshooting
20. empty
If you have empty response on docker-compose up
check systemctl status docker
or check journalctl -xe
solve the problem
mine was the IPv6 was DHCP.
I just repeat all steps i think i missed something else.After repeating it all went fine
21. locale error
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
fix
https://www.thomas-krenn.com/en/wiki/Perl_warning_Setting_locale_failed_in_Debian
and just reboot container
22. config not found
check that you have mounted everything
23. caused: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)?
I mounted wrong samba share where was other frigate already mounted.
Maybe a limitation of sambashare?
24. mount special device error
Check that your container is not in lvm-thin. we need directory storage
25. if you cant find frigate integration
Open other browser as the problem is with cache, or clean full cache in the browser
Sources:
https://linuxize.com/post/how-to-install-and-use-docker-on-debian-9/
https://linuxize.com/post/how-to-install-and-use-docker-compose-on-debian-9/
https://blakeblackshear.github.io/frigate/installation/
google.com