OpenWonderLabs / homebridge-switchbot

The Homebridge SwitchBot plugin allows you to access your SwitchBot Device(s) from HomeKit. Homebridge.
https://openwonderlabs.github.io/homebridge-switchbot/
ISC License
242 stars 52 forks source link

Feature Request: Switchbot K10+ Pro #1069

Open NorbertM21 opened 2 weeks ago

NorbertM21 commented 2 weeks ago

Problem

New Device K10+ Pro, so far is not supported:

Solution

device: {"deviceId":"360TY420801009805","deviceName":"Bot","deviceType":"K10+ Pro","enableCloudService":true,"hubDeviceId":""}

Alternatives

No response

Additional context

No response

donavanbecker commented 2 weeks ago

Should work with v4.0.0

NorbertM21 commented 2 weeks ago

Thanks for your quick response, but:

Device: undefined with Device Type: undefined, is currently not supported. Submit Feature Requests Here: https://tinyurl.com/SwitchBotFeatureRequest, device: {"configDeviceName":"SwitchBot","deviceId":"EC:31:4A:32:2D:8A","configDeviceType":"K10+ Pro","connectionType":"OpenAPI","scanDuration":2,"customBLEaddress":"B0:E9:FE:50:8B:B1"}

And - the tinyurl does not work.

donavanbecker commented 2 weeks ago

Did you set the device in your config?

Also your deviceId has : in it. Take that out of your config.

NorbertM21 commented 2 weeks ago

Sorry - i did copy&paste from the App with ":" But changing this, it still doesn't work.

Device: undefined with Device Type: undefined, is currently not supported. Submit Feature Requests Here: https://tinyurl.com/SwitchBotFeatureRequest, device: {"configDeviceName":"SwitchBot","deviceId":"EC314A322D8A","configDeviceType":"K10+ Pro","connectionType":"OpenAPI","scanDuration":2,"enableCloudService":true,"hubDeviceId":""}
{
  “options”: {
    “devices”: [
      {
        “configDeviceName”: “SwitchBot”,
        “deviceId”: “EC314A322D8A”,
        “configDeviceType”: “K10+ Pro”,
        “connectionType”: “OpenAPI”,
        “scanDuration”: 2,
        “enableCloudService”: true,
        “hubDeviceId”: “”
      }
    ],
    “BLE”: false,
    “discoverBLE”: false
  }
}
donavanbecker commented 2 weeks ago

Can you please remove the device from your config, turn debug mode on under the plugins advanced settings and then post the logs?

NorbertM21 commented 2 weeks ago

OK - I could solve the problem with help of the debug-log. The DeviceID is not, as usual, the MAC of the device, it is a constant number. I did not understand this from the readme.

Thanks for your patience.

donavanbecker commented 2 weeks ago

So it is working now?

NorbertM21 commented 2 weeks ago

Yes, but all K10 running with the same DeviceId - good to have only one. 😊

NorbertM21 commented 2 weeks ago

So, one more time. The switch works correct with on/off starting/stopping the robot. But after stopping (off), the button switches back to on, without starting the robot and it allways shows the wrong state.

The folowing debug-code appears every two minutes and sets the state to on:

[13.10.2024, 09:46:22] [SwitchBot] [DEBUG] Got device status: 360TY420801009805 [13.10.2024, 09:46:22] [SwitchBot] [DEBUG] statusCode: 200 [13.10.2024, 09:46:22] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"ChargeDone","onlineStatus":"online","battery":100},"message":"success"}

donavanbecker commented 2 weeks ago

Can you get me debug logs for Thai.

Then I can potentially get it to set the right status.

NorbertM21 commented 2 weeks ago

Stop in Homekit (Robot in dock, off, but switch was on)

[13.10.2024, 15:50:29] [SwitchBot] [DEBUG] Controlled device: 360TY420801009805 with command: dock and parameter: default
[13.10.2024, 15:50:29] [SwitchBot] [DEBUG] statusCode: 200

Start in Homekit (Robot starts cleaning)

[13.10.2024, 15:50:32] [SwitchBot] [DEBUG] Controlled device: 360TY420801009805 with command: start and parameter: default
[13.10.2024, 15:50:32] [SwitchBot] [DEBUG] statusCode: 200

Stop in Homekit (Robot returns to dock)

[13.10.2024, 15:50:44] [SwitchBot] [DEBUG] Got device status: 360TY420801009805
[13.10.2024, 15:50:44] [SwitchBot] [DEBUG] statusCode: 200
[13.10.2024, 15:50:44] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"Clearing","onlineStatus":"online","battery":99},"message":"success"}
[13.10.2024, 15:50:47] [SwitchBot] [DEBUG] Got device status: 360TY420801009805
[13.10.2024, 15:50:47] [SwitchBot] [DEBUG] statusCode: 200
[13.10.2024, 15:50:47] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"Clearing","onlineStatus":"online","battery":99},"message":"success"}
[13.10.2024, 15:51:06] [SwitchBot] [DEBUG] Controlled device: 360TY420801009805 with command: dock and parameter: default
[13.10.2024, 15:51:06] [SwitchBot] [DEBUG] statusCode: 200

Homekit Switch is on again

[13.10.2024, 15:51:22] [SwitchBot] [DEBUG] Got device status: 360TY420801009805
[13.10.2024, 15:51:22] [SwitchBot] [DEBUG] statusCode: 200
[13.10.2024, 15:51:22] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"GotoChargeBase","onlineStatus":"online","battery":99},"message":"success"}
donavanbecker commented 2 weeks ago

Can you also just getting me all the logs together, there are other logs that the plugin spits out, so I can see how they flow from one to the other?

No need to explain in between because we have the above.

NorbertM21 commented 2 weeks ago

That was the complete Log (start/clean/return to dock). But her again:

[14.10.2024, 16:57:52] [SwitchBot] [DEBUG] Controlled device: 360TY420801009805 with command: dock and parameter: default
[14.10.2024, 16:57:52] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:58:07] [SwitchBot] [DEBUG] Got device status: 360TY420801009805
[14.10.2024, 16:58:07] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:58:07] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"ChargeDone","onlineStatus":"online","battery":100},"message":"success"}
[14.10.2024, 16:58:08] [SwitchBot] [DEBUG] Got device status: 360TY420801009805
[14.10.2024, 16:58:08] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:58:08] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"ChargeDone","onlineStatus":"online","battery":100},"message":"success"}
[14.10.2024, 16:58:10] [SwitchBot] [DEBUG] Controlled device: 360TY420801009805 with command: dock and parameter: default
[14.10.2024, 16:58:10] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:58:15] [SwitchBot] [DEBUG] Controlled device: 360TY420801009805 with command: start and parameter: default
[14.10.2024, 16:58:15] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:58:25] [SwitchBot] [DEBUG] Got device status: 360TY420801009805
[14.10.2024, 16:58:25] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:58:25] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"Clearing","onlineStatus":"online","battery":99},"message":"success"}
[14.10.2024, 16:58:30] [SwitchBot] [DEBUG] Got device status: 360TY420801009805
[14.10.2024, 16:58:30] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:58:30] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"Clearing","onlineStatus":"online","battery":99},"message":"success"}
[14.10.2024, 16:58:46] [SwitchBot] [DEBUG] Controlled device: 360TY420801009805 with command: dock and parameter: default
[14.10.2024, 16:58:46] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:58:54] [Shelly Plus] [Heizung KS] Switch Status(0): off
[14.10.2024, 16:59:01] [SwitchBot] [DEBUG] Got device status: 360TY420801009805
[14.10.2024, 16:59:01] [SwitchBot] [DEBUG] statusCode: 200
[14.10.2024, 16:59:01] [SwitchBot] [DEBUG] response: {"statusCode":100,"body":{"deviceId":"360TY420801009805","deviceType":"K10+ Pro","workingStatus":"GotoChargeBase","onlineStatus":"online","battery":99},"message":"success"}