HS220 v2 hardware support?
See original GitHub issueJust received a HS220 from Amazon today. Packaging was different (smaller) than the previous two I ordered. Switch itself was identical to the other two I already have up and running with this plugin.
Expected Behavior
Shutdown Homebridge, add new switch through the Kasa app and then restart Homebridge. Was expecting new switch to be available through HomeKit.
Current Behavior
Device not available through HomeKit. Looking at the switch, it seems to be going through reboot loops. Even basic light control right from the switch aren’t working and device shows up as offline in Kasa app. Sometimes appear to come online but sending commands fail. Uninstalling this plugin from Homebridge makes the device functional again from the Kasa app.
After several hard reset, realize that it reports as being of “Hardware Version 2.0” where my to other devices report as 1.0. Firmware and MAC address are also quite different: v1.0.3 and B0:95:75 (instead of v1.5.11 and 1C:3B:F3 for my v1.0 hardware devices).
Versions
- Node: v12.18.1
- Homebridge: 1.1.1
- OS: CentOS 7.7.1908
Configuration
{
"name": "TplinkSmarthome",
"platform": "TplinkSmarthome"
}
Homebridge Log / Command Output
Nothing relevant shows up in the Homebridge log. Only the discovery packet being sent out and the discovery of both my v1.0 devices.
Issue Analytics
- State:
- Created 3 years ago
- Comments:35 (9 by maintainers)
Top GitHub Comments
If you guys don’t need the energy monitoring portion of the api, you can keep using the plugin by manually editing the file
homebridge/node_modules/homebridge-tplink-smarthome/node_modules/tplink-smarthome-api/lib/client.js
At line 19, replace:
const discoveryMsgBuf = encrypt( '{"system":{"get_sysinfo":{}},"emeter":{"get_realtime":{}},"smartlife.iot.common.emeter":{"get_realtime":{}}}' );
with
const discoveryMsgBuf = encrypt('{"system":{"get_sysinfo":{}}}');
Keep in mind that this will break as soon as the plugin is updated or removed and reinstalled in Homebridge.
For my part, I’ve been running with this edit for the past two weeks without any issues.
Ok - so I figured out how to edit the code per the information above. I have now gotten this to work with a switch in the wall. This approach definitely fixed my problem with it constantly resetting. Thank you to everyone that figured out the line of code that was the problem!
Per the info above - you are changing the following code:
At line 19, replace: const discoveryMsgBuf = encrypt( ‘{“system”:{“get_sysinfo”:{}},“emeter”:{“get_realtime”:{}},“smartlife.iot.common.emeter”:{“get_realtime”:{}}}’ );
with
const discoveryMsgBuf = encrypt(‘{“system”:{“get_sysinfo”:{}}}’);