I have a RPi B+ serving a picture from the Pi Cam.
I can access the picture via web browser easily and as expected under the following url: http://10.5.0.53:8080/bwtdisplay.jpg.
I have configured the generic ip camera integration as follows:
All I can see in the overview is the name of the camera with the status “idle” next to it. When I click on the camera, a frame with the camera name is shown but nothing else.
If I add a name attribute to the camera, it is not recognized.
Accessing the picture on the web server directly with chromium gives:
Resource interpreted as Document but transferred with MIME type image/jpeg: "http://10.5.0.53:8080/bwtdisplay.jpg".
But that’s all.
Accessing it via HassIO UI gives:
WebSocket connection to 'ws://10.4.148.228:8123/api/websocket' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
e @ socket.ts:53
camera.generic_camera:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
This is a bit strange. Maybe you should rule out the possibility that there is something with the image encoding from the PI Cam that HA does not like. You could do this by copying the image to the www folder of your config folder and changing the url of the still image to
Yes!
The picture is shown in the UI when I copy it to local www.
But how can I solve the problem? What would I need to change? Something in the HTTP Response?
I tried a different web server on the RPi with the same result.
Browser shows picture “interpreted as document”.
HassIO cannot access it with the following error in the browser console:
app-header-layout.js:191 GET http://10.4.148.228:8123/api/camera_proxy/camera.generic_camera?token=49379b7bc0e9899166a5a4ed3c435ae5ab46518dd131f428d09ec28ccda13c80 500 (Internal Server Error)
The HassIO logs show two errors now:
Connection to tcp://10.5.0.53:8080 failed: Operation timed out
10:24:07 PM – components/stream/worker.py (ERROR) - message first occurred at 10:16:37 PM and shows up 3 times
Timeout getting image from: Generic Camera
10:23:58 PM – generic (ERROR) - message first occurred at 10:16:38 PM and shows up 3 times