This plugin displays the battery level of yout phone running OctoPrint with Octo4a . It also has a basic telegram integration and is able to send warnings to a telegram at pre defined battery levels
Install via the bundled Plugin Manager or manually using this URL:
https://github.com/tobiasgraf/OctoPrint-Octo4a_battery/archive/master.zip
This plugin simply reads the file battery from the file /sys/class/power_supply/battery/capacity
. This works on my Phone (Nexus 5). If this does not work for you, you can change the path in the settings.
You need to create a telegram bot and configure the token in the settings. How to create a bot have a look at the Otcoprint Telegram Plugin or just google it.
To get the ChatID, write a message to the bot or add it to a channel. Then go to
https://api.telegram.org/bot**yourTokenHere**/getUpdates
with your browser. This returns a JSON where you can find your chat ID.