HomeKit enabled devices like lights, door openers, thermostats, ... can be added to your HomeKit app. This allows you to control these devices with Siri on your iPhone or iPad.
Bose SoundTouch devices doesn't implement the HomeKit API. This means they cannot be controlled using Siri. But thanks to Homebridge it was possible to make SoundTouch HomeKit compatible. SoundTouch devices can be controlled using an HTTP API and this API is my homebridge plugin calling.
Homebridge is a lightweight NodeJS server you can run on your home network that emulates the iOS HomeKit API.
Homebridge needs to run an raspberry pi (or banana pi in my case) and broadcasts itself as one of more HomeKit compatible devices. Your iPhone or iPad will recognize the homebrdige devices as real HomeKit devices and you can control these devices with Siri or with a HomeKit app.
Homebridge and sound devicesIn fact the HomeKit and also homebridge doesn't support a music playable device. Typically thermostats, temperature sensors, lights, blinds, ... are supported.
The homebridge plugin 'homebridge-soundtouch' I developed will add the SoundTouch as HomeKit device but it acts as a light. So the only command that can be given is 'On' or 'Off'. I added a custom characteristic 'Volume'. The volume can be controlled using a HomeKit app, but Siri doesn't know the characteristic 'Volume' and you can't use Siri to control the Volume.
HomeKit also supports scenes. By adding a scene 'Start party' for instance, you can use Siri to power on the SoundTouch device and put the volume to 80%.
InstallationRun these commands on a raspberry pi, banana pi or on a mac or windows.
npm install -g homebridge
npm install -g homebridge-soundtouch
homebridge
- Install homebridge using: npm install -g homebridge
- Install this plugin using: npm install -g homebridge-soundtouch
- Start homebridge: homebridge
After executing these commands, you will get the output that no configuration file is available.
ConfigurationAn example of the configuration for the homebridge-soundtouch plugin is:
"accessories": [
{
"accessory": "SoundTouch",
"name": "Speaker Bathroom",
"room": "Bathroom"
}
],
Fields:
- "accessory": Must always be "SoundTouch" (required)
- "name": The name you want to use to control the SoundTouch.
- "room": Should match exactly with the name of the SoundTouch device (this can be found in the Bose SoundTouch app).
Don't use SoundTouch or music as name, because Siri will try to open the SoundTouch or Apple Music app when giving spoken commands.
You need to create a file called 'config.json' in your home folder (~/config.json).
{
"bridge": {
"name": "Homebridge",
"username": "CD:21:3D:E3:C0:38",
"port": 51826,
"pin": "031-45-154"
},
"description": "This is an example configuration.",
"accessories": [
{
"accessory": "SoundTouch",
"name": "Speaker Bathroom",
"room": "Bathroom"
}
],
"platforms": [
]
}
Execute the 'homebridge' command again to start homebridge with that configuration.
ConnectingInstall the Insteon+ app on your iPhone or iPad. (or another homekit app)
Follow the following steps in that app to add the homebridge device.
- Open the app
- Add a home
- Add a new device
- Select the HomeBridge plugin (or the name in the config file)
- Use pin code 031-45-154 (or the pin code in the config file)
- (optionally: add a room or a scene)
You are ready to control your SoundTouch using Siri.
Siri commandsHé Siri, is speaker bathroom enabled?
Hé Siri, is speaker bathroom playing?
Hé Siri, turn speaker bathroom on
Hé Siri, turn speaker bathroom off
Comments
Please log in or sign up to comment.