Homebridge SoundTouch Platform

I’ve been testing out the homebridge-soundtouch-platform Homebridge plugin as a replacement for homebridge-soundtouch plugin (see my earlier notes about configuring this plugin). The main advantage I is that it exposes the 6 Soundtouch Presets as switches in HomeKit, whereas the older plugin exposes them as a ‘custom’ HomeKit parameter. The custom parameter is visible in the Home+ app, but not in the native Home app.

It was simple to install on my Raspberry Pi Zero W via the command sudo npm install -g homebridge-soundtouch-platform. Then I just added the following to my config.json in the platforms array to define my two speakers (the speakers have fixed IPs on my network, and I’ve disabled the China-only QPlay service, as well as the AUX inputs):

{
  "platform": "SoundTouchPlatform",
  "name": "SoundTouch",
  "accessories": [
    {
      "name": "Master Bedroom Speaker",
      "room": "Master Bedroom",
      "ip": "10.0.1.210",
      "volume": {
        "mode": "lightbulb",
        "onValue": 35,
        "unmuteValue": 35,
        "maxValue": 100
      },
      "presets": [
        {
          "index": 1,
          "name": "MB1",
          "enabled": true
        },
        {
          "index": 2,
          "name": "MB2",
          "enabled": true
        },
        {
          "index": 3,
          "name": "MB3",
          "enabled": true
        },
        {
          "index": 4,
          "name": "MB4",
          "enabled": true
        },
        {
          "index": 5,
          "name": "MB5",
          "enabled": true
        },
        {
          "index": 6,
          "name": "MB6",
          "enabled": true
        }
      ],
      "sources": [
      ]
    },
    {
      "name": "Living Room Speaker",
      "room": "Living Room",
      "ip": "10.0.1.211",
      "volume": {
        "mode": "lightbulb",
        "onValue": 35,
        "unmuteValue": 35,
        "maxValue": 100
      },
      "presets": [
        {
          "index": 1,
          "name": "LR1",
          "enabled": true
        },
        {
          "index": 2,
          "name": "LR2",
          "enabled": true
        },
        {
          "index": 3,
          "name": "LR3",
          "enabled": true
        },
        {
          "index": 4,
          "name": "LR4",
          "enabled": true
        },
        {
          "index": 5,
          "name": "LR5",
          "enabled": true
        },
        {
          "index": 6,
          "name": "LR6",
          "enabled": true
        }
      ],
      "sources": [
      ]
    }
  ],
  "global": {
    "sources": [
      {
        "source": "QPLAY",
        "enabled": false
      },
      {
        "source": "AUX",
        "enabled": false
      }
    ]
  }
}

Despite explicitly defining the presets for the speakers, on one of the speakers only Preset 4 appears in HomeKit. For this reason, I’m sticking with the older platform for now.