Giter VIP home page Giter VIP logo

Comments (3)

ChuckGl avatar ChuckGl commented on August 15, 2024

Ok after much trial and error I have my HW 2.0 HS100 working. I made the following changes which I found in the softcheck tplink-smartplug github project.

def encrypt(string):
key = 171
result = b"\0\0\0"+ chr(len(string)).encode('latin-1')
for i in string.encode('latin-1'):
a = key ^ i
key = a
result += chr(a).encode('latin-1')
return result

def decrypt(string):
key = 171
result = ""
for i in string:
a = key ^ i
key = i
result += chr(a)
return result

This required changing line 98:

transport.write(encrypt(bytes(msg,'ascii')))
to
transport.write(encrypt(msg))

It works with both the HW 2.0 and the previous HW 1.0. I have a HS110 coming this weekend I will test with it as well.

from tfbrew.

hrafnkelle avatar hrafnkelle commented on August 15, 2024

Thanks for reporting and figuring this out. I'll apply this once you have verfied with the new HS110

from tfbrew.

ChuckGl avatar ChuckGl commented on August 15, 2024

Tested with the HS110 and it works no problems. It is hardware ver. 2.0 and firmware 1.5.4 From what I have read there is a HW ver 3.0 but it reports to function as the HW 2.0 plugs.

from tfbrew.

Related Issues (7)

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.