-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Set charging limits to preserve battery life. #393
Comments
Feel free to patch low level firmware and provide your findings to vacuumz image builder. |
Ah I see. It was possible to implement this on my laptop rather easily via apt package, but I just read it's only working on thinkpads. |
If you use Home Assistant or something else, you could use a smart Plug and write a Script to Turn Off electricity If the Vacuum cleaner reaches 85% of battery :) |
This could be helpfull. Did you already made a script and care to share? |
I'm not 100% sure, but I think the linux system will shut down if it isn't connected to a power source for a while. It could be possible that you'll have to start the robot manually then. So then there's also no resuming when reaching 40% of capacity... |
In my experience, the S5 tends to turn off and doesn't turn back on if it's off the charger for more than ~48 hours. I suspect that the battery gets drained while idle so cycling the charger on and off could cause the battery to wear out faster. |
I think the robo speaks mqtt. I could set up a server on my openwrt router I guess. Maybe the server can tell the robot to move an inch away from the charger after it has charged up to 80%. I would turn off the charger at night when I go to bed and back on, whenever I power on my desktop pc. The bot uses around 30% of battery to clean my flat it seems. So it would charge from around 50% to 80%. That seems fairly reasonable. Another way might be even better: Use the don't return to dock after cleaning option from the webui. Just have it move to a spot close to the dock. Then send it to the charger, once it reaches 40% battery. Send it away at 85%. I've never used mqtt but that should be doable, right? The charging unit could then be powered by a "smart" switch, one of those old school ones you set via rotary to switch on during certain times of the day/week. A real smart switch just consumes to much power imho, I've got one from china that consumes around 1w on idle, it's probably the wifi (and operating system openwrt) that consumes power. Edit: I think it should work with the miIO Device Library (https://github.com/aholstenson/miio). |
I created a mqtt sensor in the configuration.yaml in homeassistant for the vacuum to get the battery percentage: `sensor:
and then I created a node red automation with an timestamp: you could change the state of the battery_status to 85 and you are good to go ;) |
I use an Xiaomi Vacuum Gen1. mine charges the battery to 100%, then the vacuum dock electricity will turn off and vacuum goes to standby. next time I start it, i have to turn on the vacuum dock electricity, then the vacuum starts automatically. after one week the vacuum has an battery life about 75% because it is in stanby, when the dock is turned off. |
Cool, cheers for the help! -> connect to your robot via webapp -> zones -> goto locations -> choose a spot a few inches away from the charger, call it: No charging -> connect roborock & mqtt dash to the broker -> On dash subscribe to the topic: valetudo/rockrobo/state -> on receive enter the following code:
I edited the code above. It should now work as expexted. (I added conditions so the robo does not try to move to the charger when it's already docked. Maybe I'll connect an intelligent plug to the charger at some point, but I think I can turn the charger off and on by hand for now. |
@beatstick Nice! :) but I would turn off the charger if possible, mine needs 12w of electricity also when the vacuum is not docked.. |
Oh, interesting. I just measured mine. It only seems to consume 0.3 Watts, (that's less than my intelligent plug which takes around 1w). So it should be all right if I forget to turn it off after cleaning and switch it off in the evening. Maybe you should measure yours again. 12w on idle seems very steep. |
Hi,
would it be possible to set charging limits to preserve the life of the battery?
I know there must be a setting already somewhere, as the bot returns to charge, when the battery hits 20%.
I'd like mine to return at 30%.
Also as it will always be plugged into the charger, I'd like to charge up to 85%, then stop charging until the battery has dropped to 40% and than resume charging.
That way the batteries will last a couple of years longer, or so I heard.
Maybe we could set this somewhere on ubuntu. A gui would be nice to have but it's not strictly neccessary as it would be good enough to set this up once vie ssh I think.
The text was updated successfully, but these errors were encountered: