Anyone who knows how to get battery status of Android tablet

I have two rooms with automation. In first room i am hanging iPad as the main switch panel. In second room i am hanging Samsung tab (Android). Both are connected to their chargers. The charger of apple ipad gets on and off automatically according to battery percentage (with help of iCloud binding). But for Android tab, i need to manually turn on and off charger to prevent battery damage.

Is their any app/binding available to monitor Android battery status?
Or is their any other solution (eg any Android app publishing battery status to mqtt)?

You can easily do that with Tasker or any other automation app on Android.
On my phone I have a tasker profile which sends an http command (rest api) to openhab when the battery level goes under 20%

1 Like

Can you tell how to use HTML command. I have enabled REST API. My item is β€œSW4” that i want to turn β€œON”.
I have entered my info into Rest Api Page and pressed β€œTry it out!” button. It shows request url as β€œhttp://openhabianpi:8080/rest/items/SW4”. But i see nowhere mentioned β€œON”. I have attached screenshot.

In the rest api, look and the ITEM POST url

1 Like

The ON command is passed as body of the POST http request, it is not part of the URL.

here is an generic example of a http post action with Tasker: https://www.triggercmd.com/forum/topic/35/trigger-commands-with-a-tasker-http-post-action

In your case here are the variables you need to set
Server:Port: https://openhabianpi.8080
Path: rest/items/BW4
Data/File: ON

2 Likes

Thanks a lot !
It solved everything !!