mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-06-21 12:09:31 -04:00
zmcontrol calls open() once at startup, then issues light commands much later. By then the camera has dropped the kept-alive HTTP connection and rejects the stale digest token with 401. The write path (PutXML) already retried, but the GET path did not, so lightStatus returned undef (toggle button never updated) and lightOn failed silently. Add GetWithRetry (rebuild UA + re-auth once on 401, same workaround as PutCmd/PutXML) and use it in supplementLightDoc/supplementLightModes. Log a failed supplementLight GET instead of returning undef silently. Verified live: the Light toggle now drives the white light and reflects state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>