Giter Club home page Giter Club logo

Comments (8)

tricoos avatar tricoos commented on August 23, 2024 1

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 #22 (comment)

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

from tplink-smartplug.

cbz avatar cbz commented on August 23, 2024 1

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.

from tplink-smartplug.

cbz avatar cbz commented on August 23, 2024

Using a HS100 on V2 with v1.5.2 firmware, I see the Kasa App appears to be still sending messages in the same format to the endpoint:

{"system":{"get_sysinfo":{}}}

However, replaying this message to the plug via the script just results in the connection hanging (or returning straight away).

from tplink-smartplug.

tricoos avatar tricoos commented on August 23, 2024

Just got my new one (HS110 (EU) as well!) today with exactly the same problem and version difference (i.e. label says V3 and app says 2.0) - however mine has the firmware version 1.4.3 and it's also not working.
A port scan shows that port 9999 is still open and the only open port.

from tplink-smartplug.

tricoos avatar tricoos commented on August 23, 2024

They also changed the return format for emeterGetRealtimeData from this:
Received: {"emeter":{"get_realtime":{"current":0.725381,"voltage":228.570117,"power":95.750014,"total":173.236000,"err_code":0}}}
to this:
Received: {"emeter":{"get_realtime":{"voltage_mv":229153,"current_ma":28,"power_mw":0,"total_wh":0,"err_code":0}}}

They not only changed the names but also the format obviously

from tplink-smartplug.

thiemob avatar thiemob commented on August 23, 2024

Thank you all, I can confirm @tricoos solution.
This comment came in literally 15 minutes after I bought two 2017 HS110 off of eBay.

from tplink-smartplug.

rct avatar rct commented on August 23, 2024

Since there are a number of PRs that aren't getting merged, Is anyone maintaining a somewhat up-to-date fork?

from tplink-smartplug.

cbz avatar cbz commented on August 23, 2024

You can take a look at some of the forks that have later commit dates, but for the most part they are point fixes. I think no one really wants to have to maintain the DES related code, and that stops people from forking.

from tplink-smartplug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.