I recently started using headless plexamp and it has been working very well. Thank you for making that possible.
Using plexamp from my phone as a controller is fine until I need to quickly pause, play or skip, then I have to unlock my phone, slide down the notification shade and press the relevant button on the screen.
I would really like to do this from my harmony remote. Previously I was using moOde audio, and using a FLIRC USB I was able to control it from my Harmony. I did this with triggerhappy and MPC. Unfortunately MPC doesn’t work because plexamp doesn’t use MPD.
Are there commands to control play, pause, skip forward, skip back? If so, I could use triggerhappy to output them when it detects the designated input from FLIRC. I have FLIRC and Triggerhappy working on my headless plexamp right now, but I don’t know what commands to have triggerhappy output. I also tried having the FLIRC output media controls as if it was a keyboard, but that did not work either.
You could probably do this via HTTP on the headless device. If you have FLIRC running on the headless device and can process the commands, launch something like this:
Chrome might think this file is dangerous, so you will have to navigate to Downloads in chrome and select to keep the file. I did a virus scan and it came up clean.
Update the software
Plug in your FLIRC and update the firmware
Make sure it says connected in the bottom right corner of the app.
If it doesn’t say connected, just reinsert the FLIRC.
From the “Controllers” drop down menu, select “Full Keyboard”
Click on 1 and press the button on your remote control that you want to be 1/play
Later we will set up the Pi to take these number keys and interpret them as play, pause, next, previous, etc.
Repeat Step 6 for each button you want to use with your remote. If you run out of numbers you can switch to letters.
The FLIRC is updated in real-time so you don’t have to save anything. You could save a backup of your configuration at this point if it is very complicated.
Open a text editor and press the buttons on your remote that you set up in FLIRC software and you should see those numbers being typed into the text editor.
Unplug the FLIRC from your PC and plug it into the Pi.
Congrats, your FLIRC is setup.
Setting up plexamp
Summary
Run this command in a command prompt to connect to plexamp via SSH
This is the file that determines triggerhappy’s default user type:
sudo nano /etc/default/triggerhappy
delete the “#” before DAEMON_OPTS=“–user root” to make triggerhappy use root.
# The Triggerhappy daemon (thd) drops its root privileges after
# startup and becomes "nobody". If you want it to retain its root
# status (e.g. to run commands only accessible to the system user),
# uncomment the following line or specifiy the user option yourself:
#
# DAEMON_OPTS="--user root"
With that done I can now use my harmony to control Plexamp.