Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

[How-To] Home Assistant in a jail (tested on 9.10)

Joined
Jan 10, 2018
Messages
6
I was able to get this running but I am having trouble using the ffmpeg component with my cameras. It keeps on getting a permission denied error;

Code:
FFmpeg fails [Errno 13] Permission denied: '/usr/bin/ffmpeg/'
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/haffmpeg/core.py", line 114, in open
   stderr=stderr
  File "/usr/local/lib/python3.6/asyncio/subprocess.py", line 225, in create_subprocess_exec
   stderr=stderr, **kwds)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1192, in subprocess_exec
   bufsize, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/unix_events.py", line 200, in _make_subprocess_transport
   **kwargs)
  File "/usr/local/lib/python3.6/asyncio/base_subprocess.py", line 39, in __init__
   stderr=stderr, bufsize=bufsize, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/unix_events.py", line 706, in _start
   universal_newlines=False, bufsize=bufsize, **kwargs)
  File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__
   restore_signals, start_new_session)
  File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child
   raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/usr/bin/ffmpeg/'


I install the ffmpeg pkg inside the jail and made a new dir '/usr/bin/ffmpeg/' and added the hass group to it but I am still getting this error. Any help is appreciated.
 
Joined
Jan 10, 2018
Messages
6
Nevermind... I was in the process of moving my setup from a BeagleBoneBlack running Debian to a Freenas iocage and copied the config thinking it would work the same.

I had this...

Code:
ffmpeg:
  ffmpeg_bin: /usr/bin/ffmpeg
 
camera:
   - platform: ffmpeg
	 ffmpeg_bin: /usr/bin/ffmpeg
	 name: Front Door
	 input: -rtsp_transport tcp -i "rtsp://<camera_ip>"


And changed it to this...

Code:
#ffmpeg:
#  ffmpeg_bin: /usr/bin/ffmpeg

camera:
   - platform: ffmpeg
	 #ffmpeg_bin: /usr/bin/ffmpeg
	 name: Front Door
	 input: -rtsp_transport tcp -i "rtsp://<camera_ip>"


And everything is working. Looking at it again I can see that the ffmpeg_bin is looking for the ffmpeg program, not a folder... [insert facepalm]. Oh well all is good now. Thank you all for the info on setting up the jail.
 
Top