Trouble configuring DLINK camera

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

I configure as

  - platform: mjpeg
    name: garage cam
    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 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 (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/”, line 398, in start
await resp.prepare(request)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/”, line 300, in prepare
return await self._start(request)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/”, line 605, in _start
return await super()._start(request)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/”, line 367, in _start
await writer.write_headers(status_line, headers)
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/”, line 100, in write_headers
File “/srv/homeassistant/lib/python3.5/site-packages/aiohttp/”, line 57, in _write
raise ConnectionResetError(‘Cannot write to closing transport’)
ConnectionResetError: Cannot write to closing transport

If I simply open the URL: 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

1 Like

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