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

Question: How is the robot vacuum integration supposed to work? #1019

Closed JannThomas closed 1 month ago

JannThomas commented 2 months ago

Describe Your Problem

I would like to understand the intention of the robot vacuum Integration.

Hi,

I am using this Plugin with my K10+ Robot vacuum. I would have assumed the configuration for it to be an on-off switch, where on means clean and off means go to Station. Currently it shows as a dimmable light bulb which always has a state of 100%. I can paste the logs here no problem, but from looking at the code it seems like this is intentional? Maybe I misunderstand how this integration is supposed to work?

Thanks a lot, Jann

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "token": "XYZ",
                "secret": "XYZ",
                "notice": "Keep your Token & Secret a secret!"
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "XYZ",
                        "configDeviceName": "Saugaal",
                        "configDeviceType": "WoSweeperMini",
                        "connectionType": "OpenAPI",
                        "offline": true,
                        "external": false,
                        "logging": "debug"
                    }
                ]
            },
            "platform": "SwitchBot"
        }

Screenshots

No response

Device & Model

K10+

Node.js Version

v20.9.0

NPM Version

10.1.0

Homebridge Version

v1.8.3

Homebridge SwitchBot Plugin Version

v3.7.0

Homebridge Config UI X Plugin Version

No response

Operating System

macOS

donavanbecker commented 2 months ago

I need to look over the code again, I don't have a robot so haven't been able to test it myself. I will take the time soon to get the code updated. I would also accept a PR if you are up to that?

JannThomas commented 2 months ago

Yeah I will take a look in the coming days, just wanted to confirm I don't miss something obvious before diving into that.

JannThomas commented 2 months ago

So, I finally got a look at this today and it turns out the fix is actually really simple, a one liner. Check out #1028 for it.

donavanbecker commented 2 months ago

Merged into beta which will release a new beta with the changes for testing.