yeongheon wrote:Thanks, SIF
I found that my AirMouse already working with runeaudio(raspberry pi3) as mouse before installing empcd. especially volumeup/down.
I guess that it should be disabled for using mpd remote control. But i dont know how.
it is my airmouse.
https://www.aliexpress.com/item/Free-Sh ... 0.0.ODnJoJPlease help me to use this remote control for runeaudio. and the airmouse could not be used for runeaudio remote?
You need to control MPD in order to control Runeaudio. Runeaudio gets the current status of MPD and displays it.
Focus on the last part of my guide:
"Mit evtest habe ich ausmachen können, welche Signale die Tastatur sendet."
You need to use evtest to find out the commands, that your remote is sending.
e.g. "KEY_HOMEPAGE" which is the home button. Just press a button and see what key gets send. "UP" "DOWN" "REPEAT" means if the button is pressed, released or hold.
You may want to use my config file, most buttons should work since our remotes are very similar.
Edit: since there is no mouse in shell you don't need to disable the air mouse function. Just use the keys.
- Code: Select all
##################################################
# ecmpd.conf by Jeroen Massar <jeroen@massar.ch>
# Example empcd configuration file
#
# Lines starting with ‚#‘ or ‚//‘ are comment lines
# Repeating spaces and tabs are trimmed
##################################################
##################################################
# MPD settings
##################################################
# Run empcd under the ‚mpd‘ account
user mpd
# mpd_host [<password>@]<host> (defaults to „localhost“)
mpd_host localhost
# mpd_port <port> (defaults to 6600)
mpd_port 6600
# Device to read events from
//eventdevice /dev/input/event0
# Exclusive (default) / Non-Exclusive device access
//exclusive
##################################################
# Key configuration
##################################################
#
# key <key-id> up|down|repeat <function> [arguments]
#
# down = key gets pressed down
# up = key goes up (after being pressed down)
# repeat = key is kept down and sends repeat events
#
# functions (also see ‚empcd –list-functions‘):
# exec <shellcmd> Execute a shell command (eg exec mount /dev/sdb2 /mnt)
# mpd_next MPD Next Track
# mpd_play MPD Previous Track
# mpd_stop MPD Stop Playing
# mpd_play MPD Start Playing
# mpd_pause [on|off] MPD Pause Toggle (no options) or set
# mpd_seek MPD Seek
# „mpd_seek 0“ – begin of track
# „mpd_seek 100“ – begin of track
# „mpd_seek +10“ – advance 10 seconds
# „mpd_seek -20“ – backward 20 seconds
# mpd_random MPD Random Toggle (no options) or set
#
#
###################################################
# Play/Pause
key KEY_ENTER UP mpd_pause
key KEY_MUTE UP mpd_play
key KEY_POWER UP mpd_stop
# Prev/Next
key KEY_LEFT UP mpd_prev
key KEY_RIGHT UP mpd_next
# Volume
key KEY_VOLUMEDOWN DOWN mpd_volume -5%
key KEY_VOLUMEUP DOWN mpd_volume +5%
key KEY_VOLUMEDOWN REPEAT mpd_volume -1%
key KEY_VOLUMEUP REPEAT mpd_volume +1%
# key KEY_MUTE UP mpd_volume -100%
# Seek to the beginning of the current song
key KEY_HOMEPAGE UP mpd_seek 0
# 2 seconds back/forward on 1 hit,
# 10 seconds back/forward when holding
key KEY_DOWN UP mpd_seek -2
key KEY_DOWN REPEAT mpd_seek -10
key KEY_UP UP mpd_seek +2
key KEY_UP REPEAT mpd_seek +10