Fix cameras streaming:

First access the home assistant bash with:

docker exec -it homeassistant bash

Then try to find the component with:

find / -name "stream"

The result should be something like:


Edit the file:

vi /usr/src/homeassistant/homeassistant/components/stream/

Then comment the three lines:

# For RTSP streams, prefer TCP
if isinstance(stream_source, str) \
and stream_source[:7] == 'rtsp://' and not options:
options['rtsp_flags'] = 'prefer_tcp'

Exit and restart hassio (not sure it is necessary ?)

Finally just add camera with either:

ffmpeg_bin: /usr/bin/ffmpeg
- platform: ffmpeg
name: Kitchen
input: "rtsp://"
- platform: onvif
name: Leaving room
username: admin
password: XXXXXXXXX