Closed ErliPan closed 6 months ago
This is not just a "Space" problem. Actually the relative move command moves the cam with a fixed value:
So, probably it's a complicated task.
But, if you want to try "manually", edit the file
yi-hack/www/onvif/ptz_service_files/GetConfigurationOptions.xml
and add this part
<tt:RelativePanTiltTranslationSpace>
<tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationSpaceFov</tt:URI>
<tt:XRange>
<tt:Min>-1.000000</tt:Min>
<tt:Max>1.000000</tt:Max>
</tt:XRange>
<tt:YRange>
<tt:Min>-1.000000</tt:Min>
<tt:Max>1.000000</tt:Max>
</tt:YRange>
</tt:RelativePanTiltTranslationSpace>
below the </tt:RelativePanTiltTranslationSpace> line.
I can't get it to work. I give up for now and I will try again with later betas. Thanks anyway
I'm working on this task. I will send a new beta asap.
Cool, looking forward for it. I reopened the issue because it looks like further development will happen.
@ErliPan What's your model suffix?
@roleoroleo Yi Dome Guard RFUS using r35gb. Some on 9.0.46.00 and a few on 12.1.47.2.
Here it is: r35gb_0.3.0.tar.gz
Let me know if it works.
@roleoroleo I tried the new firmware but after examining through the logs it looks like that ONVIF MoveStatus is also needed.
Here's the relevant log snippet.
Another try please: r35gb_0.3.0.tar.gz
Unfortunately it still doesn't work, looks like the camera doesn't respond as the Python code expects. Looks like it's more involved than satisfying the checks. I have no clue how to fix it...
Here's the log snippet
and here's the Python scripts that throws the exceptions.
Btw happy new year.
I will try the script. It seems that GetStatus fails.
Thanks and Happy New Year to you too.
I tried to install Frigate as a docker container but it doesn't start properly. I need to restart from scratch. Are you able to capture the network traffic between frigate and the cam? You could use tcp dump from here: https://github.com/roleoroleo/yi-hack-utils/tree/main/Allwinner-v2
Mine doesn't load the web ui too after enabling autotracking. I don't know if you have the same issue but I will leave both docker compose and the config.yml here:
I got the error log by adding the logger parameters at the end of config.yml and starting the container without the detach parameter.
EDIT: I'm currently a bit busy, I need to finish deploying and configure HA + Frigate + Notifications in 2 places and I will soon look into capturing needed network traffic.
I tested the last release with the fov script and it works. I didn't install Frigate, just the python script.
root@debian:/home/user/fovtest# python3 ./fovtest.py
Connected to ONVIF camera
Created media service object
Creating PTZ object
Created PTZ service object
PTZ configurations:
{
'Name': 'PTZCfg',
'UseCount': 0,
'NodeToken': 'PTZNodeToken',
'DefaultAbsolutePantTiltPositionSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
'DefaultAbsoluteZoomPositionSpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace',
'DefaultRelativePanTiltTranslationSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace',
'DefaultRelativeZoomTranslationSpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace',
'DefaultContinuousPanTiltVelocitySpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace',
'DefaultContinuousZoomVelocitySpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace',
'DefaultPTZSpeed': {
'PanTilt': {
'x': 1.0,
'y': 1.0,
'space': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace'
},
'Zoom': {
'x': 0.0,
'space': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace'
}
},
'DefaultPTZTimeout': datetime.timedelta(seconds=5),
'PanTiltLimits': {
'Range': {
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 360.0
},
'YRange': {
'Min': 0.0,
'Max': 180.0
}
}
},
'ZoomLimits': {
'Range': {
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace',
'XRange': {
'Min': 1.0,
'Max': 1.0
}
}
},
'Extension': {
'_value_1': [
<Element {http://www.onvif.org/ver10/schema}PTControlDirection at 0x7f5a3518ea00>
],
'PTControlDirection': None,
'Extension': None
},
'token': 'PTZCfgToken',
'MoveRamp': 0,
'PresetRamp': 0,
'PresetTourRamp': 0,
'_attr_1': {
}
}
PTZ configuration options:
{
'Spaces': {
'AbsolutePanTiltPositionSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 360.0
},
'YRange': {
'Min': 0.0,
'Max': 180.0
}
}
],
'AbsoluteZoomPositionSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace',
'XRange': {
'Min': 1.0,
'Max': 1.0
}
}
],
'RelativePanTiltTranslationSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace',
'XRange': {
'Min': -360.0,
'Max': 360.0
},
'YRange': {
'Min': -180.0,
'Max': 180.0
}
},
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationSpaceFov',
'XRange': {
'Min': -100.0,
'Max': 100.0
},
'YRange': {
'Min': -100.0,
'Max': 100.0
}
}
],
'RelativeZoomTranslationSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 0.0
}
}
],
'ContinuousPanTiltVelocitySpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace',
'XRange': {
'Min': -1.0,
'Max': 1.0
},
'YRange': {
'Min': -1.0,
'Max': 1.0
}
}
],
'ContinuousZoomVelocitySpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 0.0
}
}
],
'PanTiltSpeedSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace',
'XRange': {
'Min': 1.0,
'Max': 1.0
}
}
],
'ZoomSpeedSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace',
'XRange': {
'Min': 0.0,
'Max': 0.0
}
}
],
'Extension': None,
'_attr_1': None
},
'PTZTimeout': {
'Min': datetime.timedelta(seconds=1),
'Max': datetime.timedelta(seconds=100)
},
'_value_1': [
<Element {http://www.onvif.org/ver10/schema}PTControlDirection at 0x7f5a352fe840>
],
'PTControlDirection': None,
'Extension': None,
'PTZRamps': None,
'_attr_1': None
}
PTZ service capabilities:
{
'_value_1': None,
'EFlip': False,
'Reverse': False,
'GetCompatibleConfigurations': False,
'MoveStatus': True,
'StatusPosition': True,
'MoveAndTrack': None,
'_attr_1': {
}
}
PTZ status:
{
'Position': {
'PanTilt': {
'x': 171.9,
'y': 63.2,
'space': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace'
},
'Zoom': {
'x': 1.0,
'space': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace'
}
},
'MoveStatus': {
'PanTilt': 'IDLE',
'Zoom': 'IDLE'
},
'Error': None,
'UtcTime': datetime.datetime(2024, 2, 14, 8, 9, 14, tzinfo=<isodate.tzinfo.Utc object at 0x7f5a35cb2f70>),
'_value_1': None,
'_attr_1': None
}
YES - MoveStatus is reporting IDLE.
YES - RelativeMove Pan/Tilt (FOV) is supported.
YES - RelativeMove Zoom is supported.
@roleoroleo thanks for the heads up. I'm still unable to test it for now because I'm in another continent but by early march I should be home. I will try to report back the results asap.
I'm back finalmente, so I took a fresh install of YiHack 0.3.1 and the latest Frigate version. Unfortunately it still crashes on boot.
Here's the logs
This log is not enough. Are you able to capture the network traffic between frigate and the cam?
I don't typically do packet captures so I'm sure it this helps but I sent the tcpdump utils binary to the camera and started capturing excluding the ssh stuff.
192.168.1.58 is the camera 192.168.1.209 is the Frigate container
The http port I changed to 8080 in an attempt to see if anything changes and I didn't revert back yet. Also I'm currently running the 0.3.0 firmware you sent.
Also weird thing. The last time I tried I remember at least managing to get the Frigate PTZ control to work. This time it simply didn't load. I think I'm missing something here.
One big suspect is that "http://
I need the content of the frames. Use this command with tcpdump:
tcpdump -i wlan0 -w /tmp/capture_01.pcap
Then download the file using ftp.
And send it to me.
Please, try 0.3.1. There are a lot of new fixes about onvif services.
One big suspect is that "http:///onvif/ptz_service" is not giving the right response. I tried opening it from my browser and I got "Empty response" same with wget. Not sure what went wrong
This is the normal behavior. The service needs to be called with a post request and a specific content.
So I swapped back to 0.3.1 and captured the content and here's the files:
https://mega.nz/file/5klDzQbQ#dPA6VCrz3FsiDQ6HFYayjaa4yJwcoYW33xktX8BjEP8
GetStatus request returns "NoStatus" error. This means that the command executed to get the position info doesn't work. Please, run it manually and check the output:
ipc_cmd -g
ipc_cmd -u
After that, check if the system.sh contains the line
echo "is_running=/tmp/sd/yi-hack/bin/ipc_cmd -u" >> $ONVIF_SRVD_CONF
or
echo "is_moving=/tmp/sd/yi-hack/bin/ipc_cmd -u" >> $ONVIF_SRVD_CONF
In case, the second line is correct one. This is not a problem but fix it and restart.
So that was the issue as neither of them is in the script
if [[ $MODEL_SUFFIX == "r30gb" ]] || [[ $MODEL_SUFFIX == "r35gb" ]] || [[ $MODEL_SUFFIX == "r40ga" ]] || [[ $MODEL_SUFFIX == "h51ga" ]] || [[ $MODEL_SUFFIX == "h52ga" ]] || [[ $MODEL_SUFFIX == "h60ga" ]] || [[ $MODEL_SUFFIX == "q321br_lsx" ]] || [[ $MODEL_SUFFIX == "qg311r" ]] || [[ $MODEL_SUFFIX == "b091qp" ]] ; then
echo "#PTZ" >> $ONVIF_SRVD_CONF
echo "ptz=1" >> $ONVIF_SRVD_CONF
echo "get_position=/tmp/sd/yi-hack/bin/ipc_cmd -g" >> $ONVIF_SRVD_CONF
echo "move_left=/tmp/sd/yi-hack/bin/ipc_cmd -m left" >> $ONVIF_SRVD_CONF
echo "move_right=/tmp/sd/yi-hack/bin/ipc_cmd -m right" >> $ONVIF_SRVD_CONF
echo "move_up=/tmp/sd/yi-hack/bin/ipc_cmd -m up" >> $ONVIF_SRVD_CONF
echo "move_down=/tmp/sd/yi-hack/bin/ipc_cmd -m down" >> $ONVIF_SRVD_CONF
echo "move_stop=/tmp/sd/yi-hack/bin/ipc_cmd -m stop" >> $ONVIF_SRVD_CONF
echo "move_preset=/tmp/sd/yi-hack/bin/ipc_cmd -p %d" >> $ONVIF_SRVD_CONF
echo "set_preset=/tmp/sd/yi-hack/script/ptz_presets.sh -a add_preset -m %s" >> $ONVIF_SRVD_CONF
echo "set_home_position=/tmp/sd/yi-hack/script/ptz_presets.sh -a set_home_position" >> $ONVIF_SRVD_CONF
echo "remove_preset=/tmp/sd/yi-hack/script/ptz_presets.sh -a del_preset -n %d" >> $ONVIF_SRVD_CONF
echo "jump_to_abs=/tmp/sd/yi-hack/bin/ipc_cmd -j %f,%f" >> $ONVIF_SRVD_CONF
echo "jump_to_rel=/tmp/sd/yi-hack/bin/ipc_cmd -J %f,%f" >> $ONVIF_SRVD_CONF
echo "get_presets=/tmp/sd/yi-hack/script/ptz_presets.sh -a get_presets" >> $ONVIF_SRVD_CONF
echo "" >> $ONVIF_SRVD_CONF
fi
The error is fixed after adding the line but now there's a new error.
frigate | 2024-03-15 20:03:09.906698842 [2024-03-15 20:03:09] frigate.ptz.onvif ERROR : Unable to get Onvif media profiles for camera: TESTCAM: Unknown error: Invalid URL 'http:///onvif/media_service': No host supplied
Maybe related to this: https://github.com/roleoroleo/yi-hack-MStar/issues/537
So reading that thread the user mentions a failure of running the test script. I remember being able to run that script so I tried again and it gave the same error. As a sanity check I formatted the SD card and installed 0.2.9 and the script ran fine.
This is the log of Frigate when running 0.2.9
frigate | 2024-03-15 20:24:06.314386656 [2024-03-15 20:24:06] frigate.ptz.onvif DEBUG : Onvif status config for TESTCAM: {
frigate | 2024-03-15 20:24:06.314397682 'Position': None,
frigate | 2024-03-15 20:24:06.314403600 'MoveStatus': None,
frigate | 2024-03-15 20:24:06.314409265 'Error': None,
frigate | 2024-03-15 20:24:06.314416489 'UtcTime': datetime.datetime(2024, 3, 15, 19, 24, 6, tzinfo=<isodate.tzinfo.Utc object at 0x78a6ae02c3a0>),
frigate | 2024-03-15 20:24:06.314421932 '_value_1': None,
frigate | 2024-03-15 20:24:06.314427321 '_attr_1': None
frigate | 2024-03-15 20:24:06.314432134 }
frigate | 2024-03-15 20:24:06.315956291 [2024-03-15 20:24:06] frigate.ptz.onvif DEBUG : TESTCAM: Relative move request: {
frigate | 2024-03-15 20:24:06.315963856 'ProfileToken': 'Profile_0',
frigate | 2024-03-15 20:24:06.315967761 'Translation': None,
frigate | 2024-03-15 20:24:06.315971025 'Speed': None
frigate | 2024-03-15 20:24:06.315974312 }
frigate | 2024-03-15 20:24:06.315979427 [2024-03-15 20:24:06] frigate.ptz.onvif WARNING : Disabling autotracking zooming for TESTCAM: Relative zoom not supported
frigate | 2024-03-15 20:24:06.315984071 [2024-03-15 20:24:06] frigate.ptz.onvif DEBUG : TESTCAM: Relative move request after setup: {
frigate | 2024-03-15 20:24:06.315987669 'ProfileToken': 'Profile_0',
frigate | 2024-03-15 20:24:06.315991204 'Translation': None,
frigate | 2024-03-15 20:24:06.315994354 'Speed': {
frigate | 2024-03-15 20:24:06.315997775 'PanTilt': {
frigate | 2024-03-15 20:24:06.316001192 'x': 0.5,
frigate | 2024-03-15 20:24:06.316004594 'y': 0.5,
frigate | 2024-03-15 20:24:06.316008872 'space': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace'
frigate | 2024-03-15 20:24:06.316012112 },
frigate | 2024-03-15 20:24:06.316015473 'Zoom': {
frigate | 2024-03-15 20:24:06.316018775 'x': 0.5,
frigate | 2024-03-15 20:24:06.316023015 'space': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace'
frigate | 2024-03-15 20:24:06.316026188 }
frigate | 2024-03-15 20:24:06.316029561 }
frigate | 2024-03-15 20:24:06.316032735 }
UPDATE: With 0.2.9 autotracking doesn't work, but the PTZ control page works. In the control page the preset selection works, the move up-down works but the move left-right doesn't.
Moving left-right gives me this error:
frigate | 2024-03-15 20:32:23.369039019 [2024-03-15 20:32:23] ws4py ERROR : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:45762] due to exception: ONVIFError(Fault('ActionNotSupported')) in once method
UPDATE 2:
I formatted again and with 0.3.0 Autotracking still doesn't work but now the entire PTZ control page works.
It's still giving me
Disabling autotracking zooming for TESTCAM: Relative zoom not supported
but that's expected at least with this firmware
So I guess there's a bug introduced in 0.3.1
Anyway this is the best I can do for now. There's something between 0.3.0 and 0.3.1 that makes the python test script fail and one of the line you mentioned is not present on system.sh
I will try again to install frigate...
I will try again to install frigate...
This script https://gist.github.com/hawkeye217/152a1d4ba80760dac95d46e143d37112 runs fine on 0.2.9 and 0.3.0 fails with 0.3.1 giving the same exception as Frigate. I think you should try that.
I already tested this script and this is the output with my 0.3.1: https://github.com/roleoroleo/yi-hack-Allwinner-v2/issues/767#issuecomment-1944143205
I formatted everything and reinstalled and is the output from 0.3.1 now. I'm so confused
root@TestServer:~# python3 testcamera2.py
Connected to ONVIF camera
Created media service object
Media profiles
[{
'Name': 'Profile_0',
'VideoSourceConfiguration': {
'Name': 'Profile_0_VideoSourceConfig',
'UseCount': 1,
'SourceToken': 'VideoSourceToken',
'Bounds': {
'x': 0,
'y': 0,
'width': 1920,
'height': 1080
},
'_value_1': None,
'Extension': None,
'token': 'Profile_0_VideoSourceConfigToken',
'_attr_1': {
}
},
'AudioSourceConfiguration': None,
'VideoEncoderConfiguration': {
'Name': 'Profile_0_VideoEncoder',
'UseCount': 1,
'Encoding': 'H264',
'Resolution': {
'Width': 1920,
'Height': 1080
},
'Quality': 0.0,
'RateControl': {
'FrameRateLimit': 0,
'EncodingInterval': 0,
'BitrateLimit': 0
},
'MPEG4': None,
'H264': {
'GovLength': 40,
'H264Profile': 'High'
},
'Multicast': {
'Address': {
'Type': 'IPv4',
'IPv4Address': None,
'IPv6Address': None
},
'Port': 0,
'TTL': 0,
'AutoStart': False,
'_value_1': None,
'_attr_1': None
},
'SessionTimeout': datetime.timedelta(0),
'_value_1': None,
'token': 'Profile_0_VideoEncoderToken',
'_attr_1': {
}
},
'AudioEncoderConfiguration': None,
'VideoAnalyticsConfiguration': None,
'PTZConfiguration': {
'Name': 'PTZCfg',
'UseCount': 0,
'NodeToken': 'PTZNodeToken',
'DefaultAbsolutePantTiltPositionSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
'DefaultAbsoluteZoomPositionSpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace',
'DefaultRelativePanTiltTranslationSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace',
'DefaultRelativeZoomTranslationSpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace',
'DefaultContinuousPanTiltVelocitySpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace',
'DefaultContinuousZoomVelocitySpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace',
'DefaultPTZSpeed': {
'PanTilt': {
'x': 1.0,
'y': 1.0,
'space': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace'
},
'Zoom': {
'x': 0.0,
'space': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace'
}
},
'DefaultPTZTimeout': datetime.timedelta(seconds=5),
'PanTiltLimits': {
'Range': {
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 360.0
},
'YRange': {
'Min': 0.0,
'Max': 180.0
}
}
},
'ZoomLimits': {
'Range': {
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace',
'XRange': {
'Min': 1.0,
'Max': 1.0
}
}
},
'Extension': {
'_value_1': [
<Element {http://www.onvif.org/ver10/schema}PTControlDirection at 0x72976efa36c0>
],
'PTControlDirection': None,
'Extension': None
},
'token': 'PTZCfgToken',
'_attr_1': {
'MoveRamp': '0',
'PresetRamp': '0',
'PresetTourRamp': '0'
}
},
'MetadataConfiguration': None,
'Extension': None,
'token': 'Profile_0',
'fixed': True,
'_attr_1': {
}
}]
Chosen token
Profile_0
Creating PTZ object
Created PTZ service object
PTZ configurations:
{
'Name': 'PTZCfg',
'UseCount': 0,
'NodeToken': 'PTZNodeToken',
'DefaultAbsolutePantTiltPositionSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
'DefaultAbsoluteZoomPositionSpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace',
'DefaultRelativePanTiltTranslationSpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace',
'DefaultRelativeZoomTranslationSpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace',
'DefaultContinuousPanTiltVelocitySpace': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace',
'DefaultContinuousZoomVelocitySpace': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace',
'DefaultPTZSpeed': {
'PanTilt': {
'x': 1.0,
'y': 1.0,
'space': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace'
},
'Zoom': {
'x': 0.0,
'space': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace'
}
},
'DefaultPTZTimeout': datetime.timedelta(seconds=5),
'PanTiltLimits': {
'Range': {
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 360.0
},
'YRange': {
'Min': 0.0,
'Max': 180.0
}
}
},
'ZoomLimits': {
'Range': {
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace',
'XRange': {
'Min': 1.0,
'Max': 1.0
}
}
},
'Extension': {
'_value_1': [
<Element {http://www.onvif.org/ver10/schema}PTControlDirection at 0x72976edf2900>
],
'PTControlDirection': None,
'Extension': None
},
'token': 'PTZCfgToken',
'_attr_1': {
'MoveRamp': '0',
'PresetRamp': '0',
'PresetTourRamp': '0'
}
}
PTZ configuration options:
{
'Spaces': {
'AbsolutePanTiltPositionSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 360.0
},
'YRange': {
'Min': 0.0,
'Max': 180.0
}
}
],
'AbsoluteZoomPositionSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace',
'XRange': {
'Min': 1.0,
'Max': 1.0
}
}
],
'RelativePanTiltTranslationSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace',
'XRange': {
'Min': -360.0,
'Max': 360.0
},
'YRange': {
'Min': -180.0,
'Max': 180.0
}
},
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationSpaceFov',
'XRange': {
'Min': -100.0,
'Max': 100.0
},
'YRange': {
'Min': -100.0,
'Max': 100.0
}
}
],
'RelativeZoomTranslationSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 0.0
}
}
],
'ContinuousPanTiltVelocitySpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace',
'XRange': {
'Min': -1.0,
'Max': 1.0
},
'YRange': {
'Min': -1.0,
'Max': 1.0
}
}
],
'ContinuousZoomVelocitySpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace',
'XRange': {
'Min': 0.0,
'Max': 0.0
}
}
],
'PanTiltSpeedSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace',
'XRange': {
'Min': 1.0,
'Max': 1.0
}
}
],
'ZoomSpeedSpace': [
{
'URI': 'http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace',
'XRange': {
'Min': 0.0,
'Max': 0.0
}
}
],
'Extension': None,
'_attr_1': None
},
'PTZTimeout': {
'Min': datetime.timedelta(seconds=1),
'Max': datetime.timedelta(seconds=100)
},
'_value_1': [
<Element {http://www.onvif.org/ver10/schema}PTControlDirection at 0x72976eddaac0>
],
'PTControlDirection': None,
'Extension': None,
'_attr_1': None
}
PTZ service capabilities:
{
'_value_1': None,
'EFlip': False,
'Reverse': False,
'GetCompatibleConfigurations': False,
'_attr_1': {
'MoveStatus': 'true',
'StatusPosition': 'true'
}
}
PTZ status:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/onvif/client.py", line 23, in wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/onvif/client.py", line 153, in wrapped
return call(params, callback)
File "/usr/local/lib/python3.8/dist-packages/onvif/client.py", line 140, in call
ret = func(**params)
File "/usr/local/lib/python3.8/dist-packages/zeep/proxy.py", line 46, in __call__
return self._proxy._binding.send(
File "/usr/local/lib/python3.8/dist-packages/zeep/wsdl/bindings/soap.py", line 135, in send
return self.process_reply(client, operation_obj, response)
File "/usr/local/lib/python3.8/dist-packages/zeep/wsdl/bindings/soap.py", line 229, in process_reply
return self.process_error(doc, operation)
File "/usr/local/lib/python3.8/dist-packages/zeep/wsdl/bindings/soap.py", line 391, in process_error
raise Fault(
zeep.exceptions.Fault: No status
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "testcamera2.py", line 71, in <module>
status = ptz.GetStatus(request)
File "/usr/local/lib/python3.8/dist-packages/onvif/client.py", line 26, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: No status
Let me check if my cam is really on 0.3.1
So with the fresh install i'm not getting the Invalid URL 'http:///onvif/media_service': No host supplied
anymore. I think that was caused by some settings I messed up... I think... I need further testing.
Also my camera is currently connected via Wi-Fi, this evening I will take a ethernet cable to connect the camera and check if anything changes.
I successfully installed frigate and configured with onvif support. The problem was "is_moving" configuration. The warning in the log is fixed but I don't know if autotracking works. Please, try this beta: r35gb_0.3.1.tar.gz
Good news it looks like to be working. There's no more errors.
I still need to figure out the movement_weights
and why it only works sometimes.
mqtt:
host: mqtt.<domain>
topic_prefix: frigate
user: MQTT
password: <pw>
detectors:
coral:
type: edgetpu
device: pci
cameras:
TESTCAM:
ffmpeg:
inputs:
- path: rtsp://192.168.1.58/ch0_0.h264
roles:
- record
- detect
hwaccel_args: preset-intel-qsv-h264
detect:
width: 1280
height: 720
enabled: true
record:
enabled: false
snapshots:
enabled: false
zones:
zone_0:
coordinates:
866,613,1033,495,1065,343,1047,258,967,146,781,119,688,114,416,119,220,263,238,567,480,630,746,640
onvif:
host: 192.168.1.58
port: 80
user: admin
password: admin
autotracking:
calibrate_on_startup: false
# Optional: enable/disable object autotracking. (default: shown below)
enabled: true
zooming: disabled
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
#movement_weights: 0.0, 1.0, 0.13565969467163086, 0.14995758918023874, 0.05161041828893848
#movement_weights: 0.0, 1.0, 0.2214038372039795, 0.297745349843015, -0.0014536011603570433
movement_weights: 0.0, 1.0, 0.15508723258972168, 0.2883783109726445, 0.0009348861632808843
objects:
track:
- person
- car
logger:
default: info
logs:
frigate.ptz.autotrack: debug
frigate.ptz.onvif: debug
I'm going to close the issue for now because it looks like it's solved. Still need to figure out why sometimes it turns in the wrong direction but I think it's a config issue. Thank you for the help. Will patiently wait for the stable release.
Frigate NVR released a new beta with support of autotracking but currently the Yi Dome Guard doesn't support "RelativeMove with FOV" but only "RelativePanTiltTranslationSpace" Script to verify the camera support. Are there any interest to add the feature?