Viewing Dahua NVR Camera Snapshot Images from a Web Page

cosmo

Getting the hang of it
Mar 12, 2016
182
18
I want to allow friends to view snapshots from just one camera I have connected to my NVR. But they can see snapshots from all cameras. The NVR software shows that it should be possible, but it appears to have a bug.

I have a Dahua NVR and Dahua cameras connected directly into the NVR.

A Dahua NVR camera snapshot can be viewed via:

http://<domain>:<port>/cgi-bin/snapshot.cgi?channel=<channel 1-x>

In the web access to the Dahua NVR, I select Setup, Account, the Group tab, select the User group, edit it, select the Monitor tab, deselect All, then select 5. If I press OK, it says "Current group is in use now" with an exclamation mark. If I select All, it says "Successfully modified a group". It I change any of the other tab options, it also says that I am successful. So it seems like I cannot deselect any cameras.

The one camera I want to allow people to see is of a public area - a bay. The other cameras are of private areas at my house.

I have tried adding a user to this group, but the same problem exists on the Monitor tab permissions for the user.

It seems like a software bug.
 
Last edited:
Model #'s would help.
NVR:
- Dahua 5208-8P-4KS2 8 port POE NVR
- Web Version: 3.2.3.67674
- System Version:3.210.0002.2, Build Date: 2016-07-21

Cameras:
- Dahua IPC-HDW5231R-Z / IPC-HDW5231RP-Z 2MP WDR IR Eyeball IP Camera 2.7mm-12mm motorized lens Starlight Network Camera
 
I will. But the device is on another continent. Going back there next month. Thx.
 
It is up to you if you want to open external port as you suggest on your post, just an advice nothing more
 
VPNs are great if you are the only one who is ever going to access the system. They suck if you're trying to share access with friends, which is what the OP is trying to do.

@cosmo if you're tech savvy you might set up a proxy server of some kind that only allows access to the one specific snapshot URL. Some years ago I wrote a program that does this sort of thing specifically for IP cameras: GitHub - bp2008/cameraproxy: A Windows Service which acts as a "smart" proxy for IP network cameras. Uses the .NET framework and parts of the VLC media player libraries. But in your case I think a simple http proxy server such as nginx would be fine.
 
  • Like
Reactions: mat200
It is up to you if you want to open external port as you suggest on your post, just an advice nothing more
I do understand the value of this. Thanks for the suggestion. On one of my other installations (Hikviosion) the NVR is occasionally bombarded by hundreds of illegal login attempts. Another reason to set up a VPN. But for now, I want to get the software working as it should. If I can't (buggy), the proxy server might be a workaround.
 
Hi
Maybe you can try to update your 5208-8P-4KS2 to the latest firmware available at http://www1.dahuasecurity.com/Products/ProductDetail/2641
Latest is DH_NVR5XXX-4K_Eng_V3.215.0000000.1.R.20170901

I went to that download page, clicked "Download", which then displays a popup window with a licence agreement. At the bottom, I clicked "Agree with the licence agreement". The popup window disappears and nothing else happens. :-(

Firefox 56.0 (64 bit) on Linux Mint 18.2 Cinnamon 64-bit.

I retried under a VMWare image running Windows 7 with Internet Explorer. Same problem.
 
I found a workaround. Found the link directly to the firmware file in the source code of the popup window.
 
  • Like
Reactions: bp2008
Installed the firmware. Rebooted. Now the web access is completely stuffed. I don't have any side menus.

I then completely removed the web components plug in. Uninstalled from Windows Uninstall Programs, went in to Program Files (Both) and deleted the Webrec directories, went into the registry and deleted all occurrences of webrec, rebooted, installed the latest Web Components, logged into the NVR and I still get the following (See attached images).

Thanks Dahua again for your crappy software and updates. Now my NVR is hosed. Useless to me.
 

Attachments

  • Screenshot from 2018-01-16 10-53-25.png
    Screenshot from 2018-01-16 10-53-25.png
    105.7 KB · Views: 36
  • Screenshot from 2018-01-16 10-53-39.png
    Screenshot from 2018-01-16 10-53-39.png
    68 KB · Views: 34
  • Screenshot from 2018-01-16 10-53-49.png
    Screenshot from 2018-01-16 10-53-49.png
    68.5 KB · Views: 30
A long shot but the browser cache can sometimes cause rendering problems between firmware updates.
I just cleared the cache. Yep, that worked. Thank you.

So now I have the web interface back. It seems they did make some updates. Now I can at least save my camera selection preferences. But it still allows anyone to view all the cameras, even if the group and user are deselected for them.

Still a problem.
 

Attachments

  • Screenshot from 2018-01-16 17-17-53.png
    Screenshot from 2018-01-16 17-17-53.png
    98.1 KB · Views: 32
How technical are you willing to get?

I think the best solution would be to setup a reverse proxy server. Basically it's a specially configured webserver like Apache or Nginx and you would configure it so when e.g someone accesses example.com/cam.jpg it acts as a proxy server and redirects that request to http://<domain>:<port>/cgi-bin/snapshot.cgi?channel=1 You could run the reverse proxy on something like a raspberry pi or even a cheap VPS service and in that case you can go a step further and configure the firewall in front of your NVR to only allow access from the IP address of the VPS so that you're not opening up the NVR to the world.
 
  • Like
Reactions: mat200
There is no need to change how you remotely control the NVR. For your friends to access the snapshot they would only access it by reverse proxy and you should change/disable the password you have previously given them.
 
  • Like
Reactions: mat200
Interesting idea. I like it. Haven't done any Raspberry Pi dev yet, only Arduino, but I'll check it out. Thx