Have to restart HASS after viewing security camera

Hi,

I have an issue when viewing streams from Hikvision security cameras. I am using the Generic MJPEG IP Camera component to view the jpegs from the cameras, when I click on the image I see the live stream from the cam. All fine.

However when I click off the live stream HASS fails to load either the jpeg or the stream. I then have to restart HASS to get the images back.

HA 0.32.1
Ubuntu 16.04.1

Any suggestions?

  # Security Cameras
    camera:
      - platform: mjpeg
    mjpeg_url: http://<username>:<pass>@<IP>/Streaming/channels/102/httppreview
    name: Front
      - platform: mjpeg
    mjpeg_url: http://<username>:<pass>@<IP>/Streaming/channels/102/httppreview
    name: Rear

Log entries as follows:

16-11-06 10:45:17 requests.packages.urllib3.connectionpool: Failed to parse headers (url=http://<IP>/Streaming/channels/102/httppreview): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ''
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/connectionpool.py", line 404, in _make_request
    assert_header_parsing(httplib_response.msg)
  File "/usr/local/lib/python3.5/dist-packages/requests/packages/urllib3/util/response.py", line 59, in assert_header_parsing
    raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
requests.packages.urllib3.exceptions.HeaderParsingError: [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ''
1 Like

Your not alone, I also have the same. Looked into it a while back, and the log entry is a known issue as well. Unsure if there is any work by the devs to resolve it.

2 Likes

The log entry is a red herring as this comes from the third party library being used. The issue with the error message is known to the devs but it is in the library so they can’t fix it until the devs who created the lib fix it. I get this error all the time but it does not effect operation or cause me to have to reboot after looking at my cameras.

Unfortunately, I don’t know what is causing the issue @ronan is having.

1 Like

Cheers for the input guys, appreciated!

I wouldn’t be at the level where I could have a go at the lib. It’s a waiting game so!
R.

I’m in the same boat. I’m sure that once the PR gets updated at their end, the HA devs will merge it in.