Trying to get my IP camera working with mjpeg and having problems. I can access the following URL from my desktop browser and load and view the mjpeg stream without issue:
With this, the picture entity card loads up on the dashboard blank.
Looking at network logs from browser developer tools, I see that network requests to https://hass.mydomain.com/api/camera_proxy/camera.front_yard?authSig=xxxxx are failing with 500 server errors. The same happens when I click the card to try to view the camera feed.
How can I debug this further? Where would I find server logs showing me why the proxy is throwing 500 errors. Looking at the home-assistant.log doesn’t show me anything.
Note: I also tried using the camera IP address rather than hostname. Same problem.
Update: Found this log under supervisor > system > core logs, but not very much usable info:
I have tried including the basic auth credentials in the URL, but that doesn’'t work either.
I don’t understand how the problem could be on the camera’s side if I can load the mjpeg stream using the same URL from various other platforms. As a test, I even created a picture entity card with the image set to http://admin:[email protected]/cgi-bin/mjpg/video.cgi?channel=1&subtype=2 and it works. Unfortunately, that is not a good solution. For whatever reason, it seems to only be a problem when loaded from the camera proxy.
I am also seeing 500 errors on my system; the Firefox debug console lists the response headers as:
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
Content-Length: 26
Date: Mon, 29 Aug 2022 21:05:22 GMT
Server: Python/3.10 aiohttp/3.8.1
The camera is running the xiaomi dafang hacks firmware and I’m seeing many entries reading 192.168.100.66 dafang-front.lan - [29/Aug/2022:14:06:40 -0700] "GET /cgi-bin/currentpic.cgi HTTP/1.1" 200 385422 "-" "HomeAssistant/2022.8.7 httpx/0.23.0 Python/3.10" so I’m not convinced it’s the camera. Also I have not updated the camera’s firmware in a while but this has started exhibiting recently.
My version info: Home Assistant 2022.8.7 Supervisor 2022.08.5 Operating System 8.5 Frontend 20220802.0 - latest (running on a RPi 3 on Ethernet.)