← All articles
Developer API, MCP and webhooks·

Set up Getwello with Sonos

Speakers announce check-ins via the local Sonos API or via Home Assistant.

Two routes to Sonos TTS announcements: direct via the local Sonos API, or via Home Assistant. Direct is leaner if you don't already run HA.

What you need

  • Sonos speakers on your network.
  • A relay machine reachable from the internet (Cloudflare Worker, Raspberry Pi, VPS).
  • A Getwello Coordinator account with active subscription.

Route A: via Home Assistant

If you already run Home Assistant, this is the easiest. See the existing recipe. Total time about 10 minutes.

Route B: direct, via local Sonos API

Sonos exposes a SOAP-over-HTTP control API on port 1400. You can play arbitrary URLs (including TTS audio) on any speaker. A small Node service hosts the TTS audio and tells Sonos to play it.

Step 1: Find your Sonos IP

Open the Sonos app, About, find the kitchen speaker's IP (e.g. 192.168.1.45).

Step 2: Build the relay

Use the sonos npm package on a Pi or VPS. Tiny Express server:

import { Sonos, AsyncDeviceDiscovery } from 'sonos';
import express from 'express';
const app = express();
app.use(express.json());

app.post('/getwello', async (req, res) => {
  const phrase = req.body.event === 'check_in.created'
    ? 'Mum has just checked in'
    : 'Mum missed her check-in';
  const sonos = new Sonos(process.env.SONOS_IP);
  await sonos.setVolume(25);
  await sonos.playNotification({
    uri: `https://tts.example/?text=${encodeURIComponent(phrase)}`,
    onlyWhenPlaying: false,
  });
  res.send('ok');
});

app.listen(3000);

Step 3: Create the Getwello webhook subscription

Settings → Developer API → Webhooks. URL is your relay (exposed via Cloudflare Tunnel or similar). Tick the events you want.

Test

Click Test. Sonos pauses music (if playing), announces, resumes. About 2-3 seconds total.

Troubleshooting

No sound: the speaker IP changed (DHCP). Use the Sonos app to find the new IP.

Volume too high/low: setVolume in the relay before playNotification. 25% is calm for a kitchen.

More on developer api, mcp and webhooks

Didn't answer your question?

Email hello@getwello.co.uk