Closed RobertVoorn1977 closed 2 years ago
I’m experiencing the same Issue. How did you solve it?
I fixed it by using the correct factory method:
p110 = PyP110.P110(ip_address, user, password)
Simple, really, once you discover this
Ah, I missed that mistake in the code that you first posted.
In my case it was enough to unplug and replug the P110, it just for some reason didnt start the HTTP server on the plug itself and was thus really not reachable via the API.
Thank you :)
Apologies if this is the wrong location to request help on getting this code to work, but could not find any other way on this project page to ask for help. If I overlooked the correct way of asking for help, please let me know the correct way.
I am assuming that the Tapo P110 smart plug is supported by this project.
After installing the dependency with 'pip3 install PyP100', I cannot get the below code to work (taken straight from the README.md page):
I have of course substituted the IP address (from the working Tapo android app) and user name and password (the same as what I use to log into the Tapo account). When I run the code, there is a stacktrace suggesting there is a timeout. The Tapo app on my phone works fine.
I have only added the last part of the stack trace because as far as I can see, that is the most important/interesting one
Traceback (most recent call last): File "/Users/robafett/PycharmProjects/BatterySaver/venv/lib/python3.9/site-packages/requests/adapters.py", line 507, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.5.129', port=80): Max retries exceeded with url: /app (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x10b6b4a90>, 'Connection to 192.168.5.129 timed out. (connect timeout=2)')) python-BaseException