Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MJPEG IP Camera broke in 2023.6 #94877

Closed
mariwing opened this issue Jun 19, 2023 · 24 comments · Fixed by #112861
Closed

MJPEG IP Camera broke in 2023.6 #94877

mariwing opened this issue Jun 19, 2023 · 24 comments · Fixed by #112861

Comments

@mariwing
Copy link
Contributor

mariwing commented Jun 19, 2023

The problem

After installing 2023.6 the MJPEG IP Camera integration for my very old D-Link camera broke. It has worked for many years and rolling back to 2023.5 it works "again". I see that something was changed regarding http client and authentication.

I use a url in the format http://username:password@192.168.x.x/image/jpeg.cgi. Opening the url directly in the browser still works but the MJPEG IP Camera integration does not (only shows broken image).

What version of Home Assistant Core has the issue?

core-2023.6.2

What was the last working version of Home Assistant Core?

core-2023.5.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

MJPEG IP Camera

Link to integration documentation on our website

https://www.home-assistant.io/integrations/mjpeg

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

@markdepalma
Copy link

Having a similar issue as well. All my other cameras work, but my old Tenvis camera stopped working and HA returns a 502 Bad Gateway when trying to access.

@markdepalma
Copy link

markdepalma commented Aug 16, 2023

I am only get this to work by hard coding the creds in the request, but even then only still view refreshes work. Still getting the 502 when clicking the camera to open it.

Example: http://IPADDRESS/videostream.cgi?user=admin&pwd=password

@emkookmer
Copy link

I have the same problem with an old Foscam FI9828P (502 Bad Gateway)

My configuration has been with the user/pass in the url since I switched it to the frontend configuration

http://xxx.xxx.xxx.xxx/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=<username>&pwd=<password>`

I also checked the logs, found no errors

@patrickfong
Copy link

Same problem. After upgrading HA my doorbell mjpeg camera broke.

@smacbride
Copy link

I'm having the same issue as well. Worked fine in 2023.5.x

Does anybody have any fixes?

@patrickfong
Copy link

No, still not working. Are there any alternatives?

@castamonte
Copy link

castamonte commented Oct 7, 2023

I have the same problem with my VStarcam c29.
When I trying to see my dashboard there is no image in the card and the message appears in logs "Error getting new camera image from Mjpeg Camera: 400, message="Invalid header value char:\n\n b'Connection: close'\n ^", url=URL('http://192.168.8.111:59975/snapshot.cgi?user=admin&pwd=\<password>')
If I press on the card video is showing well.

@jameshobden
Copy link

I believe I also have this issue. It has also broken notifications for me, as linked above.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@mariwing
Copy link
Contributor Author

mariwing commented Jan 9, 2024

Still an issue, the person that upgraded the dependencies seemingly never even bothered to look at this issue/error report. Frustrating at times to be a Home Assistant user.

@mariwing mariwing closed this as completed Jan 9, 2024
@mariwing mariwing reopened this Jan 9, 2024
@markdepalma
Copy link

markdepalma commented Jan 9, 2024

Still an issue for me.

CORRECTION: I just tried it now and it seems to be working. This must have been resolved in the last two updates.

@github-actions github-actions bot removed the stale label Jan 9, 2024
@smacbride
Copy link

Not working for me. Just tested with 2024.1.2

@hintoz
Copy link

hintoz commented Jan 11, 2024

There is a problem, cameras are not being added to the new house. http://IP/video/mjpg.cgi

@codyc1515
Copy link
Contributor

codyc1515 commented Jan 14, 2024

Can someone facing this issue please post:

  1. URL that you are using (redact the username and password)
  2. Are you using any special characters in either the username or password?
  3. Authentication method - Basic or Digest?
  4. Any applicable logs (enable debug logging, if necessary)?

@smacbride
Copy link

Still Image URL:
http://10.0.0.163/image.jpg (this works)
MJPEG URL:
http://10.0.0.163/video.cgi (not working - used to work about a year ago)

  1. Password does have an "!" in it.
  2. My options dialog doesn't show anything for auth method
  3. I've enabled logging but I don't see any errors. Basically the preview works and when you click on the preview to see the feed, nothing happens, it just brings up an empty window. This used to work several versions ago.

@codyc1515
Copy link
Contributor

Have you tried a simpler password without any special characters? Are you using a username too?

Also, what is the make and model?

@smacbride
Copy link

smacbride commented Jan 15, 2024 via email

@codyc1515
Copy link
Contributor

It looks like your camera supports H.264 which you may find to be more reliable in the mean time. Let us know how you get on with amending your password.

@smacbride
Copy link

smacbride commented Jan 15, 2024 via email

@codyc1515
Copy link
Contributor

Yep, just generic camera.

@smacbride
Copy link

I switched to the generic camera integration and my camera is now working. Thanks to Cody C.

@durin42
Copy link

durin42 commented Mar 3, 2024

I've got an old MJPEG-only camera (DCS-932L) and the preview in lovelace (the camera_proxy URL) endpoint is serving 500s, but the live view (the camera_proxy_stream URL) works fine. It's just HTTP basic auth to the camera, alphabetic-only username and password. I can specify the URL as http://user:pass@IP/video.cgi with no credentials in the MJPEG IP Camera integration, or I can specify it as http://IP/video.cgi with username/password specified in the separate fields and I see the same behavior. Nothing shows up in logs, but I'm happy to tweak a config to try and get useful debug logs if you'll point me in the right direction. Host is a Pi 4 running homeassistant in the provided Docker container (ghcr.io/home-assistant/home-assistant:2024.2.3 as of this writing.)

If I try to specify both forms of authentication, then I do get a log message about how it can't combine the credentials and that things are misconfigured, so I'm extra mystified by the seeming no-log 500 being served.

I hope that's useful information!

@durin42
Copy link

durin42 commented Mar 3, 2024

No sooner than I write that comment, I realized that somehow the still image URL wasn't configured for that camera - adding that fixes the issue. Mysteriously my other camera (an old Foscam) doesn't have a still image and works fine - so maybe the component could do to log when it can't load a requested still image or something? I'm guessing based on the behavior I just saw.

bdraco added a commit that referenced this issue Mar 10, 2024
I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877
bdraco added a commit that referenced this issue Mar 10, 2024
I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877
bdraco added a commit that referenced this issue Mar 10, 2024
I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877
bdraco added a commit that referenced this issue Mar 10, 2024
I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877
balloob pushed a commit that referenced this issue Mar 10, 2024
…112861)

* Fix MJPEG fallback when still image URL is missing with basic auth

I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877

* Fix MJPEG fallback when still image URL is missing with basic auth

I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877

* Fix MJPEG fallback when still image URL is missing with basic auth

I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877

* Fix MJPEG fallback when still image URL is missing with basic auth

I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877
frenck pushed a commit that referenced this issue Mar 13, 2024
…112861)

* Fix MJPEG fallback when still image URL is missing with basic auth

I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877

* Fix MJPEG fallback when still image URL is missing with basic auth

I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877

* Fix MJPEG fallback when still image URL is missing with basic auth

I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877

* Fix MJPEG fallback when still image URL is missing with basic auth

I picked up an old DCS-930L (circa 2010) camera to test with
to fix #94877
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants