JurajNyiri / pytapo

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

"Authentication failed" without changing anything #117

Closed meju25 closed 3 months ago

meju25 commented 3 months ago

I am using the great pytapo library now alrady for some time to download videos from my C110. Everything worked really well, but today (2024-06-12 roundabout 16:00 CEST) my script (using DownloadRecordings.py) suddenly stopped working with the following trace:

D:\git\pytapo\experiments>python DownloadRecordings.py 20240612
Connecting to camera...
Traceback (most recent call last):
  File "D:\git\pytapo\experiments\DownloadRecordings.py", line 29, in <module>
    tapo = Tapo(host, user, password_cloud, password_cloud)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\juerg\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytapo\__init__.py", line 86, in __init__
    self.basicInfo = self.getBasicInfo()
                     ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\juerg\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytapo\__init__.py", line 1009, in getBasicInfo
    return self.executeFunction(
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\juerg\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytapo\__init__.py", line 491, in executeFunction
    data = self.performRequest(
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\juerg\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytapo\__init__.py", line 530, in performRequest
    self.ensureAuthenticated()
  File "C:\Users\juerg\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytapo\__init__.py", line 108, in ensureAuthenticated
    return self.refreshStok()
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\juerg\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytapo\__init__.py", line 418, in refreshStok
    return self.refreshStok(loginRetryCount)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\juerg\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytapo\__init__.py", line 418, in refreshStok
    return self.refreshStok(loginRetryCount)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\juerg\AppData\Local\Programs\Python\Python312\Lib\site-packages\pytapo\__init__.py", line 423, in refreshStok
    raise Exception("Invalid authentication data")
Exception: Invalid authentication data

I did not change anything, nor did I update the code from the repo (I tried later, but it did not change the situation). Connecting to the camera via App works as usual. Connecting to the camera via RTSP works as usual. But connecting via pytapo does no longer work (already rebooted the camera => did not help).

Any ideas what could be wrong?

Thanks and br, Jürgen

JurajNyiri commented 3 months ago

https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/551