Bluetooth Keyboard Emulation

The only way I’ve seen to remotely control an iPad is to use a bluetooth keyboard.
I just set up an mounted iPad and would like to limit the time where it’s on.

My idea would be to have HA or some Pi like device (or commercial device) that can send some bluetooth keyboard strokes to the iPad when motion is detected or certain times of the day.

I’ve looked a bit and I see bluetooth keyboards as an input to HA but I don’t see anything where it’s the output.
I started looking into this tutorial but after a little while I was questioning how I would even call something like this from HA, it really got me into the weeds.

Any ideas would be greatly appreciated.

What are the odds. Saw this this morning.

have you found any solution finally? I also would like to control my old iPad)

So far I’ve just been using the motion detector → homekit notification while guided access is enabled. Hasn’t stopped working for me yet. If it ever does then I’ll have to look into it.

which iOS version do you have? I have 9.3.5 and don’t know how to get rid from slide to unlock screen

latest 17.something.
I don’t know if that older version has guided access.
If the iPad is really old and you don’t care about the screen health you can just set the auto lock to never.

Hi,
I am having the following problem:
After the ipad connects to the esp32 bluetooth, every time I restart the esp32, the ipad cannot automatically reconnect to the esp32 via bluetooth. On Android phones I don’t have this problem. Currently I have not found out the cause of the problem