Sonos Pi Project

Sonos Pi Project

2016, Jul 10    



Using a Raspberry Pi to make vocal alerts on a Sonos based off output from Datadog.



About

This was a joint project between myself and my partner Moreton as our first attempt at using a RaspberryPi and test driving a Node.JS project. We both wanted to learn node and when I came up with the project idea as a piece of fun to help out the place I work at; it seemed like the perfect opportunity to learn Node.

Pi

Iteration One

The aim of the first iteration was to enable a vocal alert to be sounded on a Sonos speaker based on events set up on DataDog. This was done forking the code from sonos-http-api to make a sonos server/api, Voice RSS for the vocal mp3, writing our own code to write an API and the logic about what was to be said across the Sonos.

We test drove our code, pairing using a red, green, refactor pattern. Once it was shown to be working, ngrok was used to produce a secure url to configure a DataDog webhook to, using the webhook integration.

The code for this can be found here with all current instructions on how to work it. The DataDog details are currently not included.


step 1