Back to Engineering Blog
Engineering Field Notes 3 min read

Frigate PTZ and the 'Wsse authorized time check failed' Error

New PTZ cameras streamed fine but Frigate could not control them. Factory-default clocks were set to the wrong time zone, so ONVIF authentication failed on a timestamp check. Fixing the clock was not enough: Frigate caches the offset until it restarts.

Jason NevillBy , Houston, TX
#Frigate#ONVIF#Cameras#NTP

Key Architectural Takeaways

  • ONVIF authentication includes a timestamp check, so a wrong camera clock breaks control while video keeps working.
  • Frigate caches the camera's clock offset at startup; restart it after fixing a camera's clock.
  • Find the correct time-zone index by reading the camera's own reported time, not by guessing from a table.

The challenge

We added pan-tilt-zoom control through ONVIF to one existing camera and brought two new PTZ cameras onto the NVR. Streams worked immediately. Pan and tilt did not, and Frigate logged Wsse authorized time check failed.

Root cause

ONVIF uses WS-Security with a timestamp, and the camera rejects (or the client refuses) a login whose timestamp is too far from the camera's own clock. Factory-default cameras of this brand ship with a China time-zone and NTP off, so the camera's ONVIF time was about 13 hours off. Video does not use that check, which is why streams looked healthy while control was broken.

The fix

We set each new camera through its CGI configuration interface:

  • Time zone. The index table differs between firmware versions, so we did not trust a table. We read the camera's own ONVIF GetSystemDateAndTime and matched it: on this firmware 25 was UTC-5 and 26 was UTC-6.
  • NTP enabled against a public time server.
  • Daylight-saving rules for US time. Note that setting DST shifts the clock by an hour once, so reset the time afterwards.

After the change, Frigate reported the expected PTZ capabilities (pan, tilt and zoom) for all three cameras.

The follow-up that bit us

One camera's PTZ broke again after it was physically redeployed with rotation and mirroring changed and rebooted. Frigate reads the camera's clock offset once, at startup, and keeps using it. A camera whose clock was wrong at that moment keeps failing even after NTP corrects it. The cure was restarting Frigate. The rule of thumb we adopted: after any camera reboot or clock change, if PTZ stops working, restart Frigate.

We then reloaded the Frigate integration in Home Assistant so the new camera entities appeared, and added live cards for them to the Home dashboard.

What was left open

We recorded three loose ends: physical movement still needed to be confirmed from the UI for the existing camera, the new cameras needed fixed addresses because Frigate's config is keyed by IP, and the camera config remained live-only. Before the change we took a backup of the Frigate container.

Takeaway

When video works and control does not, check time. Anything that signs a request with a timestamp is a clock dependency, and cameras are rarely shipped with a good clock.

Follow the build on LinkedIn or by RSS.

All Articles

Follow the build

Questions about the build, or spotted something we got wrong? Find us on LinkedIn and GitHub.