# Controlling Mopidy with a Bluetooth Remote

**URL:** https://discourse.mopidy.com/t/controlling-mopidy-with-a-bluetooth-remote/4198
**Category:** Misc
**Created:** [July 26, 2020, 5:00pm UTC](https://discourse.mopidy.com/t/controlling-mopidy-with-a-bluetooth-remote/4198 "2020-07-26T17:00:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![duracell80](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/duracell80/32/1634_2.png) [@duracell80](https://discourse.mopidy.com/u/duracell80)
#### Post date: [July 26, 2020, 5:00pm UTC](https://discourse.mopidy.com/t/controlling-mopidy-with-a-bluetooth-remote/4198/1 "2020-07-26T17:00:08Z")

</div>

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:

> **[duracell80/ArgonOne-Radio](https://github.com/duracell80/ArgonOne-Radio)**
>
> Contribute to duracell80/ArgonOne-Radio development by creating an account on GitHub.

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}"
```

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [July 26, 2020, 6:36pm UTC](https://discourse.mopidy.com/t/controlling-mopidy-with-a-bluetooth-remote/4198/2 "2020-07-26T18:36:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![duracell80](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/duracell80/32/1634_2.png) [@duracell80](https://discourse.mopidy.com/u/duracell80)
#### Post date: [July 26, 2020, 8:09pm UTC](https://discourse.mopidy.com/t/controlling-mopidy-with-a-bluetooth-remote/4198/3 "2020-07-26T20:09:39Z")

</div>

Aaaaha, awesome thank you!
