plasticrake / homebridge-tplink-smarthome

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

HS220 won’t get added as a dimmer #186

Closed sskaz closed 3 years ago

sskaz commented 3 years ago

Expected Behavior

HS220 dimmer switch should appear in HomeKit as a dimmer with brightness slider control instead of a standard toggle switch.

Current Behavior

Appears as a standard on/off toggle. I updated to v6.3.0 and now my HB log is full of this, 4 times every 10 seconds: [3/15/2021, 6:33:03 PM] [TP Link] [HS220's name] fireCharacteristicUpdateCallback [Brightness]: Unable to call updateCallback

Steps to Reproduce (for bugs)

I added this plugin to HomeKit and Homebridge months ago for my HS210 (which works great, thank you!). I added the HS220 through the Kasa app like normal (stopping before enabling the remote access steps) and to my HB config. In the Home app, it appears as a regular switch.

I've removed it from the Kasa app, removed it from cached accessories, restarted the Homebridge container, and re-added it, and the same result.

Versions

Configuration

{
    "name": "TP Link",
    "addCustomCharacteristics": false,
    "switchModels": [
        "HS210",
        "HS220"
    ],
    "pollingInterval": 10,
    "deviceTypes": [
        "plug",
        "bulb"
    ],
    "devices": [
        {
            "host": "[snip - HS210's IP]"
        },
        {
            "host": "[snip - HS220's IP]"
        }
    ],
    "timeout": 15,
    "platform": "TplinkSmarthome"
}

Homebridge Log / Command Output

[3/15/2021, 6:42:36 PM] [HB Supervisor] Starting Homebridge with extra flags: -P /homebridge/node_modules
[3/15/2021, 6:42:36 PM] [HB Supervisor] Started Homebridge v1.3.3 with PID: 8508
Initializing HAP-NodeJS v0.9.3...
[3/15/2021, 6:42:37 PM] Loaded config.json with 0 accessories and 4 platforms.
[3/15/2021, 6:42:37 PM] Loaded 2 cached accessories from cachedAccessories.
[3/15/2021, 6:42:37 PM] ---
[3/15/2021, 6:42:38 PM] Loaded plugin: homebridge-dummy@0.5.0
[3/15/2021, 6:42:38 PM] Registering accessory 'homebridge-dummy.DummySwitch'
[3/15/2021, 6:42:38 PM] ---
[3/15/2021, 6:42:39 PM] Loaded plugin: homebridge-tplink-smarthome@6.3.0
[3/15/2021, 6:42:39 PM] Registering platform 'homebridge-tplink-smarthome.TplinkSmarthome'
[3/15/2021, 6:42:39 PM] ---
[3/15/2021, 6:42:40 PM] Loaded plugin: homebridge-config-ui-x@4.40.0
[3/15/2021, 6:42:40 PM] Registering platform 'homebridge-config-ui-x.config'
[3/15/2021, 6:42:40 PM] ---
[3/15/2021, 6:42:40 PM] Loading 4 platforms...
[3/15/2021, 6:42:40 PM] [Config] Initializing config platform...
[3/15/2021, 6:42:40 PM] [Config] Running in Service Mode
[ snip ]
[3/15/2021, 6:42:40 PM] [TP Link] Initializing TplinkSmarthome platform...
[3/15/2021, 6:42:40 PM] [TP Link] homebridge-tplink-smarthome v6.3.0, node v12.18.0, homebridge v1.3.3, api v2.7
[ snip ]
[3/15/2021, 6:42:40 PM] [TP Link] Configuring cached accessory: [[HS210's name]] UUID: f477d857-f554-4d0b-bdeb-d19702300e16 deviceId: 80064C87859BD95507F34E8E627B27411A53BC4F 
[3/15/2021, 6:42:40 PM] [TP Link] Configuring cached accessory: [TP-LINK_Smart Dimmer_222A] UUID: 37ebebb2-1382-4976-8466-e27c35435497 deviceId: 8006003DCB349120736F38941356699B1D94823A 

Preparing Advertiser for 'Homebridge 559C' using ciao backend!
[ snip ]
Starting to advertise 'Homebridge 559C' using ciao backend!
[3/15/2021, 6:42:40 PM] Homebridge v1.3.3 (Homebridge) is running on port 53794.
[3/15/2021, 6:42:40 PM] [TP Link] New Device Online: [[HS220's name]] plug [8006003DCB349120736F38941356699B1D94823A] [220's IP] 9999
[3/15/2021, 6:42:40 PM] [TP Link] Adding: [[HS220's name]] plug [8006003DCB349120736F38941356699B1D94823A]
[3/15/2021, 6:42:40 PM] [TP Link] New Device Online: [HS210] plug [80064C87859BD95507F34E8E627B27411A53BC4F] [HS210's IP] 9999
[3/15/2021, 6:42:40 PM] [TP Link] Adding: [HS210] plug [80064C87859BD95507F34E8E627B27411A53BC4F]
[3/15/2021, 6:42:40 PM] [TP Link] [[HS220's name]] fireCharacteristicUpdateCallback [Brightness]: Unable to call updateCallback
plasticrake commented 3 years ago

Try removing HS220 from your switchModels config

sskaz commented 3 years ago

That did it! Removed that model, restarted HB, and this came up in the logs. Thank you!

[3/16/2021, 11:04:46 AM] [TP Link] [Dimmer] Correcting Accessory Category from: SWITCH to: LIGHTBULB
[3/16/2021, 11:04:46 AM] [TP Link] [Dimmer] Removing stale Service: [Switch] uuid:[00000049-0000-1000-8000-0026BB765291] subtype:[]
kevinbarnettjr commented 2 years ago

Thanks for the comments. Got my HS220 working by just changing to HS210 in config. 💜