Closed Strider0 closed 1 year ago
@hawkeye217 any ideas on this?
I would assume the Dahua NVR sends ONVIF commands directly to the camera rather than through some proprietary protocol (especially since it's Dahua).
Since the camera itself is what supports ONVIF, I'd suggest just using to the camera's IP (rather than your NVR) for the ONVIF section of your frigate config.
ONVIF commands will be more responsive when connecting to the camera directly rather than proxying them through the NVR anyways.
@hawkeye217 Thanks for the response and your great work on Frigate! Unfortunately I cannot use the camera IP since the camera is not accessible to Frigate. In my setup the cameras are plugged into the back of the NVR and get power and configuration from the NVR (as well as private IP addresses issued by the NVR that isn't directly accessible). When configuring the cameras in Frigate I specify the NVR IP and the channel the camera is on. Is there a way to specify the channel in the ONVIF configuration? I believe the NVR supports the functionality since I can connect to it with ONVIF Device Manager, select the channel and control the camera.
@hawkeye217 Thanks for the response and your great work on Frigate! Unfortunately I cannot use the camera IP since the camera is not accessible to Frigate. In my setup the cameras are plugged into the back of the NVR and get power and configuration from the NVR (as well as private IP addresses issued by the NVR that isn't directly accessible). When configuring the cameras in Frigate I specify the NVR IP and the channel the camera is on. Is there a way to specify the channel in the ONVIF configuration? I believe the NVR supports the functionality since I can connect to it with ONVIF Device Manager, select the channel and control the camera.
Gotcha, sorry I misunderstood!
Could you add this to your frigate config file and send me the debug output that gets generated on restart?
logger:
default: info
logs:
frigate.ptz.onvif: debug
By the way, I should mention that you'll need a recent dev build to get that debug info.
Yes, here it is:
2023-10-22 18:46:47.247795852 [2023-10-22 18:46:47] frigate.ptz.onvif DEBUG : Onvif config for bldg3_ptz: { 2023-10-22 18:46:47.247809573 'Spaces': { 2023-10-22 18:46:47.247823777 'AbsolutePanTiltPositionSpace': [ 2023-10-22 18:46:47.247827665 { 2023-10-22 18:46:47.247832110 'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace', 2023-10-22 18:46:47.247834517 'XRange': { 2023-10-22 18:46:47.247836554 'Min': -1.0, 2023-10-22 18:46:47.247877349 'Max': 1.0 2023-10-22 18:46:47.247879534 }, 2023-10-22 18:46:47.247883071 'YRange': { 2023-10-22 18:46:47.247884978 'Min': -1.0, 2023-10-22 18:46:47.247887034 'Max': 1.0 2023-10-22 18:46:47.247888626 } 2023-10-22 18:46:47.247891719 } 2023-10-22 18:46:47.247893256 ], 2023-10-22 18:46:47.247895255 'AbsoluteZoomPositionSpace': [ 2023-10-22 18:46:47.247949920 { 2023-10-22 18:46:47.247954865 'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace', 2023-10-22 18:46:47.247980419 'XRange': { 2023-10-22 18:46:47.247982956 'Min': 0.0, 2023-10-22 18:46:47.247984771 'Max': 1.0 2023-10-22 18:46:47.247986660 } 2023-10-22 18:46:47.247988178 } 2023-10-22 18:46:47.247989678 ], 2023-10-22 18:46:47.247991808 'RelativePanTiltTranslationSpace': [], 2023-10-22 18:46:47.247994030 'RelativeZoomTranslationSpace': [], 2023-10-22 18:46:47.247996122 'ContinuousPanTiltVelocitySpace': [ 2023-10-22 18:46:47.247997641 { 2023-10-22 18:46:47.248000585 'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace', 2023-10-22 18:46:47.248030510 'XRange': { 2023-10-22 18:46:47.248033177 'Min': -1.0, 2023-10-22 18:46:47.248035065 'Max': 1.0 2023-10-22 18:46:47.248036676 }, 2023-10-22 18:46:47.248038510 'YRange': { 2023-10-22 18:46:47.248040843 'Min': -1.0, 2023-10-22 18:46:47.248042639 'Max': 1.0 2023-10-22 18:46:47.248044213 } 2023-10-22 18:46:47.248045750 } 2023-10-22 18:46:47.248047232 ], 2023-10-22 18:46:47.248049306 'ContinuousZoomVelocitySpace': [ 2023-10-22 18:46:47.248082342 { 2023-10-22 18:46:47.248086156 'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace', 2023-10-22 18:46:47.248088027 'XRange': { 2023-10-22 18:46:47.248089915 'Min': -1.0, 2023-10-22 18:46:47.248091730 'Max': 1.0 2023-10-22 18:46:47.248093674 } 2023-10-22 18:46:47.248095174 } 2023-10-22 18:46:47.248096656 ], 2023-10-22 18:46:47.248098508 'PanTiltSpeedSpace': [], 2023-10-22 18:46:47.248100322 'ZoomSpeedSpace': [], 2023-10-22 18:46:47.248102082 'Extension': None, 2023-10-22 18:46:47.248103748 '_attr_1': None 2023-10-22 18:46:47.248105359 }, 2023-10-22 18:46:47.248107081 'PTZTimeout': { 2023-10-22 18:46:47.248109174 'Min': datetime.timedelta(seconds=1), 2023-10-22 18:46:47.248111341 'Max': datetime.timedelta(seconds=250) 2023-10-22 18:46:47.248112803 }, 2023-10-22 18:46:47.248114563 '_value_1': None, 2023-10-22 18:46:47.248116414 'PTControlDirection': None, 2023-10-22 18:46:47.248118081 'Extension': None, 2023-10-22 18:46:47.248158339 '_attr_1': None 2023-10-22 18:46:47.248160598 }
Great. Unfortunately this doesn't tell me too much.
The more recent builds actually have more onvif debug info. Any chance you can upgrade?
My mistake. I thought I was on v0.13.0-beta2 / the latest build. Probably a rookie question...But where do I find a more current one?
You're on the latest released beta. The dev builds are available here.
I think we're fairly close to beta 3, if you'd prefer to wait.
Upgraded to: dev-e9376ca-rpi 2023-10-22 19:23:54.264253028 [2023-10-22 19:23:54] frigate.ptz.onvif DEBUG : Onvif configs for bldg3_ptz: { 2023-10-22 19:23:54.264265584 'Name': 'PTZConfig_Channel2', 2023-10-22 19:23:54.264267917 'UseCount': 2, 2023-10-22 19:23:54.264270158 'NodeToken': '00100', 2023-10-22 19:23:54.264284991 'DefaultAbsolutePantTiltPositionSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace', 2023-10-22 19:23:54.264320103 'DefaultAbsoluteZoomPositionSpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace', 2023-10-22 19:23:54.264323565 'DefaultRelativePanTiltTranslationSpace': None, 2023-10-22 19:23:54.264327251 'DefaultRelativeZoomTranslationSpace': None, 2023-10-22 19:23:54.264330658 'DefaultContinuousPanTiltVelocitySpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace', 2023-10-22 19:23:54.264397010 'DefaultContinuousZoomVelocitySpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace', 2023-10-22 19:23:54.264400140 'DefaultPTZSpeed': None, 2023-10-22 19:23:54.264402473 'DefaultPTZTimeout': datetime.timedelta(seconds=10), 2023-10-22 19:23:54.264406084 'PanTiltLimits': None, 2023-10-22 19:23:54.264407843 'ZoomLimits': None, 2023-10-22 19:23:54.264409547 'Extension': None, 2023-10-22 19:23:54.264434529 'token': '00100', 2023-10-22 19:23:54.264436955 '_attr_1': { 2023-10-22 19:23:54.264438658 'MoveRamp': '0', 2023-10-22 19:23:54.264440362 'PresetRamp': '0', 2023-10-22 19:23:54.264442399 'PresetTourRamp': '0' 2023-10-22 19:23:54.264443769 } 2023-10-22 19:23:54.264445177 } 2023-10-22 19:23:54.419173926 [2023-10-22 19:23:54] frigate.ptz.onvif DEBUG : Onvif config for bldg3_ptz: { 2023-10-22 19:23:54.419184667 'Spaces': { 2023-10-22 19:23:54.419187297 'AbsolutePanTiltPositionSpace': [ 2023-10-22 19:23:54.419189278 { 2023-10-22 19:23:54.419192371 'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace', 2023-10-22 19:23:54.419194371 'XRange': { 2023-10-22 19:23:54.419196352 'Min': -1.0, 2023-10-22 19:23:54.419198204 'Max': 1.0 2023-10-22 19:23:54.419199797 }, 2023-10-22 19:23:54.419201537 'YRange': { 2023-10-22 19:23:54.419203371 'Min': -1.0, 2023-10-22 19:23:54.419205149 'Max': 1.0 2023-10-22 19:23:54.419206704 } 2023-10-22 19:23:54.419208223 } 2023-10-22 19:23:54.419209741 ], 2023-10-22 19:23:54.419211723 'AbsoluteZoomPositionSpace': [ 2023-10-22 19:23:54.419213297 { 2023-10-22 19:23:54.419216167 'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace', 2023-10-22 19:23:54.419217982 'XRange': { 2023-10-22 19:23:54.419219852 'Min': 0.0, 2023-10-22 19:23:54.419221667 'Max': 1.0 2023-10-22 19:23:54.419223241 } 2023-10-22 19:23:54.419224741 } 2023-10-22 19:23:54.419226241 ], 2023-10-22 19:23:54.419228334 'RelativePanTiltTranslationSpace': [], 2023-10-22 19:23:54.419230408 'RelativeZoomTranslationSpace': [], 2023-10-22 19:23:54.419232445 'ContinuousPanTiltVelocitySpace': [ 2023-10-22 19:23:54.419233963 { 2023-10-22 19:23:54.419323186 'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace', 2023-10-22 19:23:54.419325964 'XRange': { 2023-10-22 19:23:54.419327871 'Min': -1.0, 2023-10-22 19:23:54.419330501 'Max': 1.0 2023-10-22 19:23:54.419332130 }, 2023-10-22 19:23:54.419333890 'YRange': { 2023-10-22 19:23:54.419335723 'Min': -1.0, 2023-10-22 19:23:54.419337501 'Max': 1.0 2023-10-22 19:23:54.419340945 } 2023-10-22 19:23:54.419342464 } 2023-10-22 19:23:54.419344038 ], 2023-10-22 19:23:54.419346075 'ContinuousZoomVelocitySpace': [ 2023-10-22 19:23:54.419347649 { 2023-10-22 19:23:54.419350630 'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace', 2023-10-22 19:23:54.419385668 'XRange': { 2023-10-22 19:23:54.419388371 'Min': -1.0, 2023-10-22 19:23:54.419390186 'Max': 1.0 2023-10-22 19:23:54.419391760 } 2023-10-22 19:23:54.419393279 } 2023-10-22 19:23:54.419394834 ], 2023-10-22 19:23:54.419396668 'PanTiltSpeedSpace': [], 2023-10-22 19:23:54.419398908 'ZoomSpeedSpace': [], 2023-10-22 19:23:54.419400631 'Extension': None, 2023-10-22 19:23:54.419402297 '_attr_1': None 2023-10-22 19:23:54.419403797 }, 2023-10-22 19:23:54.419405519 'PTZTimeout': { 2023-10-22 19:23:54.419407982 'Min': datetime.timedelta(seconds=1), 2023-10-22 19:23:54.419410112 'Max': datetime.timedelta(seconds=250) 2023-10-22 19:23:54.419430908 }, 2023-10-22 19:23:54.419433427 '_value_1': None, 2023-10-22 19:23:54.419435297 'PTControlDirection': None, 2023-10-22 19:23:54.419436964 'Extension': None, 2023-10-22 19:23:54.419438557 '_attr_1': None 2023-10-22 19:23:54.419439871 }
Thanks!
It doesn't look like there's an initially obvious way to make Frigate's PTZ work with your NVR. I don't have a way of testing and trying things myself, and I don't think any of the other maintainers have an NVR to test with either.
We can table this and possibly revisit at a later date if the situation changes.
Closing this as not planned, the currently used library does not support this
Describe the problem you are having
PTZ controls do not work on my Dahua Camera through Frigate. The camera is connected to a Qsee(Dahua) NVR. I added the ONVIF settings to my config, but I am not sure how to specify the Channel the PTZ is on (15).
Version
0.13.0-0858859
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
Other Linux
Install method
Docker Compose
Coral version
USB
Network connection
Wired
Camera make and model
Dahua SD59432XA-HNR
Any other information that may be helpful
No response