homestar-sonos

August 25, 2016 ยท View on GitHub

IOTDB Bridge for Sonos

About

See the samples for details how to add to your project.

  • This has never been tested: I don't own a Sonos

  • We don't know the Sonos UUID. We have to get them to figure that out in the sonos library

  • Read about Bridges

Installation

Then:

$ npm install homestar-sonos

Use

Set the channel to 3

const iotdb = require('iotdb')
iotdb.use("homestar-sonos")

const things = iotdb.connect("SonosPlay")
things.set(":volume", 20)
things.set(":mute", true)
things.set(":media.mode", ":media.mode.play")

Models

SonosPlay

  • volume: integer from 0 to 100 (iot-purpose:volume)
  • mute: true or false (iot-purpose:mute)
  • media.mode: string, see below (iot-purpose:media.mode.*)
  • next: a work in progress
  • previous: a work in progress

Modes

Supported Media Modes (so far)

  • media.mode.play
  • media.mode.pause
  • media.mode.stop