I am not exactly sure where this one belongs so I took a shot.
Background: I have a range of tablets that I mount to walls to use as control points for my system. Everything from iPads to Samsung Tab's, most of which are several generations old and not useful for anything else. Even the oldest devices work fine since it doesn't take much muscle to display a relatively static webpage, which is essentially all they are doing. I usually use ActionTiles or the built-in web GUI, but that part is irrelevant. The devices are always on and always plugged in.
Issue: Over time, the batteries start to swell, sometimes to the point of causing the screen to bulge or pop out of the frame. This is not entirely unexpected, since I leave them turned on and charging 24/7, which is torture for a lithium-ion battery. I really don't care about the battery life since they are always plugged in, but I find myself changing batteries just because the swollen battery is breaking the device. How can I prevent this from happening?
I thought about putting a simple timer on the charger. My thought is that if I let the device run on battery for an hour a day, it might not swell. I don't know if that is true and I am just theorizing. Would love to hear what others have done to tackle this issue.
For your Android tablets, the Tasker app ($4) & the cheapest smart plug you can find will solve your problem. In Tasker, you set a trigger when battery of tablet reaches 100% (or 90% or 80%), turn off plug using an HTTP Request to an Endpoint in Rule Machine or Maker API. Then, setup another trigger for low battery (30%, 20%, whatever) that sends an HTTP request to turn on.
I am not familiar with iAnything but I believe its Shortcuts can do similar to Tasker now.
EDIT: Bonus if you have a motion sensor nearby... Motion can trigger the plug to turn off then on or on then off and that typically turns the screen on for an Android.
I use fully kiosk browser on my android tablets. Using the driver to connect to fkb will bring in battery % into hubitat. I then use rule machine to toggle a sonoff device which powers each tablet.
My rule is to check 1x per hour and then turn off the sonoff if the battery > 90% or turn on the sonoff if the battery is < 20%.
This seems to work well enough. I did have some battery swelling issues on some old phones I use in the bathrooms for a time/weather display. Havnt set them up with a timer for power, but 1x per month ill pull the power and let them drain to 0 before plugging back in. Seems to get a little more life out of the battery.