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%
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
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
Thanks a lot !
It solved everything !!