Controlling Mopidy with a Bluetooth Remote

Hey guys,

I transitioned here from Moode which mainly uses MPD directly and thus it’s fairly simple to control playback via MPC commands.

I use a bluetooth remote control on Moode, the ones that come with a “dongle” to interface to the device, these are mostly marketed as “Android TV Remotes”. However what they do is replicate keyboard strokes. The “OK key” for example is the “Enter key” on a keyboard and I can use this to program the “OK key” on the remote to log the now playing track to a log.

I use this heavily in the car, for a screenless radio:

Could anyone step me through how Mopidy playback can be controlled in such a way? My scripts use a showkey scan to listen for keystrokes and then control playback via “mpc next” or something similar, maybe there is a Mopidy API that I can hook showkey up to?

# NEXT STATION
    if [[ $KEYS == *"103"* ]]; then
    echo "Remote: Next Station"
	mpc -q play
	mpc -q next

	SNAME=$(mpc -f %name% | head -n 1)
    ispeak "Now Tuned To ${SNAME}"

Mopidy’s MPD Frontend allows control using mpc. The same script should work.

Aaaaha, awesome thank you!