Touchpad to send mouse events to Raspi

I have a setup where TV is connected through HDMI to Raspi and it can play some movies etc. Through HASS and MQTT I can send some messages to Raspi to e.g. switch the TV On/Off. I’d also like to have an access to mouse and keyboards to e.g. pause the movie or play some other one. Is there some add-on that I can use to send to simulate touchpad on HASS?

I was able to use the color picker to send HSV values (which are essentially angle and r) and calculate x, y out of them. Then use this as to move the mouse on the screen. However this is very slow, as color picker has 0.5s updating hard coded.
If there is any way to make it faster, or to one any other approach I would be very happy.
Thanks!

Where do you want to have that “mouse access”? In HA (=Lovelace)? :thinking:

Otherwise use a BT or radio controlled mouse at your Pi.

Yes, In HA, just like the color picker, I want to move some pointer in some 2d space, and see the mouse cursor moving on my raspi screen. I can move the cursor by sending mqtt message to raspi, so the problem is only sending the messages quick enough to not introduce too much lag. Unfortunately color picker sends the message every 0.5s which seems really laggy

I have other controllers for screen in my HA (on/off, pressing pause etc), so I’d like to keep everything in one place. This is how it looks like:

1 Like