plasticrake / homebridge-tplink-smarthome

TP-Link Smarthome Plugin for Homebridge
MIT License
467 stars 70 forks source link

Unable to Add HS220 Dimmer Switch to HomeKit #334

Open goolskyjohn opened 5 months ago

goolskyjohn commented 5 months ago

Is there an existing issue for this?

What happened?

A few days ago I became aware of the fact that the my HS220 dimmer switch was not working to turn the light on and off in HomeKit. I removed the device from HomeKit and re-added it, but I'm not able to get the switch to show up again.

What, if anything, has recently changed?

The plugin was recently upgraded to v8.0.2.

Version

8.0.2

Node Version

18.13.0

Homebridge Version

1.7.0

Which OS/Platform?

Docker (Linux)

Relevant log output

[1/24/2024, 2:13:29 PM] [TplinkSmarthome] Initializing TplinkSmarthome platform...
[1/24/2024, 2:13:29 PM] [TplinkSmarthome] homebridge-tplink-smarthome v8.0.2, node v18.13.0, homebridge v1.7.0, api v2.7
[1/24/2024, 2:16:26 PM] [TplinkSmarthome] Initializing TplinkSmarthome platform...
[1/24/2024, 2:16:26 PM] [TplinkSmarthome] homebridge-tplink-smarthome v8.0.2, node v18.13.0, homebridge v1.7.0, api v2.7
[1/24/2024, 2:22:16 PM] [TplinkSmarthome] Initializing TplinkSmarthome platform...
[1/24/2024, 2:22:16 PM] [TplinkSmarthome] homebridge-tplink-smarthome v8.0.2, node v18.13.0, homebridge v1.7.0, api v2.7
[1/24/2024, 2:25:04 PM] [TplinkSmarthome] Initializing TplinkSmarthome platform...
[1/24/2024, 2:25:04 PM] [TplinkSmarthome] homebridge-tplink-smarthome v8.0.2, node v18.13.0, homebridge v1.7.0, api v2.7
[1/24/2024, 2:32:36 PM] [TplinkSmarthome] Initializing TplinkSmarthome platform...
[1/24/2024, 2:32:36 PM] [TplinkSmarthome] homebridge-tplink-smarthome v8.0.2, node v18.13.0, homebridge v1.7.0, api v2.7

Configuration

{
    "name": "TplinkSmarthome",
    "addCustomCharacteristics": true,
    "deviceTypes": [
        "plug",
        "bulb"
    ],
    "devicesUseDiscoveryPort": false,
    "platform": "TplinkSmarthome"
}
qthatswho commented 5 months ago

I'm having similar issues with some (but not all) of my HS200 switches. Prior to triaging this issue, I observed the accessory in Home app, and it showed as reachable and interactive, but did not actually operate the switch. Worked fine in Kasa app.

I've since tried every manner of removing and re-adding the switch, including completely removing and resetting the switch in Kasa app. The Kasa app operates the switch fine, so it's not a switch-side network issue. I tried removing the cached accessory, and now HomeBridge just refuses to detect the switch at all (along with another which I also removed the cached accessory for). This is with plugin v8.0.2 on a Synology Homebridge 1.7.0 install.

UPDATE: I downgraded to the latest 7.x version to see if it improved things. This created other issues (switches detected as plugs), however, it did detect the switches. I was then able to upgrade back to 8.0.2 and the switches were working again. We'll see if they stay that way.

goolskyjohn commented 5 months ago

@qthatswho That was my exact experience as well. I have since been able to get the switch re-added by tinkering with the settings of the plugin in Homebridge. I'm happy to post my updated config if you'd like to take a look.