hsakoh/switchbot-mqtt

Request to add K10+ vaccuum

b-0s opened this issue ยท 7 comments

b-0s commented

Hello,

Great job done here. A bit scared at first but very easy to install as soon as you understand that you have to install dotnet on your PC before compiling by running the powershell script.
Would you be kind to add the K10+ vaccum model.
I know that it is not referenced yet inthe v1.1 API but it is basically based on the S1 for the commands.
As for the deviceType, it is returnedd simply as K10+.

I have tested it by calling the rest method on thev1.1 API and it works as a charm.

Referring to #10, setting EnforceDeviceTypes may allow the K10+ to be recognized as an S1:

EnforceDeviceTypes:
  - DeviceId: <K10+ DeviceId>
    DeviceType: Robot Vacuum Cleaner S1

In this state, could you please verify if various commands and webhooks operate correctly?

I don't know the K10+ of commands and data items, but if S10 and K10+ have the same, try to set Robot Vacuum Cleaner S10.

The add-on will not be officially supported until the official API specification is released.

b-0s commented

Indeed. It works. Wonderful.
Very good job.
But for your information, S1 is much more suited than s10.
With S10, any command that you will try return this message:
{"statusCode":190,"body":{},"message":"Cannot read properties of undefined (reading 'statusCode')"}

S1 is the good to go for the K10+

I have just released version v1.0.24.

The updated API specification adds support for two devices
Mini Robot Vacuum Cleaner K10+
Mini Robot Vacuum Cleaner K10+ Pro
If you have been using the EnforceDeviceType to make the K10+ act as an S1, you can remove it. (In that case, I recommend that you first remove the MQTT device, then change the settings and restart the add-on.)

b-0s commented

Thanks hsakoh. Great job and work. Keep it up.

Works flawlessly after I followed your instruction.

I guess this issue can be closed.

For the new release. I have the K10+ Pro.
Device type is : K10+ Pro
Thanks !!!

@zatoufly
Thank you for the feedback.
As expected, there was indeed a space between "Plus" and "Pro" according to the specifications. Got it!