Not working on latest hardware v3.0, firmware v1.5.2
See original GitHub issueI can’t get the script running on a newly purchased HS110(EU). Device label says it’s HW v3.0, Kasa app however says it’s HW v2.0… Firmware is on 1.5.2 (Build 180130) as per Kasa info.
If I send a request I get an empty response:
MacBook-Pro:~ user$ downloads/tplink-smartplug-master/tplink-smartplug.py -t 192.168.5.xx -c on
Sent: {"system":{"set_relay_state":{"state":1}}}
Received:
Running the same thing on my trusty HS100(EU) v1.0 on FW v1.1.3 is working as intended.
MacBook-Pro:~ user$ downloads/tplink-smartplug-master/tplink-smartplug.py -t 192.168.5.xx -c on
Sent: {"system":{"set_relay_state":{"state":1}}}
Received: {"system":{"set_relay_state":{"err_code":0}}}
Just randomly sending requests to other devices gives me the following:
MacBook-Pro:~ user$ downloads/tplink-smartplug-master/tplink-smartplug.py -t 192.168.5.xx -c info
Cound not connect to host 192.168.5.xx:9999
Port 9999 therefore seems to be open on new versions, but it looks like TP-Linked changed something in between.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8
Top GitHub Comments
That change worked - thanks. One of the other branches had it coded as:
result = struct.pack(">I", len(string))
Which seems to be a neater way of expressing the same thing.
Oh, it’s working if you replace the encrypt method with this one:
Found this code on https://github.com/softScheck/tplink-smartplug/issues/22#issuecomment-331464459
This gives me
{"system":{"get_sysinfo":{"sw_ver":"1.4.3 Build 171009 Rel.104144","hw_ver":"2.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(EU)","mac":"....
And magically this code also works for my older versions HW 1.0/SW 1.1.4