Here is my problem:

Our TV is connected to a SBC running a GNOME/Wayland desktop, where we watch Jellyfin and sometimes Netflix/Hulu through Firefox.

I’d like to be able to trigger pause/play (space button) from Home Assistant, which is running on my home server.

What I am thinking of would be a server/daemon running on the TV computer that my home server would be able to send keys to via a CLI tool (in this case the space key). I am surprised to find that I cannot locate any program like this.

Can anyone provide any suggestions here?

Other ideas:

  • Jellyfin’s HA integration doesn’t let me pause/play from it, and that still doesn’t handle Hulu/Netflix.
  • I was able to get this working through SSH and there are tools like ydotool/wtype here that work, but I found waiting for SSH to be a bit slow to connect.

Update: I got frustrated and coded up a solution: https://gitlab.com/neilsimp1/kbsrv

You are viewing a single thread.
View all comments
1 point

Where is the machine located compared to the viewing room? Could you not use a wireless keyboard?

permalink
report
reply
1 point

I have a wireless keyboard. I want to be able to send a key event from CLI on another PC, though.

permalink
report
parent
reply
2 points

If your willing to write a little code, you could get an esp32, and use on of the keyboard libraries to make it appear as a keyboard?

https://hackaday.com/2021/03/26/usb-comes-to-the-esp32/

Very roundabout solution though.

permalink
report
parent
reply
2 points

I am fine with a little coding (see update in my post)

permalink
report
parent
reply

Linux Questions

!linuxquestions@lemmy.zip

Create post

Linux questions Rules (in addition of the Lemmy.zip rules)

  • stay on topic
  • be nice (no name calling)
  • do not post long blocks of text such as logs
  • do not delete your posts
  • only post questions (no information posts)

Tips for giving and receiving help

  • be as clear and specific
  • say thank you if a solution works
  • verify your solutions before posting them as facts.

Any rule violations will result in disciplinary actions

Community stats

  • 202

    Monthly active users

  • 119

    Posts

  • 728

    Comments

Community moderators