fishbigger / TapoP100

A module for controlling the TP-Link Tapo P100 Plugs
MIT License
567 stars 139 forks source link

P100.handshake() starts new TCP session #65

Closed realzoulou closed 1 year ago

realzoulou commented 2 years ago

Fix #50, #54, #62, #64. Description: P100 instance initially has no open requests.Session. When P100.handshake() is called, a previous Session is closed and a new one created. Behavioral change: P100.getDeviceName() now expects that handshake() and login() has happened on the P100 instance before.

Signed-off-by: richi zoulourns@gmail.com

realzoulou commented 2 years ago

Tested with P110 devices only, but my own HA integration covers these P100 APIs: handshake, login, getDeviceInfo, getDeviceName

realzoulou commented 2 years ago

@fishbigger Have you decided which PR to take? #65 or #66 ?

realzoulou commented 1 year ago

Resolved merge conflicts

fishbigger commented 1 year ago

Sorry I didn't get to this sooner. It seems a lot better than my quick fix earlier.