jghaanstra / com.xiaomi-miio

Homey app to control Mi Home devices that implement the miIO protocol and Xiaomi gateway child devices
GNU General Public License v3.0
456 stars 85 forks source link

Incorrect fan speed values for Roborock S5 #253

Open hubocan opened 11 months ago

hubocan commented 11 months ago

Hi, The fan speed values for Roborock S5 (roborock.vacuum.s5) are actually incorrectly set to different values.

Id | Value    | Xiaomi Home value (real)
1  | Quiet    | Silent
2  | Standard | Balanced
3  | Medium   | Turbo
4  | Turbo    | Max
5  | Max      | Gentle

In fact, Gentle should be something like 0. It can be used for mopping without vacuuming (fan is off). Otherwise, it is working fine. Just the list of values is incorrect/incorrectly mapped.

jghaanstra commented 11 months ago

Please supply correct details based on these specs: https://home.miot-spec.com/spec/roborock.vacuum.s5

It's currently implemented lik this:

1: 101: Quiet 2: 102: Standard 3: 103: Medium 4: 104: Turbo 5: 105: Max

I wont change the names, because they keep changing them on every new model and I cant create a custom capability for each model.

hubocan commented 11 months ago

Those specs are outdated or incomplete as it misses the Gentle value. S5 has no Medium value and that is breaking it. I understand that you are trying to use one common list, but your list is missing Gentle (Off) value representation.

I think it would be the best to have fan speeds related to a model. Otherwise, I see the only solution to add one more value and duplicate some values.

For example:

Id | Spec | Setting  | S5 Setting
 0 |  105 | Gentle   | Gentle
 1 |  101 | Quiet    | Silent
 2 |  102 | Standard | Balanced
 3 |  102 | Medium   | Balanced
 4 |  103 | Turbo    | Turbo
 5 |  104 | Max      | Max
jghaanstra commented 11 months ago

I think it would be the best to have fan speeds related to a model.

Feel free to submit a PR where you create a custom capability to match each model. It wont be added by me as I have beter things to do with my life.

Otherwise, I see the only solution to add one more value and duplicate some values.

That would be the best solution for you. I have to consider about 12000 other users that also only think from their own perspective. I'll keep this request open to see if more users are missing this.

hubocan commented 11 months ago

I can see your point.

However, I am curious. You think it is fine/better how it is behaving right now? -Right now, if you set S5 to Max, in real it is set to Gentle and that means, that instead using maximum power, it just drives around without any power. Not vacuuming at all.

jghaanstra commented 11 months ago

For now it's better for most users yes as I'm unsure other models have this gentle option. Changing it will affect a lot of users. I understand you only look at your own use case but I have to support 12000+ users. And I need to do all that in my free time without getting much appreciation for it anyway. So yes, I cut corners.

Just create your flows to use the right option even though the text doesn't match.