Open mven opened 2 years ago
I think this may be new device firmware breaking how the plugin works. The devices should be using port 9999 but they aren't. Can you follow these steps and post the results? See #244
Output:
[mike@ishimura ~]$ npx tplink-smarthome-api search
Searching...
startDiscovery({
discoveryInterval: 2000,
discoveryTimeout: 10000,
breakoutChildren: true,
broadcast: '255.255.255.255'
})
KL125(US) bulb IOT.SMARTBULB 192.168.1.116 19082 E848B8554F38 8012213D83E6F211EEFAC9EE4D6732C21E556C81 Office Desk Lamp
KP405(US) plug IOT.SMARTPLUGSWITCH 192.168.1.202 10459 1027F59C7E82 80066DBA128692EACBC1D1E262E01B6C1EE7ECFD String lights outlet
KL125(US) bulb IOT.SMARTBULB 192.168.1.195 17178 E4C32A824850 801271A9E8A2734DD542E942AC0352CC1DA4E819 Living Room floor lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.197 3807 E4C32A822D38 80123AAB28A92212C85CF43FF387621C1DA305E4 Master Bedroom Table Lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.199 32590 E848B855DECD 801282FB70B9B09F32594B2C0C3648F51E5BEB24 Entry Room Floor Lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.115 23314 E848B855DBB8 801263B454866E912DAA27E05A0C65841E5A68B0 Dining Room Floor Lamp
Yeah I haven't seen this before, all those ports are usually 9999. Do they change every time you run search or are they static?
Can you also run this: (replace the IP to match what search returns for KP405)
tplink-smarthome-api setPowerState 192.168.1.202 false
tplink-smarthome-api setPowerState 192.168.1.202 true
Note this will turn the plug off and on (if its working).
Yep, it looks like ports are changing each time I run the util (ran 2x):
[mike@ishimura ~]$ npx tplink-smarthome-api search
Searching...
startDiscovery({
discoveryInterval: 2000,
discoveryTimeout: 10000,
breakoutChildren: true,
broadcast: '255.255.255.255'
})
KP405(US) plug IOT.SMARTPLUGSWITCH 192.168.1.202 21788 1027F59C7E82 80066DBA128692EACBC1D1E262E01B6C1EE7ECFD String lights outlet
KL125(US) bulb IOT.SMARTBULB 192.168.1.116 64780 E848B8554F38 8012213D83E6F211EEFAC9EE4D6732C21E556C81 Office Desk Lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.195 2215 E4C32A824850 801271A9E8A2734DD542E942AC0352CC1DA4E819 Living Room floor lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.115 41764 E848B855DBB8 801263B454866E912DAA27E05A0C65841E5A68B0 Dining Room Floor Lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.199 1951 E848B855DECD 801282FB70B9B09F32594B2C0C3648F51E5BEB24 Entry Room Floor Lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.197 35657 E4C32A822D38 80123AAB28A92212C85CF43FF387621C1DA305E4 Master Bedroom Table Lamp
[mike@ishimura ~]$ npx tplink-smarthome-api search
Searching...
startDiscovery({
discoveryInterval: 2000,
discoveryTimeout: 10000,
breakoutChildren: true,
broadcast: '255.255.255.255'
})
KL125(US) bulb IOT.SMARTBULB 192.168.1.116 44268 E848B8554F38 8012213D83E6F211EEFAC9EE4D6732C21E556C81 Office Desk Lamp
KP405(US) plug IOT.SMARTPLUGSWITCH 192.168.1.202 27572 1027F59C7E82 80066DBA128692EACBC1D1E262E01B6C1EE7ECFD String lights outlet
KL125(US) bulb IOT.SMARTBULB 192.168.1.199 39742 E848B855DECD 801282FB70B9B09F32594B2C0C3648F51E5BEB24 Entry Room Floor Lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.195 32927 E4C32A824850 801271A9E8A2734DD542E942AC0352CC1DA4E819 Living Room floor lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.115 49226 E848B855DBB8 801263B454866E912DAA27E05A0C65841E5A68B0 Dining Room Floor Lamp
KL125(US) bulb IOT.SMARTBULB 192.168.1.197 22011 E4C32A822D38 80123AAB28A92212C85CF43FF387621C1DA305E4 Master Bedroom Table Lamp
tplink-smarthome-api setPowerState 192.168.1.202 false
[mike@ishimura ~]$ npx tplink-smarthome-api setPowerState 192.168.1.202 false
Sending setPowerState command to 192.168.1.202: via tcp...
response:
true
tplink-smarthome-api setPowerState 192.168.1.202 true
[mike@ishimura ~]$ npx tplink-smarthome-api setPowerState 192.168.1.202 true
Sending setPowerState command to 192.168.1.202: via tcp...
response:
true
Did it turn off and on?
Yes - it's responding: powering off when set to false
and powering on when set to true
Great! So right now the software makes the assumption that the port the devices responds back from discovery is the one it should use to communicate. Until now that has generally been 9999. I will have to make some changes to just always default to 9999 and I believe that should have this working for you.
@mven can you please install homebridge-tplink-smarthome@7.1.0-next.0
and let me know if that fixes your issue?
Hi - installed and confirmed that devices are now working (bulbs and plugs) in iOS Home app. I'm also able to use Siri again to toggle their status. Looks like your fix worked 🚀
@mven can you please install
homebridge-tplink-smarthome@7.1.0-next.0
and let me know if that fixes your issue?
Hey, it looks like Im having the same issues from the logs but Im a bit lost on how you fixed this. From the sounds of it, it's just a simple fix, I just don't fully understand yet. Any help would be much appreciated.
@plasticrake Hi! I have the same problem in Homebridge running on a synology diskstation. how to install the fixed version? I somehow can´t figure it out.. Will this version be available via the "normal" plugin installation in the gui?
Thanks in advance..
@plasticrake Hi! I have the same problem in Homebridge running on a synology diskstation. how to install the fixed version? I somehow can´t figure it out.. Will this version be available via the "normal" plugin installation in the gui?
Thanks in advance..
npm install homebridge-tplink-smarthome@7.1.0-next.0
I´ve tried the command in the homebridge console. it runs without errors but the 7.0.1 version is still active. Maybe i´m just not understanding it correctly?
Is there an existing issue for this?
What happened?
I'm running into an issue where I can see the statuses of my devices on the iOS Home app, but I can't toggle them. I've a mix of Kasa devices, but mostly KL125. I've tried rolling back to v6 of the plugin, but I'm still experiencing the issue.
What, if anything, has recently changed?
Nothing in terms of the devices (maybe firmware updates happened OTA). I've kept homebridge up to date and it's plugins.
Homebridge info:
Plugins:
Version
7.0.1
Node Version
v16.14.0
Homebridge Version
1.4.0
Which OS/Platform?
Docker (Linux)
Relevant log output
Configuration