homebridge-tplink-smarthome: Dimmer switch failed to turn off

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

After updating to version 8.0.0, all dimmer failed to turn the light off. Exception as follow: Unhandled error thrown inside write handler for characteristic: err_code not zero response: {“err_code”:-3,“err_msg”:“invalid argument”} command: {“smartlife.iot.dimmer”:{“set_brightness”:{“brightness”:0}}}

Dimmer can be turned off normally via Kasa or GH.

What, if anything, has recently changed?

Upgraded to version 8.0.0

Version

8.0.0

Node Version

16.20.2

Homebridge Version

1.6.0

Which OS/Platform?

macOS

Relevant log output

Unhandled error thrown inside write handler for characteristic: err_code not zero response: {"err_code":-3,"err_msg":"invalid argument"} command: {"smartlife.iot.dimmer":{"set_brightness":{"brightness":0}}}

Configuration

{
    "platform": "TplinkSmarthome",
    "name": "TplinkSmarthome",
    "deviceTypes": [
        "plug"
    ]
}

About this issue

  • Original URL
  • State: open
  • Created 7 months ago
  • Comments: 27 (10 by maintainers)

Most upvoted comments

I’ve been asking for someone to provide me their cachedAccessories who is currently experiencing duplicate devices but so far I have not had any takers. I can’t really help without it. It appears that deleting this file will “fix” the issue but I’d like to find out why this happened and I can update the code to fix itself without requiring the file to be deleted or modified.

@plasticrake I just ran into this issue coincidentally after installing my first outdoor dimmer (KP405) and the prerelease version fixed the issue I had where in v8.0.0 the device was not turning on at all. I don’t have any duplicate device issues that everyone else seems to have so I will say that your fix in this version has addressed a regression, at least in my case, with dimmers that you set out to fix! 🙌 I’ve been using this plugin for a long time and I appreciated the work you’ve put into this over the years 🦾