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 Settings → Automation → Enable 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 | |||
Name | Type | Value | Example |
host | String | The target MPD server host name | 192.168.1.100 |
port | String | The target MPD server port number | 6600 |
pw | String | Optional MPD server password | |
command | String | The 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 | |||
Name | Type | Value | Example |
response | String | The 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-reason | String | Reason for failure or empty if command was successful | Connection 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 | |||
Name | Type | Value | Example |
host | String | The target MPD server host name | 192.168.1.100 |
port | String | The target MPD server port number | 6600 |
Result | |||
---|---|---|---|
Extras | |||
Name | Type | Value | Example |
fail-reason | String | Reason for failure or empty if command was successful | Failed 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 | |||
Name | Type | Value | Example |
enabled | String | [Required] Enable or disable http streaming | true |
http_host | String | [Optional] HTTP streaming host name. Use empty string "" to reset to default. | 192.168.1.102 |
http_port | String | [Optional] HTTP streaming port number. Use empty string "" to reset to default. | 8001 |
http_path | String | [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 | |||
Name | Type | Value | Example |
fail-reason | String | Reason for failure or empty if command was successful | Invalid args: http_enabled: required |