First off, sorry you are having trouble with this. As it stands presets are a decently advanced feature and our UI attempts to make them easy to use. What you are trying to do is not completely supported by the UI yet. (I’ll insert a GH feature request here in a bit).
The underlying issue here is the zones that aren’t covered by the preset are not being changed when the preset is activated. Those extra zones keep the source they have connected as well as their current volume/mute state. The reason for this is that presets are designed to be a partial configuration update and the extra zones are not being updated. From your perspective I could see how this behavior appears random.
The UI is effectively creating a preset that looks something like this:
{
"name": "Default",
"state": {
"sources": [
{
"id": 0,
"input": "stream=1005"
},
{
"id": 1,
"input": "stream=1006"
},
{
"id": 2,
"input": "stream=1007"
},
{
"id": 3,
"input": "stream=1008"
},
],
"zones": [
{
"id": 0,
"source_id": 0,
"vol_f": 0.5,
"mute": false
},
{
"id": 1,
"source_id": 1,
"vol_f": 0.5,
"mute": false
},
{
"id": 2,
"source_id": 2,
"vol_f": 0.5,
"mute": false
},
{
"id": 5,
"source_id": 3,
"vol_f": 0.5,
"mute": false
}
]
}
}
In this example Zone ids 3 and 4 are missing from this preset. Those zones will not be configured when this preset is activated.
To fix that we need to add them to the preset and set their source_id's
to -1
. This will effectively disconnect zones 3 and 4 from any source (NOTE: at a hardware level they are just connected to source 0 and muted). Here is what that looks like:
{
"name": "Default",
"state": {
"sources": [
{
"id": 0,
"input": "stream=1005"
},
{
"id": 1,
"input": "stream=1006"
},
{
"id": 2,
"input": "stream=1007"
},
{
"id": 3,
"input": "stream=1008"
},
],
"zones": [
{
"id": 0,
"source_id": 0,
"vol_f": 0.5,
"mute": false
},
{
"id": 1,
"source_id": 1,
"vol_f": 0.5,
"mute": false
},
{
"id": 2,
"source_id": 2,
"vol_f": 0.5,
"mute": false
},
{
"id": 3,
"source_id": -1
},
{
"id": 4,
"source_id": -1
},
{
"id": 5,
"source_id": 3,
"vol_f": 0.5,
"mute": false
}
]
}
}
I would suggest using our interactive API to make the changes to your presets. Check it out at http://amplipi.local/doc.
Use Presets - Get Preset to get the preset content to modify and Presets - Set Preset to update the preset with the suggested changes.