Page 1 of 1

Unknown PTZ API

Posted: Sat Jul 09, 2022 7:48 pm
by jogo
I've just installed a somewhat older 5MP camera with optical zoom. It looks as if it is a Uniview camera, but it has been rebranded to something else. The stickers say Allnet ALL-CAM2496-LEFN and, of course, I have not docs whatsoever.

The video has a more or less standard rtsp path and by capturing the communication with Wireshark I can now zoom, focus and go home again with curl scripts. Does someone happen to know this API and where there are some docs about it?
PUT LAPI/V1.0/Channel/0/PTZ/PTZCtrl
and the credentials need digest authentication.

Does someone know whether one of the predefined cameras use the same API?

Re: Unknown PTZ API

Posted: Sat Jul 09, 2022 8:31 pm
by Magic919
Have a search in the control files.

Re: Unknown PTZ API

Posted: Sun Jul 10, 2022 12:39 pm
by jogo
None of the .pm files come close to this API, but I managed to download the Uniview SDK with some useful information.

Re: Unknown PTZ API

Posted: Tue Jul 12, 2022 2:01 pm
by iconnor
I had started on one, but only needed camera reboot so far.

Re: Unknown PTZ API

Posted: Tue Jul 12, 2022 5:04 pm
by jogo
I could start to write some commands for my camera. The only thing to pay attention to would be to use PUT with a json body. It might be useful for a couple of more users.

Two reasons speak against doing this, The first is that I cannot test the functions not provided by my camera. The second is that Uniview falls into the same political category as Hikvision.

On the other hand nothing speaks against such a generic json interface as might be useful for other APIs as well.

Let me know whether you are interested in this small piece of code. Like real programmers I am currently using shell scripts with cURL commands inside to change the camera settings, so it would basically only be a few lines of perl code for me.

Re: Unknown PTZ API

Posted: Tue Jul 12, 2022 5:26 pm
by iconnor
I'll commit mine to master. It is a copy of hikvision I think, so most of it is irrelevant. It can be a starting point though.

Re: Unknown PTZ API

Posted: Tue Jul 12, 2022 6:56 pm
by jogo
I'll grab it and see what I can do with it.