This method was tested on a Unifi Protect G4 PTZ Camera.
Instructions:
-
Enable SSH on camera: log into Unifi appliance via SSH, open
/usr/share/unifi-protect/app/config/config.jsonin an editor, and change"enableSsh": falseto"enableSsh": true. -
Get camera SSH password: this is the "Recovery Code" found in the Unifi Protect settings under "Other Configurations."
-
Connect to camera via SSH:
ssh ubnt@x.x.x.xusing the password from (2) -
Run these commands to set pan, tilt, and zoom:
ubnt_ipc_cli -T=ubnt_ispserver -m='{"functionName":"ChangeIspSettings", "zoomPosition":12}'