BaQs / pyEzviz

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

camera.move() method in a loop has different end points depending on the starting point of movement #74

Open I-Kryachko opened 2 years ago

I-Kryachko commented 2 years ago

My cam: c8c

My env:

Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

Name: pyezviz
Version: 0.2.0.5
Summary: Pilot your Ezviz cameras
Home-page: http://github.com/baqs/pyEzviz/
Author: Pierre Ourdouille
Author-email: baqs@users.github.com
License: Apache Software License 2.0
Location: d:\anaconda3\lib\site-packages
Requires: paho-mqtt, pandas, requests, xmltodict, pycryptodome
Required-by:

I am trying to make a calibrate method to make sure that my camera has correct coordinates when it is powered. As described in issue there is no way to use move_coords method to set the Y coordinate in absolute coordinates and that is why I am trying to implement calibration.

My calibration is intended to move camera to a fixed left location in a loop with move('left') method. If the camera looks to the rightest point (manually set in app) then nearly 100 moves with a sleep(0.4) is available and then camera stops moving. If it is not in the rightest state when I begin to move - it allows less moves but the final point of view is farther than from the rightest point. If I try to move further in the app - I see the red light indicating that there is no way to move further in both cases. But if I move to the left for a second in the app and long press the move to the right button - it moves to the end till it makes full 360 rotation. If I try to move the camera from the rightest point with the app long pressing the left button - it makes full 360 rotation without any problems.

That inspires me that there are differences between pressing and long pressing the movement buttin in the app and in the pyezviz only short pressing is implemented or there are some internal backend bugs of the local move coordinate counter which somehow stops me from moving in a loop too early.

Any help with my calibration needs would be nice.

RenierM26 commented 1 year ago

The api returns a start point so might be possible to calculate the final coordinates from that.