Skip to content
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

Reset consumables #45

Open
paskovitch opened this issue May 5, 2022 · 4 comments
Open

Reset consumables #45

paskovitch opened this issue May 5, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@paskovitch
Copy link

What is the input node if I want to reset the main_brush_work_time?

@paskovitch paskovitch added the bug Something isn't working label May 5, 2022
@andreypopov
Copy link
Owner

I don't know, I use MiHome app

@paskovitch
Copy link
Author

My goal is to completely ignore MiHome app.

@Hoeby
Copy link
Contributor

Hoeby commented Oct 15, 2022

The default "Reset consumables" didn't work for me.
It sends the message with ack, but nothing happend.
But i got it working by modifying the code a little (1 setting in de node)

I went to folder:
nodered/data/node_modules/node-red-contrib-miio-roborock/lib/

In the folder is this file, open it to edit:
miio-roborock-vocabulary.js

Go to Line211, there is this code line:
reset_consumable: {name:"Reset consumables", link:"https://github.com/marcelrv/XiaomiRobotVacuumProtocol/blob/master/consumable.md", args:false},

Change the args from false to true
reset_consumable: {name:"Reset consumables", link:"https://github.com/marcelrv/XiaomiRobotVacuumProtocol/blob/master/consumable.md", args:true},

Save the file.
Restart nodered

When you now open the "command node" and choose for "reset consumables" there is now the option to add "payload"
The payload needs to be added to reset the consumables. Payload has to be a string

What to fill in as payload

  • for resetting main brush, payload = main_brush_work_time
  • for resetting side brush, payload = side_brush_work_time
  • for resetting filter, payload = filter_work_time
  • for resetting sensor, payload = sensor_dirty_time

When you want to reset all 4 consumables. You need 4 separate "command nodes", each consumables has it's own node
I haven't got it to work with in 1 node. For me the 4 nodes works, i am happy

Tested it an looked in nodered to the consumables value when doing "get consumables status". These went to 0.
Looked in de MiHome app, the counters went back to 100%

I can't do a pull-request. I am not that good with github.
But i hope the developer can have a look at it and change it in the code

@Hoeby
Copy link
Contributor

Hoeby commented Oct 15, 2022

Figured it out to make a pull request, and made the pull request.
It is up to Andreypopov to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants