Lock/unlock screen of android tab from OH

Hello,

I have put a tablet with oh on the wall like control center of OH.
It is connected with wifi socket.
I would like to turn off the chrger when i leave the home and turn on when i come back.
So with charger is clear how to turn it off/on.
But with android system, how can i turn off the screen and lock it and again unlock?

Thanks!

You can’t do this from openHAB or the openHAB app. Under certain circumstances you might be able to pull this off with Tasker http://www.wuench.com/blog/tasker-how-to-unlock-your-screen/.

1 Like

Thanks, also found it. Now exploring it.
But how can i communicate it with oh? Get/post or any other way?

You realize the tablet keeps running on battery, correct?

I do not want that it runs on battery, so if there is no charger it must be locked. If charger came back - unlocked.

The OS is still running on battery with the screen locked.

You can send commands (and soon updates) from Tasker to openHAB. There is no built in way to get data from openHAB into Tasker yet (if ever) so you would have to use the openHAB REST API.