mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-07 05:03:00 -05:00
In a multi-server setup a PTZ move, preset or light command sent to one server for a monitor that another server records never reached the camera. Monitor::sendControlCommand() passed the zmcontrol option string to the other server's monitors/daemonControl API, which only starts and stops zmcontrol.pl, so the request built a URL like daemonControl/4/ --panspeed=51 ... --command=moveConLeft/zmcontrol.pl.json and answered "Failed". The web UI's own PTZ buttons send to the monitor's server and were not affected; clients that send every request to the server they log in to (zm-py, pyzmNg, zmNinjaNg, aiozoneminder) and monitor actions whose target is on another server were. ajax/control.php now hands such a request, as received, to the index.php of the server that records the monitor (or the action's target), with the auth relay in place of the caller's credentials, and answers with that server's reply. That server checks the permissions and builds the command itself. A request is forwarded at most once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>