Stream from Dahua IPC-A26P

Anyone using Dahua IPC-A26P ? I am trying to add it to home assistant with no luck.

I managed to get snapshot and rstp url, but I do not know how to add it to hass. I tried onvif component and generic camera component.

    still_image_url: http://IP/onvifsnapshot/media_service/snapshot?channel=1
    stream_source: rtsp://IP/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif

For the RTSP stream_source value, try embedding the username and password values for a ‘guest’ type account:

stream_source: rtsp://username:password@IP/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif

Alternately, login to the camera’s GUI using your web browser, and disable ONVIF authentication.
I see it’s an Imou-based device. Use your smart phone app to create a ‘guest’ user (if possible). Does the app allow you to toggle ONVIF authentication?

Ok, looks like you right. I am able to get error message now :slight_smile:

2019-09-15 18:16:51 ERROR (stream_worker) [libav.rtsp] method OPTIONS failed: 401 Unauthorized
Exception in thread stream_worker:
Traceback (most recent call last):

Will try in with new user/password.

Looks like Imou is pretty basic. I do not think I can set up any Onvif auth :/.

I got it working finally :slight_smile: thanks!

Would you please share the Imou settings/options you updated, and also the camera URL you used?

In the end I did not touch Imou settings. Just added user and password to stream link:

stream_source: rtsp://username:password@IP/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif

Which is very stupid because I have username and password in the logs…

Yes, that’s the reason I suggested creating a ‘guest’ account with no privileges.
However, I’m not an Imou user, so I did not know if that’s possible.

You can put the whole stream link into your secrets.yaml

I did. But still in the logs there is full url…

Is it the credentials to the IMOU account or how did you find the username/password for the camera? I’ve got an IMOU Cue 2 I would like to add to HA

I had success with username “admin” - seems that the password depends on the camera: I have a LOOC and a Bullet Lite. The app asks for a “device password” during setup of the LOOC and you should use that password to connect. The Bullet Lite is an older model and it uses a password printed on the sticker on the camera.
I ended up connecting them to my Synology Surveillance Station and then link HA to the Synology…

Seems like the Cue 2 dosen’t have the ability to change password. No password printed on sticker, the app dosen’t ask for device password during setup and I’m unable to recover device passwotd through the app…

I found the password by scanning the qr on the camera. The qr contains a few things, the password is the 8 Numbers and letters after SC: in the text.

did you figure out a still_image_url for this camera as well?

TQ

Did you got motion o person sensor in HA? I configured it with ONVIF but only got video, no sensors. Anynone can share de configuration using RTSP?