This is an adaption Sonos module of Vaggan's MagicMirror-SonosModule. It was modified to fit the new module system and got some enhancements in visualisation an configuration.
Prerequisites
- requires MagicMirror v2.0.0
- install and run node-sonos-http-api
To use this module, just create a new folder in the modules folder of your MagicMirror, name it 'sonos' and copy the content of the repository into this folder. You also need to add some config entries to your config.js file. After that the content will be added to your mirror.
To run the module properly, you need to add the following data to your config.js file.
{
module: 'sonos',
position: 'top_right', // you may choose any location
config: {}
}
You also can set some options to hide different parts of the module.
| Option | Description |
|---|---|
showStoppedRoom |
Trigger the visualization of stopped rooms. Default value: true |
showAlbumArt |
Trigger the visualization of the album art. Default value: true |
showRoomName |
Trigger the visualization of the room name. Default value: true |
The module may not be able to access the data of the sonos API due to a Cross-Origin Resource Sharing (CORS) issue. This could be solved by adding the following lines to the sonos-http-api.js just before res.write(new Buffer(jsonResponse)); in the sonos api. Remember to restart the service after the change.
res.setHeader("Access-Control-Allow-Origin", "http://localhost");
res.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
