Trouble configuring DLINK camera

I am trying to configure a DLINK DCS-932LB1camera working in HASS.

I configure as

  - platform: mjpeg
    name: garage cam
    mjpeg_url: http://192.168.7.55:8121/video/mjpg.cgi
    still_image_url: http://192.168.7.55:8121/image.jpg
    user: !secret garage_cam_user
    password: !secret garage_cam_password

It doesn’t work. I find an error in the log but don’t know what is wrong.

The error is serving 192.168.7.30 which is the IP of my computer on which I am accessing the HASS UI.

2018-07-08 08:14:58 INFO (MainThread) [homeassistant.components.http.view] Serving /api/camera_proxy_stream/camera.garage_cam to 192.168.7.30 (auth: False)
2018-07-08 08:14:58 ERROR (MainThread) [aiohttp.server] Unhandled exception
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_protocol.py”, line 398, in start
await resp.prepare(request)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_response.py”, line 300, in prepare
return await self._start(request)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_response.py”, line 605, in _start
return await super()._start(request)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_response.py”, line 367, in _start
await writer.write_headers(status_line, headers)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/http_writer.py”, line 100, in write_headers
self._write(buf)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/http_writer.py”, line 57, in _write
raise ConnectionResetError(‘Cannot write to closing transport’)
ConnectionResetError: Cannot write to closing transport

If I simply open the URL:http://192.168.7.55:8148/video/mjpg.cgi in my browser it works fine after authentication.

Does anyone know if this camera should work or not?

I am not sure how HASS authenticates but I notice the camera doesn’t work with the command line login options. I think perhaps that is the issue with this camera. Is there a good way to test if a camera should work with the mjpeg platform component?

SOLVED: I got this working. It turns out there was a firmware update in May that addressed this not working. V2.16.08 (May 15, 2018) firmware makes authentication: digest mode start working.
It also requires you pass the username and password in the URL so there are a combination of things you need to do.

The working config is as follows

  - platform: mjpeg
    name: garage cam
    mjpeg_url: !secret garage_cam_video_url
    still_image_url: !secret garage_cam_still_url
    user: !secret garage_cam_user
    password: !secret garage_cam_password
    authentication: digest

Note that mjpeg_url needs the format

http://{user}:{password}@{ip}:{port}/mjpeg.cgi
1 Like

amigo vc pode me ajudar sou novo aqui gostaria de integrar minha camera como faço?