python-kasa and KLAP authentication
I purchased two Smartplug switches a while back, models EP10. They are currently running software version 1.0.5 Build 221021 Rel.183404. I also installed the python-kasa kit on my raspberry-pi. This is running the latest version python-kasa. Happy with how these were working I ordered two more EP10s. While adding the new smartplugs I went for the software upgrade. These new devices are running software version 1.1.1 Build 250908 Rel.112508. From reading the web I see that the kasa hardware started moving to KLAP 1.(KASA Local Authentication Protocol) with these later versions.
On the new smartplugs I can't get the klap authentication to work. I see others with the same issues on this forum but no real clear answers. What's more baffling is that the new plugs KasaPlug3&4 toggle between XOR and KLAP. While on XOR the python-kasa tool works fine. However once they toggle over to KLAP the authentication error appears and I can no longer manage them through the python tool.
Note that using the app on my phone, both Kasa and Tapo I can operate the new smartplugs just fine however I really want to use the python tool for reasons I don't want to explain. The python tool does have options to pass usernames and passwords using KLAP. Best I can tell the smartplugs running the later software are not logged into the cloud, but if that's the case then how is the app working on my phone?
For example I get the same error below when using the correct username and password.
kasa -e klap --username johnedoe@gmail.com --password abc12345 --host 172.18.64.25 sysinfo
Raised error: Device response did not match our challenge on ip 172.18.64.25, check that your e-mail and password (both case-sensitive) are correct.
When logged into tpcloud I do not see the smartplugs. Is this normal? Is there a way to get the new devices to stay on XOR? I have done all the usual things like remove the devices and re-add them, toggle off/on 3rd party apps etc however the behavior is the same. Any ideas?
kasa discover list
HOST MODEL DEVICE FAMILY ENCRYPT HTTPS LV ALIAS
172.18.64.99 EP10 IOT.SMARTPLUGSWITCH XOR 0 - KasaPlug2
172.18.64.25 EP10 IOT.SMARTPLUGSWITCH XOR 0 - KasaPlug4
172.18.64.100 EP10 IOT.SMARTPLUGSWITCH XOR 0 - KasaPlug3
172.18.64.98 EP10 IOT.SMARTPLUGSWITCH XOR 0 - kasaPlug1
kasa discover list
HOST MODEL DEVICE FAMILY ENCRYPT HTTPS LV ALIAS
172.18.64.100 EP10 IOT.SMARTPLUGSWITCH KLAP 0 2 - Authentication failed
172.18.64.25 EP10 IOT.SMARTPLUGSWITCH KLAP 0 2 - Authentication failed
172.18.64.98 EP10 IOT.SMARTPLUGSWITCH XOR 0 - kasaPlug1
172.18.64.99 EP10 IOT.SMARTPLUGSWITCH XOR 0 - KasaPlug2
