plasticrake / homebridge-tplink-smarthome

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

8.0.1: "Removing stale Characteristics" warnings #325

Open jostrasser opened 7 months ago

jostrasser commented 7 months ago

Is there an existing issue for this?

What happened?

After updating the plugin to 8.0.1, Homebridge did not start. I removed my HS110 plugs from the cache on Homebridge, Homebridge came up afterwards.

Now I can see the following warnings, see logs. I added the "switch models" to the json, but this did not solved the issue.

What, if anything, has recently changed?

Plugin version update to 8.0.1 Updated node from 20.9.0 to 20.10.0

Version

8.0.1

Node Version

20.10.0

Homebridge Version

1.7.0

Which OS/Platform?

Linux

Relevant log output

Bridge broken before removing the cached devices:

Log:

[23/11/2023, 12:47:46] TypeError: Cannot read properties of undefined (reading 'getCharacteristic')
    at Accessory._sideloadServices (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js:1800:13)
    at Function.Accessory.deserialize (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:2188:15)
    at Function.deserialize (/var/lib/homebridge/node_modules/homebridge/src/platformAccessory.ts:172:33)
    at /var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:240:34
    at Array.map (<anonymous>)
    at BridgeService.loadCachedPlatformAccessoriesFromDisk (/var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:239:58)
    at Server.start (/var/lib/homebridge/node_modules/homebridge/src/server.ts:170:5)
[23/11/2023, 12:47:46] Got SIGTERM, shutting down Homebridge...
[23/11/2023, 12:47:46] AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet!
    at Bridge.Accessory.setupURI (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:994:11)
    at Server.setServerStatus (/var/lib/homebridge/node_modules/homebridge/src/server.ts:155:45)
    at Server.teardown (/var/lib/homebridge/node_modules/homebridge/src/server.ts:199:10)
    at signalHandler (/var/lib/homebridge/node_modules/homebridge/src/cli.ts:93:12)
    at process.emit (node:events:514:28)
    at process.emit (/var/lib/homebridge/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)
[23/11/2023, 12:47:51] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null

Now, after removing the cached devices:

[23/11/2023, 12:58:36] [TplinkSmarthome] Device First Online: [TPLink-Badezimmer] plug [80063AD2B22A28EF9F3A68643B6E8ED21D920223] 192.168.20.212 9999
[23/11/2023, 12:58:36] [TplinkSmarthome] Adding: [TPLink-Badezimmer] plug [80063AD2B22A28EF9F3A68643B6E8ED21D920223]
[23/11/2023, 12:58:36] [TplinkSmarthome] [TPLink-Badezimmer] Removing stale Characteristic: [Outlet.Brightness] uuid:[00000008-0000-1000-8000-0026BB765291]
[23/11/2023, 12:58:36] [TplinkSmarthome] Device First Online: [TPLink-Wohnzimmer] plug [8006FED22EE15717FC3D7907C85E3F091D8084C8] 192.168.20.211 9999
[23/11/2023, 12:58:36] [TplinkSmarthome] Adding: [TPLink-Wohnzimmer] plug [8006FED22EE15717FC3D7907C85E3F091D8084C8]
[23/11/2023, 12:58:36] [TplinkSmarthome] [TPLink-Wohnzimmer] Removing stale Characteristic: [Outlet.Brightness] uuid:[00000008-0000-1000-8000-0026BB765291]

Configuration

{
    "name": "TplinkSmarthome",
    "addCustomCharacteristics": true,
    "switchModels": [
        "HS110"
    ],
    "deviceTypes": [
        "plug",
        "bulb"
    ],
    "macAddresses": [
        "84:D8:1B:20:A0:E5",
        "84:D8:1B:C1:F6:31"
    ],
    "devices": [
        {
            "host": "192.168.20.211"
        },
        {
            "host": "192.168.20.212"
        }
    ],
    "devicesUseDiscoveryPort": false,
    "platform": "TplinkSmarthome"
}
salmundo11 commented 7 months ago

Same here with 8.0.1:

22/11/2023, 17:29:19] [TplinkSmarthome] [Ichabod] Removing stale Characteristic: [Outlet.Brightness] uuid:[00000008-0000-1000-8000-0026BB765291]
[22/11/2023, 17:29:19] [TplinkSmarthome] Device First Online: [Holiday 3] plug [8006AEA93AA7186F440B69CE9D32ED26201AFD8C] 192.168.7.158 9999
[22/11/2023, 17:29:19] [TplinkSmarthome] Adding: [Holiday 3] plug [8006AEA93AA7186F440B69CE9D32ED26201AFD8C]
[22/11/2023, 17:29:20] [TplinkSmarthome] [Holiday 3] Removing stale Characteristic: [Outlet.Brightness] uuid:[00000008-0000-1000-8000-0026BB765291]
[22/11/2023, 17:29:20] [TplinkSmarthome] Device First Online: [Spotlight ] plug [800610D2C6346BA47B4FAB20CE0B5A7C1FC43D05] 192.168.7.130 9999
[22/11/2023, 17:29:20] [TplinkSmarthome] Adding: [Spotlight ] plug [800610D2C6346BA47B4FAB20CE0B5A7C1FC43D05]
[22/11/2023, 17:29:20] [TplinkSmarthome] Device First Online: [Shed] plug [8006246EF1A93AF7475B4FBE53A42BB51EA5F8BA] 192.168.7.204 9999
[22/11/2023, 17:29:20] [TplinkSmarthome] Adding: [Shed] plug [8006246EF1A93AF7475B4FBE53A42BB51EA5F8BA]
[22/11/2023, 17:29:20] [TplinkSmarthome] [Shed] Removing stale Characteristic: [Outlet.Brightness] uuid:[00000008-0000-1000-800

Configuration:

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

I see the same "Removing stale Characteristic" warnings for everything that doesn't have brightness control, but all my outlets and switches are working properly (including dimmers). I didn't update from 7.x until 8.0.1, and I don't have any HS110 outlets. I do have HS103 plugs, no issues with those.

Vader20 commented 6 months ago

I see the same. Reverted back to 7.X.

plasticrake commented 5 months ago

HS110 is a plug, not a switch. You do not want to configure it as a switch

BBfly1 commented 4 months ago

I see the same "Removing stale Characteristic" warnings. I'm on v8.0.2