About

MAFA can accept messages from automation apps to control MPD server.

Note

This feature is still experimental and subject to changes.

Settings

Automation intents are disabled by default. Enable from SettingsAutomationEnable automation

Messages

MPD Command

Send MPD command to an MPD server. Command idle and binary commands like albumart are not supported.

If there's no MPD server with host and port, a new one is added.

Test

adb shell am start -a software.indi.mafa.action.MPD_COMMAND -e host 192.168.1.101 -e port 6600 -e command \"setvol 44\"

Intent

Intent parameters
Action
software.indi.mafa.action.MPD_COMMAND
Extras
NameTypeValueExample
hostStringThe target MPD server host name192.168.1.100
portStringThe target MPD server port number6600
pwStringOptional MPD server password
commandStringThe command to send.
If the command contains a line break it is automatically wrapped within command_list_begin and command_list_end
status
Result
Extras
NameTypeValueExample
responseStringThe response from MPD server or empty if failed to send the command
repeat: 0
random: 0
single: 0
consume: 0
partition: default
playlist: 4
playlistlength: 1
mixrampdb: 0
state: stop
xfade: 2
song: 0
songid: 1
OK
fail-reasonStringReason for failure or empty if command was successfulConnection refused

Select MPD Server

Switch MAFA to selected MPD server.

If there's no MPD server with host and port, a new one is added.

Test

adb shell am start -a software.indi.mafa.action.SELECT_SERVER -e host 192.168.1.101 -e port 6601

Intent

Intent parameters
Action
software.indi.mafa.action.SELECT_SERVER
Extras
NameTypeValueExample
hostStringThe target MPD server host name192.168.1.100
portStringThe target MPD server port number6600
Result
Extras
NameTypeValueExample
fail-reasonStringReason for failure or empty if command was successfulFailed to add MPD server

Configure HTTP Streaming

Set the HTTP streaming configuration for the latest used MPD server.

Test

adb shell am start -a software.indi.mafa.action.HTTP_STREAMING_CONFIG -e http_enabled true -e http_port \"8001\" -e http_host \"\" -e http_path \"\"

Intent

Intent parameters
Action
software.indi.mafa.action.HTTP_STREAMING_CONFIG
Extras
NameTypeValueExample
enabledString[Required] Enable or disable http streamingtrue
http_hostString[Optional] HTTP streaming host name. Use empty string "" to reset to default.192.168.1.102
http_portString[Optional] HTTP streaming port number. Use empty string "" to reset to default.8001
http_pathString[Optional] Path to append to the HTTP streaming URL passed to the local player. Use empty string "" to reset to default.mpd.mp3
Result
Extras
NameTypeValueExample
fail-reasonStringReason for failure or empty if command was successfulInvalid args: http_enabled: required