Hassio and cameras

Hi

I get alot off error in my log when useing Cameras in hassio with MJPEG. Also when I use FFMPEG Hassio works about 10 minuts then just freezez.

[Errno 113] Host is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 438, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/site-packages/requests/packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.33', port=80): Max retries exceeded with url: /Streaming/Channels/2/preview (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x739f5390>: Failed to establish a new connection: [Errno 113] Host is unreachable',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in start
    resp = yield from self._request_handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 306, in _handle
    resp = yield from handler(request)
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 213, in coro
    res = yield from res
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 213, in coro
    res = yield from res
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 58, in ban_middleware_handler
    return (yield from handler(request))
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/__init__.py", line 424, in handle
    result = yield from result
  File "/usr/lib/python3.6/site-packages/homeassistant/components/camera/__init__.py", line 340, in get
    response = yield from self.handle(request, camera)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/camera/__init__.py", line 360, in handle
    image = yield from camera.async_camera_image()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/camera/mjpeg.py", line 92, in async_camera_image
    self.camera_image)
  File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/camera/mjpeg.py", line 118, in camera_image
    self._mjpeg_url, auth=auth, 

Thats the error I get, any idƩ what it could be?
Why dont FFMPEG work?

Same here.
I had to turn off my onvif cameras because of system freeze after few minutes.

Same here, had to turn off some cameras. Same with my friends system

Same here. Hassio boots up without problems, but when you open the tab where the FFMPEG camera should be, hassio stops responding

Same here. After a certain period of time my hass.io installation (on Raspberry Pi3) is no longer reachable with my browser on port 8123 (although with Fing it results open). SSH and Samba addons which are reachable. When I reboot from SSH (ā€œhassio host rebootā€ command) for some time it works, then again it is not reachable on port 8123.

I suspect that itā€™s linked to ffmpeg platform (my two security cameras use rtsp protocol)

Iā€™ve updated hass.io to Version 0.51, but the problem remains the same.
PS: yesterday I tried disabling my security cameras (ffmpeg protocol) from home assistant configuration file (#camera: !include cameras.yaml) and for about 12 hours I havenā€™t any problem. Today, after updating to the new version 0.51 I uncommented that line on configuration.yaml and restarted hass. After some minutes the frontend crashed.
I realized that if I disable the cameras the problem does not occur.
But the question remains: how to integrate cameras without the system crashing?

It is related to ffmpeg. I use Hassio since from earlie versions and I always had problems with ffmpegā€¦

I had open a topic awhile ago:

But havenĀ“t came across a solution yet.

Yeah, my cameras no longer work either. Rather given up on trying to use them in HA and just have to bite the bullet and purchase a dedicated system. Too bad though as it could be much better if it was all in HA as it would be centrally located tot he rest of the home information.

1 Like

I did try mjpeg on my Hikvision cameras and works well. But when i start ffmpeg it all stops.

Could the problem be that the ffmpeg is not installed on hassio? Can we by any chans use the apt-get install ffmpeg ?

ffmpeg camera have a bug. I will fix that in next release. But that is a home-assistant bug.

4 Likes

Thank you so much @pvizeli, i will keep you up to date about my cameras after the upgrade to the next release.

Nice ! Canā€™t wait for that fix.
Thx.

1 Like

Nice! Will it be included in next update?

Hi,
Iā€™m new to hassio. Huge learning curve.
I just wanted to know if itā€™s possible to update a component like ffmpeg before the hassio update comes out.
If so how do you do it?
Cheers,
Patrick

Hi!

Sure is a learning curve but its fun :slight_smile:

No i dont think you can do that, ive read somewhere that someone did remove the SDCard and mounted it on a linux install and changed some file. But i think that its better to wait, prolly a fix on this Sundays release.

Yes you can, you need to recreate it in the custom_components folder and then change the updated files. I posted how I did it exactly what you want to do for the remote component hereā€¦

When the update comes out, you just need to delete the relevant folder from custom_components and it will revert to the proper one.

Yep : ā€œUpdate ffmpeg to 1.7 to fix severals problems (@pvizeli - #9029)ā€ :smiley:

HA still crash when I setum my rstp cam :cry:

Same here :frowning:

Same here. I was able to see myself from the frontend for a second and then hass went unresponsive. Iā€™m using hass in docker.