-
-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roborock/Capability Carpet Mode #661
Conversation
#656 - modifications
As mentioned in the Telegram group, I'd like to omit the additional parameters and instead just have a simple boolean toggle like the |
I tested the capability of Roborock to handle only the enabled status, issue is that set_carpet_mode requires the other parameters as if enabled is the only parameter toggled, the other parameters such as stall time and current low / high / integral are set to 0 when not supplied.
If we still need to include get as part of the set process why not have the capability to see and potentially edit these parameters? |
I'd simply hard-code the default values for set_carpet_mode since they're default for a reason
Because it's a generic capability + capabilityRouter and it makes no sense for it to take roborock-specific arguments. The overall goal of the rewrite was to be less vendor-specific which also means that not everything that would in theory be possible will also be implemented in Valetudo. If there are vendor-specific configuration options, reasonable defaults which fit 80% of the users should be used.
It also already supports map backup&restore which is very useful for the roborock v1 but doesn't really make sense to implement in Valetudo due to the market having moved forward from that and it being highly unlikely that we'll see non-persistent-map vacuum robots being released in the future |
Don't get me wrong, I have never had a need to customise these parameters so driven to include. If I take the parameters hardcoded in the UI as the defaults, these were different to the parameters that were in my Gen1 out of the box. Perhaps then the best option is to - as part of the Roborock capability - would be to stick with the get / set instead of hardcoding to ensure we aren't changing a value unintentionally. |
Does the firmware reject the command if it is sent without parameters? 🤔 Another approach could be to extend the Capability's contructor to accept the default values for this model similar to this:
and then providing those inside the Vacuum implementation like that Valetudo/lib/robots/dreame/DreameD9ValetudoRobot.js Lines 114 to 134 in 4b3ed97
|
Yes, I'm going down a path similar to what you noted above. Thanks for the pointer. The Roborock API in this instance will actually accept the request if those additional parameters haven't been supplied, which is are then defaulted to 0. Only having a Gen1 and knowing this actually isn't supported I cannot say if this is normal or not, presume it is so we will have to handle it accordingly by requesting the vacuum state, toggling enabled then sending back the modified configuration in full. |
@Hypfer, changes updated. The status of carpet mode isn't emitted in the base Roborock state attributes so functionality reverted back to basis on / off toggle with no entity. Values set at this point from get / set sequence instead of defaults in the code. |
Valetudo/lib/robots/roborock/RoborockValetudoRobot.js Lines 221 to 227 in 4b3ed97
|
Valetudo/lib/robots/roborock/capabilities/RoborockConsumableMonitoringCapability.js Lines 61 to 66 in 4b3ed97
|
Carpet mode capability for Roborock vacuums. Includes