ONVIF PresetToken wrong

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Schokex
Posts: 2
Joined: Thu Jan 18, 2024 7:45 pm

ONVIF PresetToken wrong

Post by Schokex »

Hello,

I'm using a Chinese Cooau P4 PTZ Camera (Firmware says it is a Meari Speed B5T). It uses ONVIF for PTZ. With the OnVIF Device Manager I can set and call pan/tilt presets just fine. In ZoneMinder I can manually pan and tilt the camera, but I cannot set or call presets.

With Wireshark I found the difference:
ODM sends "PRESET_1" as PresetToken, Zoneminder sends just "1" when calling preset 1.

Here is the excerp from Wireshark:

ZoneMinder:

Code: Select all

....
                <ProfileToken>
                    PROFILE_000
                    </ProfileToken>
                <PresetToken>
                    1
                    </PresetToken>
...
ODM:

Code: Select all

....
                <ProfileToken>
                    PROFILE_000
                    </ProfileToken>
                <PresetToken>
                    PRESET_1
                    </PresetToken>
...
Is there any way I can change the PresetToken in Zoneminder and add the "PRESET_" before the preset number?
Thanks for the help!
User avatar
iconnor
Posts: 2949
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ONVIF PresetToken wrong

Post by iconnor »

edit /usr/share/perl5/ZoneMinder/Control/Netcat.pm

Around lines 504 there are the preset functions, add the PRESET_ to the xml sent
Schokex
Posts: 2
Joined: Thu Jan 18, 2024 7:45 pm

Re: ONVIF PresetToken wrong

Post by Schokex »

Thanks for the info.

I did make some changes, but apparently it is not applied. ZoneMinder is still sending "1" instead of "PRESET_1".
Do I need to recompile?
User avatar
iconnor
Posts: 2949
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ONVIF PresetToken wrong

Post by iconnor »

You need to restart the zmcontrol process. you could do sudo killall zmcontrol.pl and it will kill them all. They will be restarted automatically
Post Reply