Constantly, but not always, getting camera "image not available"

Hey friends,

I’ve bought 2 amcrest wifi cameras that are now integrated in HA. However, the problem is that I constantly get “image not available” on the frontend. I have the image updating every 10 seconds, and eventually it will load the image but then it might not update for another minute (“image not available” comes up).

This is the error that I am getting under “info”.

Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))': /cgi-bin/snapshot.cgi?channel=1

I am using low frame rate and rtsp as mentioned in https://www.home-assistant.io/components/amcrest/. Any ideas on how to make the connection more reliable?

Thanks!
Panboy180

I’m pretty sure this is due to a bug in the HA Amcrest component code. I fixed this a long time ago when I made quite a few enhancements that I needed, but I never got around to feeding the fixes back. (Too many other things going on.) Anyway, if you’re interested, you can check out:

I’m on HA 0.81.6.

Thanks pnbruckner, I’ll definitely check it out and keep everyone updated if it fixes my issues.

I tried it but it didn’t fix anything. I still get the “image not available” occasionally.

Hmm, maybe this is the problem. I’m using the default stream_source of snapshot. I could never get mjpeg or rtsp to work.

Did you need to make any other changes to your config somewhere? I’m using your amcrest custom component and changed my config to snapshot and am still having the same “image not available”

This is my Amcrest config:

amcrest:
  - name: LR IPC
    host: !secret lr_ipc_host
    port: !secret lr_ipc_port
    username: !secret lr_ipc_username
    password: !secret lr_ipc_password
    binary_sensors:
      - motion_detected

Did you use all three parts of the custom component?

Are you sure you’re not just having network issues? Do you have DEBUG enabled and have you looked in home-assistant.log to see if there are any clues?

Thanks pnbruckner,

I did make sure it wasn’t network issues before I posted on the forum. I didn’t do the debugging but I’ll remember to do that next time.

After some troubleshooting I found the solution. I needed the scan_interval to be 10. It is 10 by default, but I had changed it and set it to 5 earlier. I also needed the stream_source to be snapshot and not rtsp.

host: xxx.xxx.x.xx
username: xxxx
password: xxxx
name: backyard camera
resolution: high
stream_source: snapshot
binary_sensors:
  - motion_detected
scan_interval: 10
1 Like