octo4a
octo4a copied to clipboard
Expose battery level
Is there a way to expose through API or some script the battery level status so that, maybe with a plugin, being able to show it to the octoprint page, or connect it to the telegram plugin to have an alert when battery is about to run out. I had a problem not so long ago that I forgot to close the webcam view in cura and my phone "died" in the middle of a print.
A part of that now It's almost 6 month since I started using Octo4a with my ender 3 v2 and it's working perfectly so I want to say thank you all for the great work.
solder charge cable to phone
the problem it is not the charging system in this case, I'd like to have the battery level somehow exposed if it's possible. My exemple was only a use case, I know there are some other solutions but it would be nice to see the battery level in octoprint.
solder charge cable to phone
Not everyone has the skills to solder (or the equipment or even the tools to open up the phone). :-)
I am eagerly waiting for this as well, The camera server seems to be the downfall, long prints almost always fail due to dead battery.
You cant use this and rely only on a phone battery, its useless and impractical. You must either make or buy Y cable that will allow you to charge phone at the same time or soldier buck converter to a battery terminals. Y cable doesn't work with all phones but if it does its the most easiest solution
I know I wrote that my phone is always in charge but the webcam sometimes uses more energy that the charger can give ... And, as i wrote, it's also a supplementary feature that can be used just for showing the charge, mine was only a use case.
The Y cable isn't supported on many phones. Thankfully it is on mine but I had to install many many kernels until I found a setup that allowed it. It's a real problem, not one I face but never the less i do understand what OP is feeling.
I've hacked together a little plugin that exposes the battery level of the phone and can send telegram messages when battery is running low. Have a look here
https://github.com/tobiasgraf/OctoPrint-Octo4a_battery
@tobiasgraf your plugin is amazing thank you! that's exactly what I needed. I will close this Issue.
Anyone know the battery file path for Samsung Galaxy S5?
I used ADB to browse to the file and it's actually there and has the battery percent. However still shows INVALID PATH.
@davidalim can you please open a issue in my repo with as much information as possible? Like android version, are you rooted, file permissions and stuff like that. I'm guessing it is some sort of permission problem.
Yes totally. Didn't know much about these files so assumed it was just my phone or something :)
I'm running this on a Samsung Galaxy S5 with LineageOS 18.1 (Android 11). Not rooted.
I did just install on my Galaxy S4 (running Pixel Experience 9) and it works! So personally no longer an urgent issue.