Using Rasplex to serve Audio - a few questions

I’m going to use RasPlex to serve audio via i2s to a homemade DAC. On the front of the unit, I’d like to have a few basic buttons and an LCD screen.

Has anyone done this?

Current plan is to use an Arduino pro as an USB HID slave and wire the buttons via this… if possible, I’d rather use the GPIO pins and somehow feed this into PHT… anyone have any ideas how to do this?

also, what do you believe the bare minimum buttons required are?

I was also planning on setting up a new user on PMS and only sharing the music libraries?

is there an easy way to get Spotify or Tidal as channels?

anyone have other thoughts/considerations?

FWIW, its currently being served via Logitech media server…

Yes, its possible
I have added a controlled power button by using the GPIO and it wouldnt be hard to build a couple of buttons that send xbmc-send commands to control the GUI. No arduino spoofing a keyboard needed

The bare minimum buttons? 4 directional for GUI, enter and escape. But if you are not going to use a display you just need the power button and you can control it through the plex app from your phone or tablet

Adding a button to control shutdown should be straight forward. Just a few lines of python to kick off a shutdown script… However, I’m a bit unsure where to send what for UI interface commands. I was thinking of just having the LCD interface running… so your 6 controls plus shutdown, plus play/pause… agreed, most use will be via the app… But I do want to give the option of being able to drive it from the front panel.

Does anyone have a code snippet to get me going?

You can add a power button with this script I created . It also adds GPIO support for the rest of the buttons you need.

Just mod it and add xbmc-send commands for the rest of the buttons, for example you can send

xbmc-send --action=“Enter”
xbmc-send --action=“Escape”
xbmc-send --action=“Up”
etc
you can check all the possible commands in keymap.xml, you can even tell it to go to a specific menu

Hey, thanks… that was a brilliant leg up…

I’m guessing this will work with Plex (as Plex is based on XBMC)… do you know if the JSON (found it after googling xbmc-send) interface is also working in Plex?

sorry, I have never tried to use that api

Also, one last thing. Google the xbmc-send script because its writen in python, so its easy to integrate it to your own script without outputting commands to bash

will do … thanks for that…