Home Assistant hangs when camera component in config

Hey everybody! I have been setting up a new hassio instance and I am currently integrating my Blue Iris IP Camera NVR software into home assistant. All I am using is the live stream. Blue Iris already handles all of the recording and image processing. The problem I face is that although the config checks out and HA works for a few minutes (cameras do not load), the frontend looses connection and HA hangs. The only fix is editing the camera component out with Samba or configurator (if a port is assigned and doesn’t rely on Ingress and restarting home assistant from the hassio shell.

HA is running in a VirtualBox VM on an x86 machine using a stable release of the supplied Virtualbox disk image. I have tried this with/without the stream component, and with the camera platforms “generic” and “mjpeg”. Below are the relevant configuration.yaml entries. I have tested the URLs with ONVIF device manager and a browser to confirm they work.

MJPG config

# Blue Iris Cameras

stream:

camera:
  - platform: mjpeg
    mjpeg_url: "http://10.0.0.39:81/mjpg/frontporch"
    name: frontporch
    username: !secret bi_username
    password: !secret bi_password
    authentication: basic

GENERIC config

# Blue Iris Cameras
    
stream:   
 
camera:
  - platform: generic
    name: Garage
    still_image_url: http://10.0.0.39:81/image/garage
    stream_source: rtsp://10.0.0.39:81/mjpg/garage
    username: !secret bi_username
    password: !secret bi_password

Any help would be appreciated, and I think next time I try this, I will monitor the VMs usage and see if it could be a memory leak.

Having exactly the same problem ( front end becomes unresponsive) if I enable a stream_source for my cameras. Running Hassio 0.92.0 image on an core-i7 mini PC. Resources (CPU or memory) don’t seem to be the issue.

Really odd. Yeah I was still able to access my addons such as The Lounge and my Samba share was still running fine. As far as I can tell, people have had issues like this with FFMPEG since 2017. Really hope it gets fixed.

Really odd bug too. If you refresh you get the frontend with an error that it can’t connect to Home Assistant but sometimes it will just be an unresponsive page. Really strange.

That could be a caching issue. Try CTRL + F5. That will probably result in a server error.

Just put the config back. Force refresh and a completely different browser just gave a dead page. The camera component definitely wrecks the frontend. I’ll check tomorrow if it stops automations too.

It did for me. Stopped mqtt sensor reception as well. So back and front end crash. Only the addon containers were working.

1 Like

Do you have any problems if you access the camera feed directly from HA without going thru BI first and without using the “stream:” component?

I’m on v91.3 and that’s the way I have mine set up and I have no issues.

Just wondering if it’s the camera, BI or “stream:” that is causing the issue.

I’d be interested to know before I update to v92.

I just tried with the direct camera stream. Same deal. I still would rather use BI because it does my image processing and watermarking.

I still use BI for all of my NVR stuff. I just don’t use it for streaming the feeds to HA.

1 Like

I would do that but some cameras are mounted odd and color issues that needed BI image processing.

Got the same problem. Doesnt matter if i add a camera as generic or ffmpeg.

I had the same error and removed the camera from home assistant for the moment

I have the very same problem. Configured generic camera, sooner o later HA hangs and i have to reboot it. With more cameras (i have still some to put in place and configure), the problem arises sooner.
Currently i had to remove all cameras from HA yaml files.

Cameras comes from Blue Iris.
With 0.92.2 was somewhat stable and working.
With 0.93 i’m down in hell.

No sign of problems in log files.

For me, it wasn’t the camera configs themselves causing the hassio lockups: the stream: option in my config was the culprit. Three cameras were working fine for months. But once I added the stream setting to my config the problems started. Typically within an hour or so of using a stream capability such as streaming to the TV or viewing the live stream on my phone. Didn’t matter if I had recently rebooted or not, and only a power cycle would get it going again. Drove me mad for a while and I’m not sure how I failed to notice that the issue started with the introduction of tge new stream function.

Having removed the stream setting almost 3 weeks ago my hassio install is rock solid again, no issues. I can still view all my cameras but just can’t get a live stream or stream to the TV. That’s fine for now, stability is more important.

The lockups occurred on both a tinkerboard s and in VirtualBox on a Windows 8 machine.

I also have Blue Iris and if I use the stream: component then it just doesn’t work well with my setup. It lags pretty bad if the stream ever even starts. This is with both the stream from BI and with the stream from the camera(s) directly.
The strange thing is that I have some PTZ presets on a couple of my lovelace cards as outlined here:

…and if I hit any of the PTZ buttons when stream: is in the config then HomeAssistant crashes. I have to SSH in and use the CLI to restart.

Ok, i just removed the stream:
Now HA is blazing fast, rock solid. Stream is way from being usable.

I went back to the old system.

1 Like

What method do you use without stream? Stream crashes my HA instance but I would like my Blue Iris cameras in HA.

If you remove “stream:”
you will get picture-glance that use still images refreshed every like 10 seconds, and if you click on them, you will get the video. Less features, but at least it works well.

I realized that with 1 or 2 cameras, you can use stream (if it works), but if you have 10 4-5MP cameras, there is no way you can render them all in a web page without putting your client on it’s knees.

I meant, using the “live” option.

Same issue with 8 unifi cameras, enabled stream and every morning I would find hass hung and have to restart the process

Ive got the same issue. Would really love a fix as I’ve chromecasts on all my TV’s and 2 google smart displays which can stream the camera feeds. I’m using 0.95.4

Does anyone have a workaround for this? Even an automation to reboot after crash may help, anyone?