JurajNyiri / pytapo

Python library for communication with Tapo Cameras
MIT License
277 stars 58 forks source link

Call to setFirmwareAutoUpgradeConfig returns error #124

Closed fmarzocca closed 1 month ago

fmarzocca commented 1 month ago

I am calling the function: tapo.setFirmwareAutoUpgradeConfig(False) but I am getting this error:

  File "/usr/local/lib/python3.11/dist-packages/pytapo/__init__.py", line 930, in setFirmwareAutoUpgradeConfig
    return self.executeFunction(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pytapo/__init__.py", line 510, in executeFunction
    raise Exception(
Exception: Error: Parameter to set does not exist, Response: {"method": "setFirmwareAutoUpgradeConfig", "result": {}, "error_code": -40101}
JurajNyiri commented 1 month ago

Not every camera supports this function, this works as expected. If camera does not support this, it does not support auto update setting.

fmarzocca commented 1 month ago

This library is worth some more detailed instructions. In addition, the return error should say: "Not supported by this camera", without crashing into an Exception.

JurajNyiri commented 1 month ago

It returns an error exactly as camera does which is more useful. It says so.

For documentation feel free to open PR. This is an open source project.