Open OreoOba opened 10 months ago
Hello,
I still get this error even though I add the "old" argument. MY code:
from PyP100 import PyP110 p110 = PyP110.P110("192.168.1.84", "xxx", "yyy",preferred_protocol="old" ) p110.getEnergyUsage()
Error:
Error: {'error_code': 1003}
Failed to initialize protocol OldProtocol
Traceback (most recent call last):
File "c:\Users\34652\Documents\Python\Domótica\PyP100\PyP100.py", line 32, in _initialize
protocol.Initialize()
File "c:\Users\34652\Documents\Python\Domótica\PyP100\auth_protocol.py", line 244, in Initialize
result = self._request_raw("handshake", {"key": public_key})
File "c:\Users\34652\Documents\Python\Domótica\PyP100\auth_protocol.py", line 173, in _request_raw
raise Exception(f"Error code: {data['error_code']}")
Exception: Error code: 1003
Traceback (most recent call last):
File "c:\Users\34652\Documents\Python\Domótica\prueba.py", line 4, in
Thanks for solving the problem Just a small add to your comments Be carefull if you combine devices with the old protocol and the new one. 1) Add the preferred_protocol="old" at the inital statement of each old device 2) Don't delete the p100.handshake() and p100.login() for the devices that keep the old protocol