[Config Support]: Onvif PTZ controls 'Sender not Authorized' #11294
-
Describe the problem you are havingI read the discussion #10265 which had PTZ issues too and I activated the logger for onvif ptz as discussed there. The problem is that Frigate is able to communicate and pull the preset list using ONVIF. But when trying to move camera to a preset position nothing happens. Tried also to setup PTZ calibration at starup but this fails too. ONVIF needs authentication as I tried without it and it could not load the preset list. Version0.13.2-6476F8A Frigate config filezones:
zone_0:
coordinates: 58,720,442,720,438,0,49,0
onvif:
# Required: host of the camera being connected to.
host: 192.168.0.200
# Optional: ONVIF port for device (default: shown below).
port: 80
# Optional: username for login.
# NOTE: Some devices require admin to access ONVIF.
user: "{FRIGATE_FRONT_CAMERA_USERNAME}"
# Optional: password for login.
password: "{FRIGATE_FRONT_CAMERA_PASSWORD}"
autotracking:
# Optional: enable/disable object autotracking. (default: shown below)
enabled: True
# Optional: calibrate the camera on startup (default: shown below)
# A calibration will move the PTZ in increments and measure the time it takes to move.
# The results are used to help estimate the position of tracked objects after a camera move.
# Frigate will update your config file automatically after a calibration with
# a "movement_weights" entry for the camera. You should then set calibrate_on_startup to False.
calibrate_on_startup: True
# Optional: the mode to use for zooming in/out on objects during autotracking. (default: shown below)
# Available options are: disabled, absolute, and relative
# disabled - don't zoom in/out on autotracked objects, use pan/tilt only
# absolute - use absolute zooming (supported by most PTZ capable cameras)
# relative - use relative zooming (not supported on all PTZs, but makes concurrent pan/tilt/zoom movements)
zooming: disabled
# Optional: A value to change the behavior of zooming on autotracked objects. (default: shown below)
# A lower value will keep more of the scene in view around a tracked object.
# A higher value will zoom in more on a tracked object, but Frigate may lose tracking more quickly.
# The value should be between 0.1 and 0.75
zoom_factor: 0.3
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
# Required: Begin automatically tracking an object when it enters any of the listed zones.
required_zones:
- zone_0
# Required: Name of ONVIF preset in camera's firmware to return to when tracking is over. (default: shown below)
return_preset: home
# Optional: Seconds to delay before returning to preset. (default: shown below)
timeout: 10 Relevant log output2024-05-08 21:18:19.751223175 [2024-05-08 21:18:19] frigate.ptz.onvif DEBUG : Onvif media xaddr for front_camera: http://192.168.0.200/onvif/media_service
2024-05-08 21:18:19.751909412 [2024-05-08 21:18:19] frigate.ptz.onvif DEBUG : Onvif capabilities for front_camera: ('http://192.168.0.200/onvif/ptz_service', '/usr/local/lib/python3.9/site-packages/wsdl/ptz.wsdl', '{http://www.onvif.org/ver20/ptz/wsdl}PTZBinding')
2024-05-08 21:18:21.771840695 [2024-05-08 21:18:21] frigate.ptz.onvif DEBUG : Selected Onvif profile for front_camera: {
2024-05-08 21:18:21.771843698 'Name': 'OVProfile00',
2024-05-08 21:18:21.771844698 'VideoSourceConfiguration': {
2024-05-08 21:18:21.771845602 'Name': 'VSCfg00',
2024-05-08 21:18:21.771846469 'UseCount': 3,
2024-05-08 21:18:21.771847332 'SourceToken': 'ov9710_720p',
2024-05-08 21:18:21.771848134 'Bounds': {
2024-05-08 21:18:21.771848939 'x': 0,
2024-05-08 21:18:21.771849762 'y': 0,
2024-05-08 21:18:21.771853106 'width': 1280,
2024-05-08 21:18:21.771853971 'height': 720
2024-05-08 21:18:21.771854904 },
2024-05-08 21:18:21.771855752 '_value_1': None,
2024-05-08 21:18:21.771856638 'Extension': None,
2024-05-08 21:18:21.771857492 'token': 'VSCfg00',
2024-05-08 21:18:21.771869801 '_attr_1': {
2024-05-08 21:18:21.771870623 }
2024-05-08 21:18:21.771871404 },
2024-05-08 21:18:21.771872344 'AudioSourceConfiguration': {
2024-05-08 21:18:21.771873150 'Name': 'ASCfg00',
2024-05-08 21:18:21.771873928 'UseCount': 3,
2024-05-08 21:18:21.771879184 'SourceToken': 'Microphone',
2024-05-08 21:18:21.771880022 '_value_1': None,
2024-05-08 21:18:21.771880839 'token': 'ASCfg00',
2024-05-08 21:18:21.771881727 '_attr_1': {
2024-05-08 21:18:21.771882453 }
2024-05-08 21:18:21.771883192 },
2024-05-08 21:18:21.771884036 'VideoEncoderConfiguration': {
2024-05-08 21:18:21.771884892 'Name': 'VECfg00',
2024-05-08 21:18:21.771885714 'UseCount': 1,
2024-05-08 21:18:21.771886546 'Encoding': 'H264',
2024-05-08 21:18:21.771887318 'Resolution': {
2024-05-08 21:18:21.771892873 'Width': 1280,
2024-05-08 21:18:21.771893673 'Height': 720
2024-05-08 21:18:21.771894451 },
2024-05-08 21:18:21.771895253 'Quality': 4.0,
2024-05-08 21:18:21.771896067 'RateControl': {
2024-05-08 21:18:21.771897020 'FrameRateLimit': 30,
2024-05-08 21:18:21.771897850 'EncodingInterval': 1,
2024-05-08 21:18:21.771898669 'BitrateLimit': 4096
2024-05-08 21:18:21.771899450 },
2024-05-08 21:18:21.771900248 'MPEG4': None,
2024-05-08 21:18:21.771901375 'H264': {
2024-05-08 21:18:21.771902212 'GovLength': 30,
2024-05-08 21:18:21.771903065 'H264Profile': 'Baseline'
2024-05-08 21:18:21.771903837 },
2024-05-08 21:18:21.771904639 'Multicast': {
2024-05-08 21:18:21.771905426 'Address': {
2024-05-08 21:18:21.771912392 'Type': 'IPv4',
2024-05-08 21:18:21.771913293 'IPv4Address': '0.0.0.0',
2024-05-08 21:18:21.771914102 'IPv6Address': None
2024-05-08 21:18:21.771914843 },
2024-05-08 21:18:21.771915630 'Port': 0,
2024-05-08 21:18:21.771916466 'TTL': 0,
2024-05-08 21:18:21.771917382 'AutoStart': False,
2024-05-08 21:18:21.771918188 '_value_1': None,
2024-05-08 21:18:21.771918974 '_attr_1': None
2024-05-08 21:18:21.771919700 },
2024-05-08 21:18:21.771920611 'SessionTimeout': datetime.timedelta(seconds=10),
2024-05-08 21:18:21.771921418 '_value_1': None,
2024-05-08 21:18:21.771922216 'token': 'VECfg00',
2024-05-08 21:18:21.771923040 '_attr_1': {
2024-05-08 21:18:21.771923828 }
2024-05-08 21:18:21.771924572 },
2024-05-08 21:18:21.771925405 'AudioEncoderConfiguration': {
2024-05-08 21:18:21.771926211 'Name': 'AECfg00',
2024-05-08 21:18:21.771927010 'UseCount': 1,
2024-05-08 21:18:21.771927821 'Encoding': 'G711',
2024-05-08 21:18:21.771928611 'Bitrate': 128,
2024-05-08 21:18:21.771929420 'SampleRate': 8,
2024-05-08 21:18:21.771936934 'Multicast': {
2024-05-08 21:18:21.771937741 'Address': {
2024-05-08 21:18:21.771947627 'Type': 'IPv4',
2024-05-08 21:18:21.771948475 'IPv4Address': '0.0.0.0',
2024-05-08 21:18:21.771949307 'IPv6Address': None
2024-05-08 21:18:21.771950061 },
2024-05-08 21:18:21.771950838 'Port': 0,
2024-05-08 21:18:21.771951601 'TTL': 0,
2024-05-08 21:18:21.771952426 'AutoStart': False,
2024-05-08 21:18:21.771953361 '_value_1': None,
2024-05-08 21:18:21.771954138 '_attr_1': None
2024-05-08 21:18:21.771954856 },
2024-05-08 21:18:21.771955725 'SessionTimeout': datetime.timedelta(seconds=10),
2024-05-08 21:18:21.771956497 '_value_1': None,
2024-05-08 21:18:21.771957295 'token': 'AECfg00',
2024-05-08 21:18:21.771958071 '_attr_1': {
2024-05-08 21:18:21.771958801 }
2024-05-08 21:18:21.771959532 },
2024-05-08 21:18:21.771960355 'VideoAnalyticsConfiguration': None,
2024-05-08 21:18:21.771961154 'PTZConfiguration': {
2024-05-08 21:18:21.771971180 'Name': 'PTZCfg00',
2024-05-08 21:18:21.771971974 'UseCount': 3,
2024-05-08 21:18:21.771972804 'NodeToken': 'PTZCfg00',
2024-05-08 21:18:21.771973878 'DefaultAbsolutePantTiltPositionSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
2024-05-08 21:18:21.771974708 'DefaultAbsoluteZoomPositionSpace': None,
2024-05-08 21:18:21.771975782 'DefaultRelativePanTiltTranslationSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace',
2024-05-08 21:18:21.771976649 'DefaultRelativeZoomTranslationSpace': None,
2024-05-08 21:18:21.771977502 'DefaultContinuousPanTiltVelocitySpace': None,
2024-05-08 21:18:21.771978469 'DefaultContinuousZoomVelocitySpace': None,
2024-05-08 21:18:21.771979248 'DefaultPTZSpeed': None,
2024-05-08 21:18:21.771980117 'DefaultPTZTimeout': datetime.timedelta(seconds=15),
2024-05-08 21:18:21.771980932 'PanTiltLimits': None,
2024-05-08 21:18:21.771981716 'ZoomLimits': None,
2024-05-08 21:18:21.771982484 'Extension': None,
2024-05-08 21:18:21.771983271 'token': 'PTZCfg00',
2024-05-08 21:18:21.771984061 '_attr_1': {
2024-05-08 21:18:21.771984753 }
2024-05-08 21:18:21.771985476 },
2024-05-08 21:18:21.771986276 'MetadataConfiguration': None,
2024-05-08 21:18:21.771987088 'Extension': None,
2024-05-08 21:18:21.771987885 'token': 'OVProfile00',
2024-05-08 21:18:21.771988696 'fixed': False,
2024-05-08 21:18:21.771989438 '_attr_1': {
2024-05-08 21:18:21.771990165 }
2024-05-08 21:18:21.771990853 }
2024-05-08 21:18:21.772006189 [2024-05-08 21:18:21] frigate.ptz.onvif DEBUG : Onvif ptz config for media profile in front_camera: {
2024-05-08 21:18:21.772007049 'Name': 'PTZCfg00',
2024-05-08 21:18:21.772007804 'UseCount': 3,
2024-05-08 21:18:21.772008598 'NodeToken': 'PTZCfg00',
2024-05-08 21:18:21.772009637 'DefaultAbsolutePantTiltPositionSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
2024-05-08 21:18:21.772010457 'DefaultAbsoluteZoomPositionSpace': None,
2024-05-08 21:18:21.772011562 'DefaultRelativePanTiltTranslationSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace',
2024-05-08 21:18:21.772012386 'DefaultRelativeZoomTranslationSpace': None,
2024-05-08 21:18:21.772013267 'DefaultContinuousPanTiltVelocitySpace': None,
2024-05-08 21:18:21.772014107 'DefaultContinuousZoomVelocitySpace': None,
2024-05-08 21:18:21.772024875 'DefaultPTZSpeed': None,
2024-05-08 21:18:21.772025782 'DefaultPTZTimeout': datetime.timedelta(seconds=15),
2024-05-08 21:18:21.772026588 'PanTiltLimits': None,
2024-05-08 21:18:21.772027378 'ZoomLimits': None,
2024-05-08 21:18:21.772028370 'Extension': None,
2024-05-08 21:18:21.772029505 'token': 'PTZCfg00',
2024-05-08 21:18:21.772030623 '_attr_1': {
2024-05-08 21:18:21.772031590 }
2024-05-08 21:18:21.772032671 }
2024-05-08 21:18:22.324143334 [2024-05-08 21:18:19] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2024-05-08 21:18:22.330141219 [2024-05-08 21:18:22] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-05-08 21:18:22.583072521 [2024-05-08 21:18:22] frigate.ptz.onvif DEBUG : Onvif config for front_camera: {
2024-05-08 21:18:22.583074547 'Spaces': {
2024-05-08 21:18:22.583075539 'AbsolutePanTiltPositionSpace': [
2024-05-08 21:18:22.583076365 {
2024-05-08 21:18:22.583077411 'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
2024-05-08 21:18:22.583078253 'XRange': {
2024-05-08 21:18:22.583079081 'Min': -1.0,
2024-05-08 21:18:22.583079934 'Max': 1.0
2024-05-08 21:18:22.583080716 },
2024-05-08 21:18:22.583081540 'YRange': {
2024-05-08 21:18:22.583082410 'Min': -1.0,
2024-05-08 21:18:22.583083223 'Max': 1.0
2024-05-08 21:18:22.583083984 }
2024-05-08 21:18:22.583084764 }
2024-05-08 21:18:22.583085535 ],
2024-05-08 21:18:22.583086423 'AbsoluteZoomPositionSpace': [],
2024-05-08 21:18:22.583087263 'RelativePanTiltTranslationSpace': [
2024-05-08 21:18:22.583088027 {
2024-05-08 21:18:22.583089041 'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace',
2024-05-08 21:18:22.583089852 'XRange': {
2024-05-08 21:18:22.583090662 'Min': -2.0,
2024-05-08 21:18:22.583091486 'Max': 2.0
2024-05-08 21:18:22.583092237 },
2024-05-08 21:18:22.583093038 'YRange': {
2024-05-08 21:18:22.583093843 'Min': -2.0,
2024-05-08 21:18:22.583094673 'Max': 2.0
2024-05-08 21:18:22.583095475 }
2024-05-08 21:18:22.583096206 }
2024-05-08 21:18:22.583096957 ],
2024-05-08 21:18:22.583097847 'RelativeZoomTranslationSpace': [],
2024-05-08 21:18:22.583098685 'ContinuousPanTiltVelocitySpace': [
2024-05-08 21:18:22.583108211 {
2024-05-08 21:18:22.583109231 'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace',
2024-05-08 21:18:22.583110053 'XRange': {
2024-05-08 21:18:22.583110813 'Min': -1.0,
2024-05-08 21:18:22.583111600 'Max': 1.0
2024-05-08 21:18:22.583112353 },
2024-05-08 21:18:22.583113142 'YRange': {
2024-05-08 21:18:22.583113960 'Min': -1.0,
2024-05-08 21:18:22.583114757 'Max': 1.0
2024-05-08 21:18:22.583115501 }
2024-05-08 21:18:22.583116247 }
2024-05-08 21:18:22.583116990 ],
2024-05-08 21:18:22.583117804 'ContinuousZoomVelocitySpace': [],
2024-05-08 21:18:22.583118597 'PanTiltSpeedSpace': [
2024-05-08 21:18:22.583119338 {
2024-05-08 21:18:22.583120319 'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace',
2024-05-08 21:18:22.583121081 'XRange': {
2024-05-08 21:18:22.583121860 'Min': 0.0,
2024-05-08 21:18:22.583122647 'Max': 1.0
2024-05-08 21:18:22.583123397 }
2024-05-08 21:18:22.583124130 }
2024-05-08 21:18:22.583124857 ],
2024-05-08 21:18:22.583125627 'ZoomSpeedSpace': [],
2024-05-08 21:18:22.583126406 'Extension': None,
2024-05-08 21:18:22.583127158 '_attr_1': None
2024-05-08 21:18:22.583127902 },
2024-05-08 21:18:22.583128665 'PTZTimeout': {
2024-05-08 21:18:22.583129511 'Min': datetime.timedelta(seconds=1),
2024-05-08 21:18:22.583130330 'Max': datetime.timedelta(seconds=15)
2024-05-08 21:18:22.583131033 },
2024-05-08 21:18:22.583131801 '_value_1': None,
2024-05-08 21:18:22.583132546 'PTControlDirection': None,
2024-05-08 21:18:22.583133309 'Extension': None,
2024-05-08 21:18:22.583134051 '_attr_1': None
2024-05-08 21:18:22.583134752 }
2024-05-08 21:18:23.615660766 [2024-05-08 21:18:23] frigate.ptz.onvif DEBUG : Onvif status config for front_camera: {
2024-05-08 21:18:23.615671581 'Position': {
2024-05-08 21:18:23.615676578 'PanTilt': {
2024-05-08 21:18:23.615681344 'x': 0.0967742,
2024-05-08 21:18:23.615686039 'y': -0.162791,
2024-05-08 21:18:23.615690379 'space': None
2024-05-08 21:18:23.615694569 },
2024-05-08 21:18:23.615698839 'Zoom': None
2024-05-08 21:18:23.615703098 },
2024-05-08 21:18:23.615707479 'MoveStatus': {
2024-05-08 21:18:23.615711683 'PanTilt': 'IDLE',
2024-05-08 21:18:23.615715873 'Zoom': None
2024-05-08 21:18:23.615720107 },
2024-05-08 21:18:23.615724202 'Error': None,
2024-05-08 21:18:23.615728998 'UtcTime': datetime.datetime(2014, 2, 22, 20, 56, 42),
2024-05-08 21:18:23.615733268 '_value_1': None,
2024-05-08 21:18:23.615737477 '_attr_1': None
2024-05-08 21:18:23.615741221 }
2024-05-08 21:18:23.615941189 [2024-05-08 21:18:23] frigate.ptz.onvif DEBUG : front_camera: Relative move request: {
2024-05-08 21:18:23.615953999 'ProfileToken': 'OVProfile00',
2024-05-08 21:18:23.615961015 'Translation': None,
2024-05-08 21:18:23.615968226 'Speed': None
2024-05-08 21:18:23.615973583 }
2024-05-08 21:18:23.616143217 [2024-05-08 21:18:23] frigate.ptz.onvif WARNING : Disabling autotracking zooming for front_camera: Relative zoom not supported
2024-05-08 21:18:23.616385062 [2024-05-08 21:18:23] frigate.ptz.onvif DEBUG : front_camera: Relative move request after setup: {
2024-05-08 21:18:23.616394132 'ProfileToken': 'OVProfile00',
2024-05-08 21:18:23.616401184 'Translation': None,
2024-05-08 21:18:23.616407874 'Speed': None
2024-05-08 21:18:23.616414369 }
2024-05-08 21:18:25.539168388 [2024-05-08 21:18:25] frigate.ptz.autotrack WARNING : Disabling autotracking for front_camera: FOV relative movement not supported
2024-05-08 21:18:54.016354953 [2024-05-08 21:18:54] ws4py ERROR : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:34144] due to exception: ONVIFError(Fault('Sender not Authorized')) in once method Frigate statsNo response Operating systemDebian Install methodDocker Compose Coral versionUSB Any other information that may be helpfulAn idea ... Is ws4py properly sending auth information with the PTZ movement instructions ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Your camera's firmware doesn't support the needed features for autotracking.
|
Beta Was this translation helpful? Give feedback.
-
Also, the camera is reporting that it does not have the capabilities to do continuous movement, the method that frigate uses with its PTZ controls. The |
Beta Was this translation helpful? Give feedback.
If the preset positions are being retrieved, the auth credentials are working. But a "move to preset" call with ONVIF uses the
ContinuousMove
directive from yourDefaultContinuousPanTiltVelocitySpace
, which your camera doesn't seem to support.Are you running a gray market/super-cheap camera? The debug logs don't look like anything else I've seen before.