Dahua cameras and integration with home automation setup

Joined
Sep 20, 2021
Messages
3
Reaction score
0
Location
South Africa
If you going to target rtsp on ubuntu please note

Ubuntu stopped support for vlc rtsp streams... -- sharing my experience, perhaps you wont slam your head on the desk like i did.

You need to install the snap version -- this stack overflow post has more details

here are directions for the snap install

ps. no comments on rugby please its still sensitive. :p
 

ubntu

n3wb
Joined
Sep 18, 2021
Messages
13
Reaction score
3
Location
Australia
I wouldn't be entertaining the RTSP feed as it will add unnecessary drain on my servers resources... the HTTP feed is a much better option as it won't require any processing power :)
 

DanDenver

Getting comfortable
Joined
May 3, 2021
Messages
489
Reaction score
782
Location
Denver Colorado
None that I am familiar with. I would go with Blue Iris (a software based solution). But ever since I started using Blue Iris (about 7 months) I am now heavily biased towards it. I used an NVR for about 6 years (LaView) and was never able to get ‘actionable’ alerts. My wife eventually tapped out of the alerts as they were so many. Wind blowing, shadows, animals, etc. With Blue Iris those false alerts have been minimized dramatically.
 

The Automation Guy

Known around here
Joined
Feb 7, 2019
Messages
1,413
Reaction score
2,813
Location
USA
None that I am familiar with. I would go with Blue Iris (a software based solution). But ever since I started using Blue Iris (about 7 months) I am now heavily biased towards it. I used an NVR for about 6 years (LaView) and was never able to get ‘actionable’ alerts. My wife eventually tapped out of the alerts as they were so many. Wind blowing, shadows, animals, etc. With Blue Iris those false alerts have been minimized dramatically.
Yeah, AI motion detection is definitely worth it. Luckily you can get AI motion detection from more sources now. A lot of the newer cameras have AI built in. Personally I use Duhua 5442 cameras and utilize the built in AI detections which work great. BlueIris has obviously embraced the AI scheme as well, and I suspect that there are plenty of stand alone NVRs that use AI as well (although I simply am not really familiar with NVRs in general).

I also agree that BI is probably the cheapest, most flexible, and reliable option available. You can easily get a used computer with a i7-6700 and plenty of RAM for $300 or so on EBay. Add some additional storage if needed and a BI license and your total cost will still be well below $500.
 

DanDenver

Getting comfortable
Joined
May 3, 2021
Messages
489
Reaction score
782
Location
Denver Colorado
Yep, even "Ring" has added AI into its lineup. Today, a security system with no AI somewhere along the chain of components is a system that is not as effective as it can be.
 

Left Coast Geek

Getting comfortable
Joined
May 20, 2021
Messages
389
Reaction score
398
Location
mid-left coast
I wouldn't be entertaining the RTSP feed as it will add unnecessary drain on my servers resources... the HTTP feed is a much better option as it won't require any processing power :)

if you are going to have an NVR (be it software or hardware based), then you WANT to use RTSP from the cameras to the NVR, you use http to view either live or recorded video FROM the NVR... example, my BlueIris based NVR (which, yes, runs on Windows.... there is Unix based stuff too, like ZoneMinder)

Screenshot 2021-09-20 201701.png
 

Royce

n3wb
Joined
Jul 9, 2020
Messages
3
Reaction score
0
Location
Milwaukee, WI
I have a question about the AI features of the Dahua cameras (EmpireAndy's 5442 perhaps or whatever model is right): Are those AI features exposed in any way that something like NodeRED (home automation software / programming language) could directly pick up on the in-camera person-detection? (By In-camera I mean not Frigate, DeepStack, or the like, which would run on some off-camera computer) For example, the Reolinks have an in-camera http service that can be polled. The response is a JSON object with various fields set to represent the internal state of the camera. One of those fields represents whether or not the camera can see a person. The technicalities of the method isn't of much concern to me, its more that the method is documented. (Even if that documentation comes from a reverse engineer)

Frigate, DeepStack, and other off-camera AI schemes are great, but it would be better in my mind if the camera could do a half way decent job by itself without having to go through still yet one more insufferable phone app that acquires the AI results via some ridiculous secret-squirrel method. If the 5442 (or whatever) can do that I will seriously consider getting some.
 
Joined
May 1, 2019
Messages
2,215
Reaction score
3,504
Location
Reno, NV
I have a question about the AI features of the Dahua cameras (EmpireAndy's 5442 perhaps or whatever model is right): Are those AI features exposed in any way that something like NodeRED (home automation software / programming language) could directly pick up on the in-camera person-detection? (By In-camera I mean not Frigate, DeepStack, or the like, which would run on some off-camera computer) For example, the Reolinks have an in-camera http service that can be polled. The response is a JSON object with various fields set to represent the internal state of the camera. One of those fields represents whether or not the camera can see a person. The technicalities of the method isn't of much concern to me, its more that the method is documented. (Even if that documentation comes from a reverse engineer)

Frigate, DeepStack, and other off-camera AI schemes are great, but it would be better in my mind if the camera could do a half way decent job by itself without having to go through still yet one more insufferable phone app that acquires the AI results via some ridiculous secret-squirrel method. If the 5442 (or whatever) can do that I will seriously consider getting some.
I am not sure about NodeRed, but @runraid makes an excellent Home Assistant Dahua Camera integration that feeds directly from a single or multiple Dahua camera to HA. You can send temperature to the camera to be displayed and when triggered, the camera alerts the integration where you can do magic!
 

Royce

n3wb
Joined
Jul 9, 2020
Messages
3
Reaction score
0
Location
Milwaukee, WI
Thanks guys. This is super helpful. For whatever reason I had it in my head the ONVIF was a much simpler and more limited thing. But now that I look at the protocol site, I realize it is a major protocol. I'm getting bluetooth vibes, at first glance, with the profiles. I see on the site that there are a variety libraries to start from, so hopefully it won't be a herculean effort just to get at the tiny bits I want to see.

I will check out runraid's thing. I still have yet to click over to HA. I keep waiting for NodeRED to not be be enough. Regardless, runraid's Dahua focused code is sure to be instructive or even directly useful.
 

Left Coast Geek

Getting comfortable
Joined
May 20, 2021
Messages
389
Reaction score
398
Location
mid-left coast
Thanks guys. This is super helpful. For whatever reason I had it in my head the ONVIF was a much simpler and more limited thing. But now that I look at the protocol site, I realize it is a major protocol. I'm getting bluetooth vibes, at first glance, with the profiles. I see on the site that there are a variety libraries to start from, so hopefully it won't be a herculean effort just to get at the tiny bits I want to see.

I will check out runraid's thing. I still have yet to click over to HA. I keep waiting for NodeRED to not be be enough. Regardless, runraid's Dahua focused code is sure to be instructive or even directly useful.
yes, it has a lot of options, but concentrate on the IP camera profile, which I think is "T", and its not that bad. it does include both video streaming AND event/alarm alerting. as a client user, rather tahn as a device, you only need to invoke the specific functions you are interested in.n Its all pretty standard Webservices stuff with SOAP over http and XML.
 

The Automation Guy

Known around here
Joined
Feb 7, 2019
Messages
1,413
Reaction score
2,813
Location
USA
I'm sure there is a way to integrate ONVIF triggers directly into a automation system. However the automation system has to understand and react to these ONVIF commands and not every system can do this. My automation system does not natively understand ONVIF. Luckily, BlueIris does (obviously) and can integrate with MQTT as well. So when my Dahua 5442 camera's AI triggers on motion, it sends an ONVIF command to BI. BI see this command and starts recording the main stream (like anyone's set up) but it also sends out a MQTT command. My automation system does understand MQTT so it can then react to a camera trigger (via the MQTT command) and turn on lights, etc.

So while my setup does require BI to be up and running, it has been very stable and works well. My front porch and flood lights are set to come on at dusk and turn off when we arm the alarm system for "Night mode", but I do have it set up to turn on my porch and outside floodlights whenever the front cameras are triggered and the alarm is set. They will automatically turn off again after a period of time with no movement.
 

Royce

n3wb
Joined
Jul 9, 2020
Messages
3
Reaction score
0
Location
Milwaukee, WI
Interesting. I'll check out that functionality. MQTT is where I'm trying to get to. Maybe that is enough for me.
 

DanDenver

Getting comfortable
Joined
May 3, 2021
Messages
489
Reaction score
782
Location
Denver Colorado
For home automation communication from BI to HomeSeer I skipped an intermediate queue (such as MQTT). Just seemed like one more layer to maintain. I just use the built in capability of BI to launch an https call to HomeSeer and from HomeSeer on an event I just launch a one line command (to BI).

It is true that with this approach I don’t have the durability of a queue, but after six months I haven’t had a command fail going in either direction. That along with not having to install, test, maintain an additional layer (a queue), i am happy

For example, from BI I get alerts when someone approaches my house or front porch. I would still get those alerts when I would exit my front door or the garage door. After integrating my smart home sensors already on my front door and garage door now when I exit my house BI no longer alerts me. Recordings continue of course, but I am not alerted via email. I did this same approach with my back yard. I already had sensors indicating if any of my three back yard doors were open. After tying that into BI I can go into my back yard and not get alerted that I am walking around back there. Once I close the doors, then the alerts start back up again. Super handy for me.

Finally, I could not stand arriving by car to my home and getting an alert that ‘someone is in the driveway’, especially if my wife was coming home from errands, so many false alerts! But after integrating with HomeSeer, the second i open the garage door (which is usually before I enter the actual driveway) alerts are turned off. Then when I enter my home, and naturally close the garage door, the alerts automatically come back on line.
 

alwaysoff

Getting the hang of it
Joined
Nov 26, 2018
Messages
85
Reaction score
65
Location
Australia
In the past 2 weeks, I've bought 4 cameras from @EMPIRETECANDY via his aliexpress shop - shipped to Australia, arrived in about a week or so. Although I have a Centos server that's running OpenHAB, Plex, and serve as a NAS, I have set up a dedicated PC running Windows + BlueIris as per the recommendations here. I'm setting up the cameras in a separate physical network, with the Windows server acting as a router between the cctv network and my home network.

I have only started playing with linking the camera alerts with OpenHAB, e.g. turning on lights, chiming alerts, sending messages, etc. This is done by BlueIris sending MQTT messages which OpenHAB receives and acts upon.

Another thing I am planning to do is activate certain cameras recording only while I'm away, and deactivate them when I'm home. I'm looking for more ideas as well.
 

Mike A.

Known around here
Joined
May 6, 2017
Messages
3,835
Reaction score
6,404
Another thing I am planning to do is activate certain cameras recording only while I'm away, and deactivate them when I'm home. I'm looking for more ideas as well.
I've done home automation for a long, long time. This can get very complicated with multiple people in/out of the home, different schedules, etc., for various automations. In the end, it's often more trouble than it's worth and tends to greatly overcomplicate things. Assuming that you secure your cams/NVR/server properly, the only one who will see the video is you. In most cases, better to just let them run all the time. i.e., Do you really not want to capture some event that may happen while you're home? (Something like 1/3 of home intrusions are while occupied.) If you don't want a cam in some location (e.g., a bedroom), just don't put one there. Put it in another location (e.g., hallway) where it captures someone entering that same room and can run full time.
 

user8963

Known around here
Joined
Nov 26, 2018
Messages
1,465
Reaction score
2,315
Location
Christmas Island
@Plus185

not sure what happened why deleted everything.. but

tested it with one of my 5442... you dont have to change encoding... by asking video.cgi on one of the two substreams it will change to mjpeg settings automatic... but everything above 10fps needs a lot of bandwith to get a good picture on 720p... which was to be expected ;)
 

The Automation Guy

Known around here
Joined
Feb 7, 2019
Messages
1,413
Reaction score
2,813
Location
USA
I've done home automation for a long, long time. This can get very complicated with multiple people in/out of the home, different schedules, etc., for various automations. In the end, it's often more trouble than it's worth and tends to greatly overcomplicate things. Assuming that you secure your cams/NVR/server properly, the only one who will see the video is you. In most cases, better to just let them run all the time. i.e., Do you really not want to capture some event that may happen while you're home? (Something like 1/3 of home intrusions are while occupied.) If you don't want a cam in some location (e.g., a bedroom), just don't put one there. Put it in another location (e.g., hallway) where it captures someone entering that same room and can run full time.
Actually if you can tie your home's alarm system into the automation system, this is pretty trivial. I have a lot of automation cues that are triggered based on the status of the alarm panel rather than a hardcoded day/time because I agree that life isn't so consistent to allow for great time based triggers. While I personally haven't tried to tie this in with BI (but I do control HVAC, lighting, A/V, etc in my setup this way), the architecture is there to support it.

I'm not sure how easy this would be with a stand alone NVR, but it is very easy to set up schedules in BlueIris that would allow you to turn cameras on/off. Then you can set those schedules to change based on a MQTT trigger (that's my understanding at least - I haven't needed to try this myself) from the automation system. You could set up the automation system to send out those particular MQTT commands based on the status of the alarm panel. So when the alarm is "armed away" it could send out a MQTT command to start an "Away" schedule in BI and when it is "disarmed" it could send out a MQTT command that starts a "Home" schedule in BI, etc.
 
Top