plasticrake / homebridge-tplink-smarthome

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

Duplicate Switch Devices in v8 #322

Closed threeonparfive closed 5 months ago

threeonparfive commented 7 months ago

Is there an existing issue for this?

What happened?

I have HS200s and HS220s, all of which have worked perfectly for a couple of years now, until upgrading to v8 today. Now, Homebridge and HomeKit see duplicate devices for every switch. For each switch, I see a "switch" and an "outlet" in both Homebridge and HomeKit, both with the same name, but none of the switches work. They only function if you toggle the "outlet" instance. This has broken many automations since they referenced the actual switch.

What, if anything, has recently changed?

v8

Version

8

Node Version

v18.15.0

Homebridge Version

1.7.0

Which OS/Platform?

Other (Please describe)

Relevant log output

Running native package on Synology NAS

Configuration

"name": "TplinkSmarthome",
            "addCustomCharacteristics": false,
            "deviceTypes": [
                "plug",
                "bulb"
            ],
            "platform": "TplinkSmarthome"
timleeds15 commented 7 months ago

temporary fix is to revert back to 7.0.1. The dev is aware of the issue

threeonparfive commented 7 months ago

temporary fix is to revert back to 7.0.1. The dev is aware of the issue

I tried that but it didn't solve the issue...the mess of duplicates was still there. I have ended up completely blowing the plugin and all 33 Kasa devices away, reinstalled the plugin (decided to try 8.0.1), and all seems well, for now at least.

plasticrake commented 7 months ago

Issue with brightness and on/off fixed in d267e40ee0ab11f6182269dea16d5a0a2b328063 deff0549eb7c9d419a259257aa053f800e57b24a homebridge-tplink-smarthome@8.0.1 tracked at #320

I'll track the issue with duplicate devices here. Can someone with the issue please provide their cachedAccessories file?

pharrett commented 7 months ago

I was able to get around this for now by removing the switches from the accessory cache and restarting Homebridge. This removed the duplicates but shows them as outlets instead of switches. I currently just have two HS210 and one HS200. I changed them to switches in the Home app and they working again.

xstefanx commented 7 months ago

Started having this issue today. Here's my cachedAccessories file. .cachedAccessories.txt

Let me know if I can provide any further info. Willing to help test.

rbclark commented 7 months ago

Just ran into this as well, reverting to 7.0.1 and restarting homebridge has fixed the problem for me for now.

xstefanx commented 7 months ago

I had tried going to 7.1.0-next.0 and the issue was still present. Back to 7.0.1 fixed the issue for now. Homebridge itself was labeling these devices as outlets and HomeKit showed them as a group where the switch did nothing and the outlet controlled the switch

salmundo11 commented 7 months ago

I'm seeing the same issue. Will revert to v7.x

peck4919 commented 7 months ago

Same here. Reverted to 7.0.1 to resolve

TassiRob commented 7 months ago

Also rolled back to 7.0.1 Tried deleting 7.0.1 plugin, removed the accessory folder and installed 8.0.1 in a child bridge. Attempt to add to HomeKit unsuccessful. Getting this message in logs after each plug was added:- Removing stale Characteristic: [Outlet.Brightness]

wuddup commented 7 months ago

Here's another cachedAccessories sample. The Hot Water Pump device is the only one showing up as a duplicate switch/outlet (so far?)

cachedAccessories.txt

TinyMito commented 7 months ago

My HS210 appears to have a Light and an Outlet switch. The Light used to work, now it is not working and only the Outlet switch type works.

On my Homekit, it shows duplicated for the same HS210 switch.

Reverted to 7.0.1, fixed the issue.

MrSco commented 7 months ago

v8.0.1 duplicates my outlets also. watching this thread for when there is a fix. until then v7.0.1 is working ok

cefoster0 commented 7 months ago

Same, reverted back to 7.0.1. My cachedAccessories file is multiple megabytes, let m know if I should just pull out the kasa items.

shugass commented 6 months ago

Perhaps another clue for this one... when using any version above 7.0.1.... Along with the duplicates is another issue I just noticed.... Using "Controller for Homekit" app on iOS, previously I was able to set light dimmer levels without toggling the current state of the light, by adjusting brightness but not adjusting power on state. This is the holy grail of smart dimmer switches based on some research on the web discussions, since it can't be done natively with the kasa app or homekit. When updating to anything above 7.0.1 it is no longer possible to adjust brightness level without turning the light on. When I revert back to 7.0.1 it is once again possible to set brightness level without changing the current power state of the dimmer. Thought this may be a clue or help figure out what is going on. At first I thought it was the latest AppleTV update, but it is in fact the plugin version causing the change in behaviour. Thanks!

brsexton commented 6 months ago

I am seeing the same issue with my light switches when updating to version 8+. Reverting back to 7.0.1 corrected the problem.

afunix commented 6 months ago

Still reproducible with v8.0.1

kilakev commented 5 months ago

still seeing this issue. I see there's a pull request with a fix. How can we get this merged in?

shugass commented 5 months ago

There is still strange behaviour present with current version 8.02 that started after version 7.0.1 and has been present since. When setting "only" brightness level, all versions after 7.0.1 turn the lights on when setting brightness. In 7.0.1 and previous you were able to set brightness without changing the current power state of the dimmer switch. I am doing this via "Controller for Homekit" as it is not possible to set brightness independant of power state using the stock apple "Home" app.