I'm still having problems getting the code to work with my TP100 plugs. I've tried numerous ones and none of them work.
This is the following output to one of them a build firmware of 1.4.18 using the preferred_protocol="old"
Error: {'error_code': -1501}
Failed to initialize protocol OldProtocol
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 32, in _initialize
protocol.Initialize()
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/auth_protocol.py", line 258, in Initialize
result = self._request(
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/auth_protocol.py", line 203, in _request
raise Exception(f"Error code: {data['error_code']}")
Exception: Error code: -1501
Traceback (most recent call last):
File "/home/pi/scripts/tapo/tapo.py", line 5, in
p100.turnOn() # Turns the connected plug on
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 89, in turnOn
return self.set_status(True)
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 86, in set_status
return self._set_device_info({"device_on": status})
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 61, in _set_device_info
return self.request("set_device_info", params)
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 43, in request
self._initialize()
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 39, in _initialize
raise Exception("Failed to initialize protocol")
Exception: Failed to initialize protocol
I'm still having problems getting the code to work with my TP100 plugs. I've tried numerous ones and none of them work.
This is the following output to one of them a build firmware of 1.4.18 using the preferred_protocol="old"
Error: {'error_code': -1501} Failed to initialize protocol OldProtocol Traceback (most recent call last): File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 32, in _initialize protocol.Initialize() File "/home/pi/.local/lib/python3.9/site-packages/PyP100/auth_protocol.py", line 258, in Initialize result = self._request( File "/home/pi/.local/lib/python3.9/site-packages/PyP100/auth_protocol.py", line 203, in _request raise Exception(f"Error code: {data['error_code']}") Exception: Error code: -1501 Traceback (most recent call last): File "/home/pi/scripts/tapo/tapo.py", line 5, in
p100.turnOn() # Turns the connected plug on
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 89, in turnOn
return self.set_status(True)
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 86, in set_status
return self._set_device_info({"device_on": status})
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 61, in _set_device_info
return self.request("set_device_info", params)
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 43, in request
self._initialize()
File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 39, in _initialize
raise Exception("Failed to initialize protocol")
Exception: Failed to initialize protocol