core: still_image_url: not work, Source: components/generic/camera.py:149 error.

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

I wanted to tell you that after the last update some of my cameras stopped showing the snapshot, this is the error message that I get in the logs.

Error getting new camera image from Camera2: peer closed connection without sending complete message body (received 11200 bytes, expected 11248)

Before updating they worked correctly. my configuration is the following,

Describe the behavior you expected

If I paste the still_image url in my browser it shows me the snapshot. so communication to the DVR is there and it works in the browser, but not within Homeassistant.

Steps to reproduce the issue

Before updating they worked correctly. my configuration is the following,

platform: generic name: Camera2 stream_source: “rtsp: // admin:password@10.10.0.150: 554 / cam / realmonitor? channel = 1 & subtype = 00” still_image_url: “http://10.10.0.150/onvifsnapshot/media_service/snapshot?channel=1&subtype=0” username: admin password:! secret dahuapw verify_ssl: false authentication: digest

What version of Home Assistant Core has the issue?

core-2021.3.1

What was the last working version of Home Assistant Core?

core 2021.2.3

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

Kubuntu and Windows 10

State of relevant entities

# Paste your state here.

Problem-relevant frontend configuration

# Paste your YAML here.

Javascript errors shown in your browser console/inspector

Logger: homeassistant.components.generic.camera
Source: components/generic/camera.py:149
Integration: generic (documentation, issues)
First occurred: 22:59:11 (9 occurrences)
Last logged: 23:01:46

Error getting new camera image from Camara4: peer closed connection without sending complete message body (received 31388 bytes, expected 31436)
Error getting new camera image from Camara3: peer closed connection without sending complete message body (received 50168 bytes, expected 50216)
Error getting new camera image from Camara8: peer closed connection without sending complete message body (received 9804 bytes, expected 9852)
Error getting new camera image from Camara5: peer closed connection without sending complete message body (received 64172 bytes, expected 64220)
Error getting new camera image from Camara7: peer closed connection without sending complete message body (received 6200 bytes, expected 6248)# Paste your logs here.

Hello good evening, The same thing happened to me with a Dahua DVR that I have configured as generic. After the 2021.3.0 update, the “still_image_url:” parameter stopped working, it doesn’t show me the snapshots anymore. sorry for my bad english

My configuration:

platform: generic name: Camara4 stream_source: “rtsp://admin:#######@10.10.0.150:554/cam/realmonitor?channel=4&subtype=00” still_image_url: “http://10.10.0.150/onvifsnapshot/media_service/snapshot?channel=4&subtype=0” username: admin password: !secret dahuapw verify_ssl: false authentication: digest Logs: Logger: homeassistant.components.generic.camera Source: components/generic/camera.py:149 Integration: generic (documentation, issues) First occurred: 22:59:11 (9 occurrences) Last logged: 23:01:46

Error getting new camera image from Camara4: peer closed connection without sending complete message body (received 31388 bytes, expected 31436) Error getting new camera image from Camara3: peer closed connection without sending complete message body (received 50168 bytes, expected 50216) Error getting new camera image from Camara8: peer closed connection without sending complete message body (received 9804 bytes, expected 9852) Error getting new camera image from Camara5: peer closed connection without sending complete message body (received 64172 bytes, expected 64220) Error getting new camera image from Camara7: peer closed connection without sending complete message body (received 6200 bytes, expected 6248)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Sure, I will keep an eye on this

The library used to grab the still images was changed from a combination of requests and aiohttp to httpx. httpx is more strict with some http protocol violations than the other two libraries - my guess is your NVR might be sending an invalid content-length. Can you try running the curl command below (please fill in your pw and redact it on the output) and sharing the output? curl --digest -u admin:yourdahuapw -X -HEAD -I http://10.10.0.150/onvifsnapshot/media_service/snapshot?channel=1&subtype=0

This is an issue with the integration in core, not the frontend. I’m going to transfer it.