Comments (3)
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.
Thanks for reporting and figuring this out. I'll apply this once you have verfied with the new HS110
from tfbrew.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tfbrew.