Author Topic: Q-see/Dahua Camera integration into vera  (Read 27560 times)

Offline silencery

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +14/-1
Q-see/Dahua Camera integration into vera
« on: July 18, 2013, 05:59:48 pm »
About this project:
This project is focused on getting your Dahua & Q-See (US version brand) camera equipment working with your Micasaverde Vera while retaining functionality of your NVR.  I have fixed, rather than PTZ camera models, so I'm afraid I cannot comment on getting PTZ functions working, but more information may be available elsewhere on these forums.

So far, integration into vera means you can only view your live cameras through the vera interface, including web and mobile versions.  While it's not as sophisticated as being able to view your camera's recorded content, it's a good first step.  Please note these instructions do not include getting the stream integrated from the NVR, but rather from the cameras directly.

Some of this information was collected here on the MCV forums and also from the helpful message boards at http://cctvforum.com/.

Added bonus:
If you happen to have one of the Dahua DVR models (Dahua NVR3204/NVR3208/NVR3216 or Q-See QC804/QC808/QC816) which support alarm relay output when motion is detected, you can hook this up to your vera-integrated alarm (such as a DSC1832) and use it to trigger actions in Vera such as turning on lights.

Overview
  • Requirements
  • Setting Up the Dahua/Q-See Cameras & NVR.
  • Vera Setup

Requirements:
  • In addition to the Vera you will need the following.
  • Dahua/Q-see cameras.  These instructions are specific for Dahua manufactured cameras. The principles may be the same for other manufacturers though.
  • Separate POE switch.  This is required in order to expose your cameras on the same subnet as your vera if you are using the Dahua NVR.  Gigabit preferred if your network has a large number of HD cameras.  Here's a cheap one to consider: http://www.newegg.com/Product/Product.aspx?Item=N82E16833156229


Setting Up the Dahua Cameras and NVR:
  • By default, the Dahua NVR acts as a POE switch, and separates the cameras onto a private physical network and subnet (i.e. 10.10.20.x).  As far as I can tell, it does not have the ability to bridge the connection to any other network without hacking the firmware image.  Of course, this means the cameras are not visible to other network devices such as your Vera.
  • To work around this, we need to use a separate POE switch to put everything on your local subnet. In other words, if your Vera's network address is 192.168.1.1, our goal is to get everything assigned 192.168.1.x. 
  • Before the permanent installation, log into your cameras and statically assign each one a proper IP address to match your topology.
  • Make sure your Dahua NVR is also assigned a static IP address.
  • When setting up your Dahua NVR, make sure to plug your POE switch into the NVR's WAN port.  All cameras will plug into the POE switch instead of the built-in POE ports on the NVR. One port on the switch will plug into your regular network as the uplink.
  • If configured correctly, you should be able to log into your NVR and manage the cameras as usual.  You should also be able to log into the cameras directly from your browser without going through the NVR.

Vera Setup:
  • Add your Dahua cameras into Vera by taking the following steps.  These instructions are based on information from http://wiki.micasaverde.com/index.php/Manually_create_IP_Camera_device but tailored for Dahua/Q-see models.
  • For each camera you want to add, go to Apps >> Develop Apps >> Create device.
    • In the Description field enter a name for the device.
    • In the Upnp Device Filename field enter D_DigitalSecurityCamera1.xml.
    • In the Ip Address field enter the IP address and port of the camera. e.g. 192.168.1.22:9988 for Q-see
    • In the URL field, enter: onvif/media_service/snapshot
    • In the MAC field enter the MAC address of the camera. This is required for archiving snapshots on our servers. If you don't want to archive snapshots on our servers, you can leave this empty.  Very important: For the current firmware (1.5.622), there is a strange bug which wipes your settings if a MAC address is entered.  Instead of following the wiki instructions, leave the mac address area blank.

  • Click Create device and reload the Luup engine (press the blue Reload button in the upper right corner of the dashboard).
  • Open the camera's control panel (click on the wrench).
  • Open the Settings tab and enter the required information (URL, username, password, etc.).
  • Save.
  • Repeat for each camera you want to add.

That's it. Now you should be able to view your cameras through the vera web UI and any mobile apps which support cameras. 

Good luck!
« Last Edit: January 15, 2018, 09:41:52 am by Sorin M. »

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 196
  • Karma: +6/-0
Re: Q-see/Dahua Camera integration into vera
« Reply #1 on: August 16, 2013, 05:33:42 pm »
Thanks for the post!!

I have a very similar setup, all my hardware was actually setup this way prior to reading.  Meaning, all on the 192.168.xxx scheme and all are on a separate CAT6 network, two POE switches (2 buildings) and the one UpLink to the internet.  Really helps with network congestion.  My NVR actually only has one Ethernet Jack so I was on the switch right out of the gate.  I have followed your instructions to the letter.  For some reason, I get nothing on the device for the Camera I setup in Vera.  I can and always have been able to hit them directly with the ip address.  It actually brings up their web interface for user id and pass.   My Vera is brand new, latest firmware, many Zwave devices in place and running strong.  I tried without MAC Address and with it as well.  I changed the port number of your example and confirmed in the web interface in the camera settings that the port was correct.  My user id and pass are all good.  Just cant seem to figure out what it might be?

Do you or anyone else have any suggestions?

Would REALLY love to get my cams going through this interface.

Thanks very much!!


Offline silencery

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +14/-1
Re: Q-see/Dahua Camera integration into vera
« Reply #2 on: August 18, 2013, 04:23:10 am »
What's the vera firmware version?

Do you have a screenshot of your settings you can post?

Here's what i've got down for some of the pertinent fields:
  • IP - 192.168.x:x:9988
  • DirectStreamingURL - /nphMotionJpeg?Resolution=640x480&Quality=Clarity
  • URL - onvif/media_service/snapshot

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 196
  • Karma: +6/-0
Re: Q-see/Dahua Camera integration into vera
« Reply #3 on: August 19, 2013, 01:10:38 am »
Hi Silencery,

Thanks for your reply!!

Just finished all my lights and alarm today...eager to get the cams in the mix.

Happy to share my shots with you.

Couple of things...I did remove the "." at the end of this statement in the posted instructions...either way it still didn't work. 
In the Upnp Device Filename field enter D_DigitalSecurityCamera1.xml.

Also, my cams show a different resolution size on the web config interface.
Tried the suggested:
/nphMotionJpeg?Resolution=640x480&Quality=Clarity

Then tried: (my cam resolution size)
/nphMotionJpeg?Resolution=704x480&Quality=Clarity

Still no workie...
I know the user id and password are correct, they work on the web interface every time.
The ip is the exact ip address I use to login on the web interface.
I am using the correct port as shown in the HTTP PORT field of the Cams Network Options through the web interface.

The problem I am getting is Camera URL is invalid.

See below for firmware info for both Vera and the cam.
Fingers Crossed you have some advice to help me get on track so I can do the other cameras as well.

Thanks again!!




« Last Edit: August 19, 2013, 01:20:55 am by ShawnInFL »

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 196
  • Karma: +6/-0
Re: Q-see/Dahua Camera integration into vera
« Reply #4 on: August 19, 2013, 01:12:11 am »
The Camera settings...the post only allows 4 per post  ;)

Offline silencery

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +14/-1
Re: Q-see/Dahua Camera integration into vera
« Reply #5 on: August 19, 2013, 01:39:55 am »
ShawnInFL,

What's the model number of your camera? Is it a q-see or dahua?  On my Q-see setup, the ONVIF port is 9988 (different from webui port and not shown in the UI).


Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 196
  • Karma: +6/-0
Re: Q-see/Dahua Camera integration into vera
« Reply #6 on: August 19, 2013, 02:55:45 am »
BAM!!!
The port number got it!!

STREAMING VIDEO!!!

SWEEEET  ;D ;D ;D

Now, just 9 more to add, that is, since I have the right variables from you my friend!!

Looks a little goofy stretched out on my iPad (iphone app sideways - Vera App)
Looks like I can at least adjust the size in the automator app...
Really wish there was some better looking Zwave Automation software available for the mobile folks.

The Fibaro GUI is awesome!!  Maybe someday...

Anyway, the model, my guess from the info screen on the cam:     IPC-HFW3200C  I believe its a Dahua...
Bought it from an online site...nothing on the cam itself indicates manufacturers model or company.

Can't thank you enough for this..!!!

3:00 am here...I gotta call it a night but I will be adding cams remotely from work tomorrow...LOL

Hope I can return the favor someday...perhaps this thread alone can help another.

Catch ya later

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 196
  • Karma: +6/-0
Re: Q-see/Dahua Camera integration into vera
« Reply #7 on: August 19, 2013, 08:34:49 pm »
Just an update for folks that try this....

For the 10 cameras I had to setup, 2 did not work with these instructions...
Those 2 actually had a newer software version...
Once I got those to the correct version, that fixed the issue.

Offline silencery

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +14/-1
Re: Q-see/Dahua Camera integration into vera
« Reply #8 on: August 21, 2013, 04:41:31 am »
Shawn,

Glad to hear it worked out.  That's awesome news.  Just sorry it took so long; I usually respond faster but things have been crazy lately.

No need to return any favors to me. I've gotten a lot of help on these boards and just wanted to pay it forward. Plus that post took a damn long time to write, so i'm glad at least one person got use out of it... haha.  Good info to know about the firmware. So you had to downgrade to an older software version on the camera?

I'm not on iOS anymore, but when I was, someone here recommended HomeWave.  Tried it once and never turned back.  Probably the best vera app for iOS.  Yes, it's paid, but totally worth it: https://itunes.apple.com/us/app/homewave/id545422004?mt=8

Good luck,

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 196
  • Karma: +6/-0
Re: Q-see/Dahua Camera integration into vera
« Reply #9 on: August 21, 2013, 06:12:52 am »
Will certainly have to give that a try...hey, whats another $6 log on the automation fire. LOL Watching tracking numbers now for next big batch of switches due to arrive tomorrow. Now, if i can only get my leviton 2 & 4 button controllers to do what i want. Pulling my hair out over those suckers. UGH

Are you on Adroid now? If so, how are you liking it for your automation and other most used apps?? Never thought I would say it but Apple really seems to have lost their shine last few years. The lack of flash alone this far in has me over it.  Really, still...come on.

On the firmware, yup, had to downgrade.  Since I noticed absolutely no difference in the cams performance or quality prior to realizing some were on the newer version, and you had a working model for the older, I didn't hesitate to flash the two remaining cams to older ver.

No worries on late reply, I just appreciate your input, big time as this was a biggy for me and was the only post I found at all on the topic. For this, I am very greatful you took the time to make it for us all.

Catch ya later

Offline silencery

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +14/-1
Re: Q-see/Dahua Camera integration into vera
« Reply #10 on: August 21, 2013, 02:39:02 pm »
Yup, the household has moved to android. If you can borrow an android device, try authomation hd. Even the wife likes it.

Offline mchipser

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +0/-1
Re: Q-see/Dahua Camera integration into vera
« Reply #11 on: June 24, 2014, 03:41:10 pm »
In case anyone is still trying to get this to work..

The changes I had to get mine working are..

In the Ip Address field enter the IP address and port of the camera. e.g. 192.168.1.22:9989 for Q-see
In the URL field, enter: /onvif/media_service/snapshot?channel=1&subtype=0

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 196
  • Karma: +6/-0
Re: Q-see/Dahua Camera integration into vera
« Reply #12 on: June 24, 2014, 10:19:40 pm »
mchipser - YOU ROCK!!!! 

So glad you posted the last post...
Now, not only can I finally upgrade the firmware on my cams, 2 of my cameras that never worked through Vera now do!!
I have a really nice PTZ that was never able to use until now.

Thanks for taking the time to post...
I tried through Dahua so many times and always got nothing.

Great Work and contribution to the cause!!

Offline Kalapa

  • Jr. Member
  • **
  • Posts: 55
  • Karma: +0/-1
Re: Q-see/Dahua Camera integration into vera
« Reply #13 on: July 20, 2014, 07:20:12 pm »
I followed the above instructions and am getting "Camera Not Responding" message.  Any idea what I am doing wrong?

IP - 192.168.x:x:8899
DirectStreamingURL - /nphMotionJpeg?Resolution=640x480&Quality=Clarity
URL - onvif/media_service/snapshot
 
Onvif port 8899 is working fine on Synology.
« Last Edit: July 20, 2014, 07:22:20 pm by Kalapa »

Offline ShawnInFL

  • Full Member
  • ***
  • Posts: 196
  • Karma: +6/-0
Re: Q-see/Dahua Camera integration into vera
« Reply #14 on: January 13, 2018, 03:58:57 pm »
Finally upgraded to UI7. Like UI5, having trouble adding my Dahua cams. Came across this handy page to help find the snapshot info. I can see my camera image by snapshot in a browser, but keep getting login screen when adding in Vera. Even after entering credentials at the Vera Test window popup, no luck. Either way, figured I would share this link. Great for Dahua cams. Click on your model number in the list. The site will generate the path for you. Hope it helps someone.

Dahua IP camera URL
 https://www.ispyconnect.com/man.aspx?n=Dahua