question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not working on latest hardware v3.0, firmware v1.5.2

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
cbzcommented, Jun 14, 2018

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.

1reaction
tricooscommented, Jun 14, 2018

Oh, it’s working if you replace the encrypt method with this one:

 def encrypt(string):
    key = 171
    result = "\0\0\0"+chr(len(string))
    for i in string:
            a = key ^ ord(i)
            key = a
            result += chr(a)
    return result

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firmware Release Notes - AmpliFi
This article includes most important details of each AmpliFi firmware release along with its date of release. The release notes are split...
Read more >
How to Update Your grandMA3 Hardware
Press encoder to install." Click the encoder knob to the right of the screen. Click the encoder knob again to format the node....
Read more >
Firmware update S7-1500 CPUs incl. Displays and ET 200 ...
Firmware update for all S7-1500 CPUs incl. Displays and ET 200 CPUs (ET 200SP, ET 200pro) - Latest change: New firmware version V3.0.1...
Read more >
Versions and upgrades | Reference - Particle docs
Note this will only ever upgrade. If you have Device OS 2.0.0 on your device and flash user firmware targeting 1.5.2 Device OS...
Read more >
How to Upgrade the firmware version of TP-Link Wireless Router
1) Some models have multiple hardware versions. Please verify the hardware version of your device. When upgrading use only firmware for the same ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found