How to share an USB camera from a remote ZM server to another ZM Server

From ZoneMinder Wiki
Jump to navigationJump to search

Go back to the How To pages...

Prerequisites

  • Any compatible USB camera.
  • IP address of the remote Zone Minder server.
  • Username and password if authentication was enabled on servers.
  • Administrator access to Zone Minder.

Camera configuration on remote server

  1. Login to Zone Minder.
  2. Click on the "Add New Monitor" link located at the bottom of the page, this will take you to the configuration page for adding a new camera. Configure your camera and check if is working, then set it as:
    • Function: Monitor
    • Enabled: Yes
  3. Write down the id number of the monitor(s), you can find on monitor window:
 hhttp://server_ip/zm/index.php?view=monitor&mid=1 <--- This is the id you're looking for.

Camera configuration on local server

  1. Login to Zone Minder.
  2. Click on the "Add New Monitor" link located at the bottom of the page, this will take you to the configuration page for adding a new camera. Configure as:
  3. On General Tab:
    • Source Type: Remote
  4. On Source Tab:
    • Remote Protocol: HTTP
    • Remote Method: Simple
    • Remote Host Name: IP of the remote server (for example 192.168.1.1)
    • Remote Host Port: 80 (if you changed the port of the Zone Minder remote server use what you have set)
    • Target Colorspace: better match it with the source camera
    • Capture Width and Height: better match it with the source camera
    • Remote Host Path:

This is the tricky part and the most important, the code you need must be inserted in this order:

 /cgi-bin/nph-zms?mode=jpeg&monitor=<MONITOR_ID_HERE>&scale=100&maxfps=10&buffer=1000&user=<USERNAME>&pass=<PASSWORD>

where <MONITOR_ID_HERE> is the id number of your monitor and <USERNAME> and <PASSWORD> are your login information on remote server.

If you didn't enabled authentication:

 /cgi-bin/nph-zms?mode=jpeg&monitor=<MONITOR_ID_HERE>&scale=100&maxfps=10&buffer=1000


The PATH_ZMS found in your ZM server options may be different, so do verify that. For instance, in the 16.04 Lubuntu ZoneMinder distro the full remote host path might be similar to this:

 /zm/cgi-bin/nph-zms?mode=jpeg&monitor=2&scale=100&maxfps=10&buffer=1000

Do be aware that if you do get PATH_ZMS wrong the sever system may go into an endless, hard drive melting loop of trying to connect which is easily silenced by setting the monitor function to none.

The rest of the settings are with you.

That's it. The camera is now linked on the local server. Expect some light delay, is normal.