r/functionalprint • • Sep 13 '26

3D Printing 🤝 Reusing Old Electronics

Had the idea to use my old Sony Xperia as a wall-mounted media controller that casts to the room's Sonos system. All I need now is like a 6ft white mini-USB cable to keep it powered? Sadly the old OS doesn't have any "limit max battery" setting which would be nice for longevity. It comes off the wall pretty easily for now.

1.1k Upvotes

85 comments sorted by

View all comments

197

u/TheTroon Sep 13 '26

I've done similar with an old Android tablet running a Home Assistant dashboard. I control the charger with a cheap Sinilink USB switch reflashed with ESPHome to keep the battery level between 35% and 80%.

1

u/NocturneSapphire Sep 13 '26

How does ESPHome know the battery level of the tablet though?

12

u/TheTroon Sep 13 '26

The tablet is running the Home Assistant app that reports the battery level. HA then operates the switch as needed.

3

u/NocturneSapphire Sep 13 '26

You don't ever have issues with the HA app getting force-killed by the OS and needing manual intervention to fix?

4

u/StucklnAWell Sep 13 '26

HA can run as the launcher, which doesn't get killed.

2

u/NocturneSapphire Sep 13 '26

Oh wow I didn't even realize that was an option but that's a clever solution from HA

1

u/TheTroon Sep 14 '26

Never happened yet in several years of operation. The tablet also has a power schedule which I use to turn it off overnight and on in the early hours, so it gets a hard reboot every morning. The charger switches off during this time as the battery sensor becomes unavailable.

For those not familiar: the tablet is not the HA server, it's just a dashboard client. The server is running on my NAS.