BaQs / pyEzviz

Python package for ezviz cameras
Apache License 2.0
105 stars 45 forks source link

Add PTZ (x,y) control functions #57

Closed jojoxd closed 2 years ago

jojoxd commented 2 years ago

I've added controls for moving the camera using an undocumented endpoint, /v3/panoramicDevices/operation.

I've noticed while testing that the Y coordinate does nothing, but it does get sent when pressing on the panorama in the app, so I've added it in as well.

It's been tested and works correctly on my C6T camera, using the new command line camera move_coords --x <x> --y <y>.

mitmproxy details of request / response implemented in this PR ![Screenshot_20211116_192628](https://user-images.githubusercontent.com/5726497/142045825-4eb476e6-3670-4fed-be46-3c6318d24d17.png) ![Screenshot_20211116_192655](https://user-images.githubusercontent.com/5726497/142045835-afed39e0-3c30-419f-bb8f-22f2d8ef3c01.png)

If you need me to change anything I'll be happy to do it.

-Joey

Fixes #53

jojoxd commented 2 years ago

I was testing some things using the app, and the Y coordinate has some weird behavior for the C6T.

When just using the absolute movement, it will mostly ignore the Y coordinate, but after moving using the directions, it will pick it up.

RenierM26 commented 2 years ago

Cool. Thank you!