I haven't replaced one on a PTZ, but if it is like other Dahua cameras, the pinout is probably as described here:
IPC-HDW5231R-Z - Pinout SOLVED, yet not....
Dahua Wire Color | RJ45 Pin # | T568B Color |
---|
brown | 1 | orange/white |
purple | 2 | orange |
orange | 3 | green/white |
yellow | 4 | blue |
yellow | 5 | blue/white |
blue | 6 | green |
gray | 7 | brown/white |
gray | 8 | brown |
I have used this pinout successfully with an IPC-HFW4431R-Z (4MP varifocal) by wiring it into an RJ45 keystone jack. It is a bit tricky since Dahua uses thin stranded wires internally which isn't easy to work with. I used a little solder to help keep a good connection.
Note that there are 8 pins but only 6 wires in the camera to connect to them. This is intentional.
Take this with a grain of salt; you can look around elsewhere and find different pinouts claimed to work with different cameras. The only way to be 100% sure without just trying it would be to cut the end off with a little extra cable so you can use a multimeter to perform continuity tests between the wires and the pins.