Connecting the hardware¶
This chapter covers getting a Dahua recorder talking to Protequ. There is no discovery — the recorder, its channels and its alarm outputs are added by hand. Fields and addresses are on the configuration page. What appears in the event log is on the Events page.
How Protequ reaches it¶
Over an IP network, directly. There is no converter. Protequ is the client and opens two links to the recorder:
| Link | Port | What it carries |
|---|---|---|
| Recorder web interface (HTTP) | 80 by default |
commands, status, clock, events |
| Video (RTSP) | 554 by default |
live picture, recorded playback |
Both links use the same username and password. Protequ logs in with HTTP Digest authentication, so the recorder must accept that account on its web interface.
Protequ keeps one long-lived HTTP connection open for the event stream. The recorder sends a keep-alive on it. If nothing at all arrives for 90 seconds, Protequ declares the link lost and reconnects by itself, with a growing delay between attempts. A short outage therefore shows up about a minute and a half later, not instantly.
Video is pulled by the Protequ video component, not by the adapter, so the Protequ host must reach the RTSP port as well — not only the web port.
Only plain HTTP is supported. There is no HTTPS, and traffic is not encrypted, so the site network must be trusted.
One recorder per adapter. A second recorder means a second adapter instance.
Events are live only. Anything that happens while the link is down is lost; the recorder's own log is not read back afterwards.
Before you start¶
- Protequ on Windows or Linux with the Dahua adapter selected (see In Protequ).
- The recorder has a fixed IP address the Protequ host can reach (same VLAN, or a permitted path to the web port and the RTSP port).
- The web port and the RTSP port as they are set on the recorder. The defaults
are
80and554; a site may use others. - An account on the recorder for Protequ. It must be allowed to do everything you expect Protequ to do: watch live video, play recordings, take snapshots, move PTZ cameras and store presets, switch alarm outputs, and read and set the recorder clock.
- The cameras are already connected on the recorder and show as online there. Protequ reads channel state from the recorder; it does not add cameras to it.
- The channel numbers as the recorder shows them, and the port numbers of the alarm outputs you will use.
- The Protequ host clock is correct (NTP). When the recorder clock differs by more than two minutes, Protequ writes the host time onto the recorder. A wrong host clock is copied onto the recorder.
Fill in before you arrive:
Recorder IP: ........................
Web port: 80 (default)
RTSP port: 554 (default)
Username: ........................
Password: ........................
Channels to add (numbers): ........................
Alarm outputs to add (1-16): ........................
On the equipment¶
The adapter needs no special mode on the recorder. What has to be true:
-
Address and ports. A fixed IP, and the web port and RTSP port noted from the recorder's network settings. Plain HTTP must be accepted on the web port; an HTTPS-only setup cannot be used.
-
Account. A user with the rights listed above. Test it first by logging in to the recorder's own web page with that name and password.
-
Cameras online. Each channel you intend to add is connected on the recorder and shows a picture there.
-
Detection. Protequ only listens; it never switches detection on. Motion, tripwire, intrusion, face and similar analytics are configured on the recorder or the camera, and Protequ reports what they send.
In Protequ¶
Install the adapter first, then add the recorder. The steps are the same on Windows and Linux.
Windows. Run the Protequ installer and select Dahua (CCTV) in the adapter catalog. The adapter runs as a service. You do not install Docker or a separate .NET runtime.
Linux. On Ubuntu 24.04 or 22.04 (x86_64) download
pq-installer-online-v…-linux-x86_64.tar.gz from repo.protequ.com, unpack it
and run sudo ./run.sh. The installer installs Docker Engine if it is missing.
In the catalog select Dahua (CCTV) — that pulls pqdahua and starts it as a
container. Adding the adapter later means running the installer again.
Confirm both ports, not only ping:
Windows: Test-NetConnection <NVR_IP> -Port 80
Test-NetConnection <NVR_IP> -Port 554
Linux / macOS: nc -z -v -w3 <NVR_IP> 80
nc -z -v -w3 <NVR_IP> 554
TcpTestSucceeded : True on both means continue. Timeout or refused is VLAN, a
firewall, a wrong IP, or a port the recorder does not use.
Devices → Add device. Adapter Dahua, type Dahua NVR, name it, then fill in the address, the ports, the username and the password. Wait until the card is no longer Stopped.
Then add the children by hand — nothing appears on its own:
- one Dahua Channel per camera, address = the channel number as the recorder
shows it, counted from
1. Up to 64 under one recorder. - one Dahua Output per alarm relay you want to switch, address = the output
port number counted from
1. Up to 16 under one recorder.
| You set on the equipment | You enter in Protequ |
|---|---|
| Recorder IP | IP address |
| Web port (default 80) | Port |
| RTSP port (default 554) | RTSP port |
| Recorder account | Username |
| Account password | Password |
| Camera channel number | Address on the channel |
| Alarm output port number | Address on the output |
Site extension — a new camera¶
When a camera is added on the recorder, do not add the recorder again. Add one more Dahua Channel under the recorder already in the tree, with the new channel number. The address, ports and account stay as typed on the recorder card.
Confirm it works¶
- The recorder card is connected.
- A channel plays live video, and a snapshot returns a picture.
- Recorded playback starts and a seek moves it.
- On a PTZ camera, a move and a preset work.
- An output activates and deactivates, and the relay follows.
- Trigger a detection that is enabled on the recorder (walk in front of a camera). The event appears on the correct channel.
- Disconnect a camera from the recorder. Within about 10 seconds Protequ marks that channel as signal lost and stops its video; reconnect it and the channel clears by itself.
- Protequ and recorder clocks differ by less than two minutes.
- Unplug the recorder's network cable: Protequ reports the link lost within about 90 seconds; after reconnection the card comes back without a restart.
If it does not connect¶
| What you see | What to do |
|---|---|
| The web port does not answer | VLAN, firewall, wrong IP, or the recorder uses a different web port |
| The port answers, the card stays Stopped | Wrong username or password, or the account is not allowed in. Log in to the recorder's own web page with the same values |
| The card stays Stopped and the recorder is HTTPS-only | Not supported. The recorder must accept plain HTTP on the web port |
| Card is connected, tree is empty | Channels and outputs are added by hand — nothing is imported |
| Card is connected, no events at all | The detection is switched off on the recorder or the camera. Protequ does not turn it on |
| Channel shows signal lost | The camera is offline on the recorder itself. Fix it there; Protequ clears the state within one poll (10 s) |
| Live video does not start, everything else works | The RTSP port is unreachable from the Protequ host, or the RTSP port on the card is wrong |
| Playback starts at the wrong time | The recorder clock. Protequ corrects it only when it is off by more than two minutes |
| An output switches the wrong relay | The address is the port number counted from 1, not from 0 |
| The card drops and reconnects about every 90 seconds | Something in the path closes the long-lived event connection — a proxy, a firewall idle timeout, or an unstable link |
| Events are missing for the time the link was down | Expected. The recorder is not read back after an outage |
| A second recorder does not fit on the card | One recorder per adapter instance. Install another adapter instance for it |