frigate: environment_vars always fail config check where they are used (Not in the environment_vars section)
Describe the problem you are having
I don’t want support. This is simply a bug however users aren’t allowed to create bugs for some reason.
It appears as if the variables are just not being passed or parsed inside the config.
Version
Frigate NVR Beta (0.10.0) v 3.2
Frigate config file
environment_vars:
MY_USER: xxx
MY_PASSWORD: xxx
FRIGATE_RTSP_USER: xxx
FRIGATE_RTSP_PASSWORD: xxx
RSTP_IP_1: 'xx:xx:xx:xx'
later…
- path: rtmp://{RSTP_IP_1}/bcs/channel0_main.bcs?channel=0&stream=0&user={FRIGATE_RTSP_USER}&password={FRIGATE_RTSP_PASSWORD}
### Relevant log output
```shell
*************************************************************
*************************************************************
*** Your config file is not valid! ***
*** Please check the docs at ***
*** https://docs.frigate.video/configuration/index ***
*************************************************************
*************************************************************
*** Config Validation Errors ***
*************************************************************
'FRIGATE_RTSP_USER'
*************************************************************
*** End Config Validation Errors ***
*************************************************************
FFprobe output from your camera
does not relate
Frigate stats
does not relate
Operating system
HassOS
Install method
HassOS Addon
Coral version
USB
Network connection
Wired
Camera make and model
does not relate
Any other information that may be helpful
No matter what environment variable is used first, that’s what will fail the config check. If I don’t use any, the above configuration passes. The first attempt to use any variable, the configuration fails check.
Using FRIGATE_ or not does not make a difference, it simply does not accept the environment variable.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 15 (7 by maintainers)
Oh yeah; the work I did in that commit was primarily a refactor to clean up frigate’s lifecycle but it should have fixed this, if I’m understanding the issue correctly. @NickM-27 should we close this?
@wsidl I consider the config code to still be very dubious, but it’s not a priority for me. Note: I’m not a maintainer. I just took a look at the code like you, went “we can do better” and started sending PRs. So; PRs welcome!
@slepiavka For hw acceleration purposes, you can set them in the frigate config file and they will be set before frigate spawns the ffmpeg sub process.
And if environment vars are not to be used with hassOS, then this section needs to be removed
https://docs.frigate.video/configuration/advanced/#environment_vars