Comments (8)
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.
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.
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.
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.
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.
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.
Since there are a number of PRs that aren't getting merged, Is anyone maintaining a somewhat up-to-date fork?
from tplink-smartplug.
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)
- bad argument #2 to 'Proto' HOT 3
- Failed to connect to host ...
- Convert to Powershell?
- Ability to read the power usage? HOT 1
- Correlation between script results and Kasa app
- Set mac address HOT 1
- HS100 Hardware V4.1 Firmware 1.1.0 - No Longer Working - No Port 9999 HOT 30
- KP400 dual port control HOT 3
- Extraneous 'f' in tplink_smartplug.py causing Python error HOT 1
- Problem Controll TP Link HS110
- Works with KP115 HOT 3
- Support for multi device KP200
- How might I assign a static IP via the devices themselves?
- google home seamless setup
- Dissector for the UDP discovery HOT 2
- KS220M(US) Dump - WIP HOT 2
- Faster version
- INFO REQUEST: HS110 Calibration
- temp enable on hs110 HOT 1
- JSON commands don't seem to work HOT 3
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 tplink-smartplug.