Looking for feedback and testing of my Dahua Home Assistant integration (via HACS)

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
This is the initial release, you’ll have to manually add the repo to your HACS integration until it’s officially added (that’s pending a PR review)

It doesn’t support PTZ yet becaise I don’t have a cam to test with.

Seeking feedback on anything that’s broke and missing features/services you’d like to have built in. Thanks!!!

 

MyDaHua

Getting the hang of it
Joined
Jul 10, 2020
Messages
91
Reaction score
37
Location
Poland
Unable to setup for:
Device Type IPC-D2B20-ZS
System Version 2.680.0000000.2.R, Build Date: 2019-03-01
WEB Version 3.2.1.20272
ONVIF Version 18.6(V2.0.0.18395)
Security Baseline Version V1.4
 

Attachments

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
@MyDaHua thank you. Did it happen to have any details in the logs? I don’t have a mini dome to test with but maybe the logs will give a clue
 

MyDaHua

Getting the hang of it
Joined
Jul 10, 2020
Messages
91
Reaction score
37
Location
Poland
Nothing in HA log for Dahua.
This camera need RPC protocol wrapper:
Code:
https://gist.github.com/gxfxyz/48072a72be3a169bc43549e676713201
more info:
 

MyDaHua

Getting the hang of it
Joined
Jul 10, 2020
Messages
91
Reaction score
37
Location
Poland
Testing on:
Device Type IPC-HFW1435S-W-S2
System Version V2.680.0000000.24.R, Build Date: 2021-03-09
WEB Version V3.2.1.1029791
ONVIF Version 19.12(V2.7.1.917204)
Security Baseline Version V2.1
Screenshot_2021-05-26_13-03-18.pngScreenshot_2021-05-26_13-15-46.png
Motion Alarm - ok
Video stream 2 - not ok I can't get live stream ( I have static image from camera )
IR not tested because it is day now.

Code:
Logger: homeassistant.components.stream.worker
Source: components/stream/worker.py:131
Integration: Stream (documentation, issues)
First occurred: 1:03:16 PM (17 occurrences)
Last logged: 1:26:58 PM
Error opening stream rtsp:/****:****@192.168.xx.xxx:544/cam/realmonitor?channel=1&subtype=1

Logger: libav.tcp
Source: components/stream/worker.py:129
First occurred: 1:03:16 PM (17 occurrences)
Last logged: 1:26:58 PM
Connection to tcp:/192.168.xx.xxx:544?timeout=5000000 failed: Connection refused
Nice work.
Thank you.
 
Last edited:

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
@MyDaHua if you toggle ir it removes it from auto mode. You’ll need to put it back to auto if you want it to switch on st night. Either in the cam ui or with the service call in HA. I put the steps in the read me
 

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
@MyDaHua I figured out why the live streaming wasn't working. I had defaulted to the wrong port in the config flow. Remove the camera and change the RTSP port to 554. I'll push out a fix for this but you'll need to readd the camera. Thanks!
 
Joined
May 1, 2019
Messages
2,215
Reaction score
3,504
Location
Reno, NV
I'll have to jump in for this as I have Home Assistant & all Dahua cameras (ptz, double boobie cam, 5442's, 5231's, 4231's, etc).
I do not have HACS setup yet. Still using deprecated zwave, actually :) Just haven't touched it since the start of my tire slashing issue as didn't want any "oops...failure".
 

genelit

Getting comfortable
Joined
Jan 4, 2018
Messages
264
Reaction score
395
Location
Sweden
Hi,

I just upgraded to the latest version, where the alarm function for AD-cams are added and tested to add a few cameras. I haven't used this HA integration so much yet so I don't know if below errors are caused by the new version.

Cameras that are tested and works (at least to connect):
SD59432XA-NR
7442H-Z4
5541
4433

Cameras I cannot connect to:
4239R-ASE
5442RP-ASE-NI

dahua-HA-error.JPG
 

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
Hi,

I just upgraded to the latest version, where the alarm function for AD-cams are added and tested to add a few cameras. I haven't used this HA integration so much yet so I don't know if below errors are caused by the new version.

Cameras that are tested and works (at least to connect):
SD59432XA-NR
7442H-Z4
5541
4433

Cameras I cannot connect to:
4239R-ASE
5442RP-ASE-NI

View attachment 92342
Thanks for testing. The dome cams are slightly more complicated and I don't have one to test with so I've been unable to work on this fix - Add support for Mini-Dome cameras · Issue #4 · rroller/dahua

I'll try to buy one soon so I can get them working.
 

genelit

Getting comfortable
Joined
Jan 4, 2018
Messages
264
Reaction score
395
Location
Sweden
hmm.. Both the 5541 and the 4433 are domes, if it matter.

Let me know if you want me to test something specific, Il'd be more than happy to do so!
 

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
@genelit does this work for you against one of the non-working cams? (replace the IP address with the IP address of the cam)

http://ip_address/cgi-bin/configManager.cgi?action=getConfig&name=General
 

genelit

Getting comfortable
Joined
Jan 4, 2018
Messages
264
Reaction score
395
Location
Sweden
@genelit does this work for you against one of the non-working cams? (replace the IP address with the IP address of the cam)

http://ip_address/cgi-bin/configManager.cgi?action=getConfig&name=General
Yes, this works fine for both cameras, when I logon of course.
 

DDDRelic

n3wb
Joined
Nov 28, 2017
Messages
15
Reaction score
12
Hi @runraid Are you able to supply a snippet from a Home Assistant automation that shows what the "event_type" and "event_data" sections would look like (?
I am trying to get an automation running that uses CrossLineDetection (IVS) to trigger external lights, but don't know what the event looks like.

trigger:
- platform: event
event_type: xxxxxxx
event_data: yyyyyyy
entity_id: zzzzz
 

R7r7

n3wb
Joined
Jul 17, 2020
Messages
16
Reaction score
4
Location
Uk
thanks to OP this is fantastic, IPC-HDW3449H-AS-PV works fien as in i can control the following:

LED light - on off and brightness
Sec. light - on off
Siren - on off
and it detects IVS motion.

It would be good if you can add an option to change profiles
Otherwise great work
 
Joined
May 1, 2019
Messages
2,215
Reaction score
3,504
Location
Reno, NV
Curious. Could this integration with Dahua cameras do something similar to BP's Dahua sunrise/sunset utility where it can change Dahua camera profiles, Zoom In/Out profiles, etc? I use BP's utility everyday. However, it is based on a set time. Wouldn't mind using Home Assistant to tell the Dahua cameras to change profiles based on my weather station LUX reading instead.
 

runraid

Getting the hang of it
Joined
May 22, 2020
Messages
155
Reaction score
83
Location
Seattle
Totally possible. I just need to add support for profiles and ptz. It’s on my list. Feel free to open an issue in GitHub for tracking.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,032
Reaction score
48,800
Location
USA
All these goodies will cause me to move this up my to do list LOL.

It would be great to do it based on LUX reading so that when you get that dark thunderstorm in the middle of the day that looks like night, or dark clouds at dawn/dusk, it can keep better camera settings.

Would love to be able to also set a BI profile based on if it is raining at my house! I have a profile set up that has less sensitive motion, turns PTZs down, etc. for heavy rain events that want to trigger cams all night or day, and it would be nice to automate that part too!
 
Joined
May 1, 2019
Messages
2,215
Reaction score
3,504
Location
Reno, NV
All these goodies will cause me to move this up my to do list LOL.

It would be great to do it based on LUX reading so that when you get that dark thunderstorm in the middle of the day that looks like night, or dark clouds at dawn/dusk, it can keep better camera settings.

Would love to be able to also set a BI profile based on if it is raining at my house! I have a profile set up that has less sensitive motion, turns PTZs down, etc. for heavy rain events that want to trigger cams all night or day, and it would be nice to automate that part too!
oooo...good point about changing camera profiles based on rain/snow. Didn't think of that one!
 
Top