{"id":13830446,"url":"https://github.com/CFenner/MMM-Sonos","last_synced_at":"2025-07-09T11:33:03.581Z","repository":{"id":6212609,"uuid":"54748207","full_name":"CFenner/MMM-Sonos","owner":"CFenner","description":"A module for the MagicMirror to display informations about the currently playing songs on your Sonos system.","archived":false,"fork":false,"pushed_at":"2024-11-15T20:18:18.000Z","size":227,"stargazers_count":45,"open_issues_count":14,"forks_count":21,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-11-15T21:22:15.158Z","etag":null,"topics":["magic-mirror-modules","magicmirror","sonos","sonos-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CFenner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"cfenner","ko_fi":"hafenstrand"}},"created_at":"2016-03-25T21:21:31.000Z","updated_at":"2024-11-03T09:35:27.000Z","dependencies_parsed_at":"2024-01-20T02:24:39.358Z","dependency_job_id":"122c4408-33b4-4332-b312-8651b8e9fb88","html_url":"https://github.com/CFenner/MMM-Sonos","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CFenner%2FMMM-Sonos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CFenner%2FMMM-Sonos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CFenner%2FMMM-Sonos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CFenner%2FMMM-Sonos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CFenner","download_url":"https://codeload.github.com/CFenner/MMM-Sonos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225539401,"owners_count":17485319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["magic-mirror-modules","magicmirror","sonos","sonos-api"],"created_at":"2024-08-04T10:01:00.069Z","updated_at":"2024-11-20T11:30:47.026Z","avatar_url":"https://github.com/CFenner.png","language":"JavaScript","funding_links":["https://github.com/sponsors/cfenner","https://ko-fi.com/hafenstrand"],"categories":["Music"],"sub_categories":[],"readme":"[![code climate](https://codeclimate.com/github/CFenner/MMM-Sonos/badges/gpa.svg)](https://codeclimate.com/github/CFenner/MMM-Sonos)\n[![API](https://img.shields.io/badge/api-Sonos-orange.svg)](https://github.com/jishi/node-sonos-http-api)\n[![All Contributors](https://img.shields.io/github/all-contributors/CFenner/MMM-Sonos/main)](#contributors-)\n[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://choosealicense.com/licenses/mit/)\n\n# MagicMirror-Sonos-Module\n\nThis is an adaption of the [MagicMirror-SonosModule](https://github.com/Vaggan/MagicMirror-SonosModule) by [Vaggan](https://github.com/Vaggan). It was modified to fit the new module system and got some enhancements in visualisation an configuration.\n\n![Sonos Module](https://github.com/CFenner/MagicMirror-Sonos-Module/blob/master/.github/preview.png)\n\n## Usage\n\nPrerequisites:\n\n- requires MagicMirror v2.0.0\n- install and [run](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror) [node-sonos-http-api](https://github.com/jishi/node-sonos-http-api)\n\n### Installation\n\nNavigate into your MagicMirror's modules folder:\n\n```shell\ncd ~/MagicMirror/modules\n```\n\nClone this repository:\n\n```shell\ngit clone https://github.com/CFenner/MMM-Sonos\n```\n\nNavigate to the new MMM-Sonos folder and install the node dependencies.\n\n```shell\ncd MMM-Sonos/ \u0026\u0026 npm install --production\n```\n\nConfigure the module in your config.js file.\n\n### Configuration\n\nTo run the module properly, you need to add the following data to your config.js file.\n\n```js\n{\n  module: 'MMM-Sonos',\n  position: 'top_right', // you may choose any location\n  config: {}\n}\n```\n\nYou also can set some options to hide different parts of the module.\n\n| Option | Description | Default |\n|---|---|---|\n|`showStoppedRoom`|Trigger the visualization of stopped rooms.|`true`|\n|`showAlbumArt`|Trigger the visualization of the album art.|`true`|\n|`albumArtLocation`|Specifies on which side of the text the album art is rendered. Possible values: `left`, `right`.|`right`|\n|`showRoomName`|Trigger the visualization of the room name.|`true`|\n\n### Known Issues\n\nThe 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.\n\n```js\n  res.setHeader(\"Access-Control-Allow-Origin\", \"http://localhost\");\n  res.setHeader(\"Access-Control-Allow-Headers\", \"Origin, X-Requested-With, Content-Type, Accept\");\n```\n\n### How to Install Sonos-API\n\nTo install the Sonos-API just clone the [repository](https://github.com/jishi/node-sonos-http-api) to your PI.\n\n```shell\ngit clone https://github.com/jishi/node-sonos-http-api.git\n```\n\nNavigate to the new node-sonos-http-api folder and install the node dependencies.\n\n```shell\ncd node-sonos-http-api \u0026\u0026 npm install --production\n```\n\nNow you can run the service with:\n\n```shell\nnpm start\n```\n\nI really recommend to use PM2 like it is described on the MagicMirror [Wiki page](https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror).\n\n```shell\ncd ~/Sonos\nnpm start\n```\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Vaggan\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/7814763?v=4?s=100\" width=\"100px;\" alt=\"Christopher Edling\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eChristopher Edling\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-Vaggan\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/CFenner/MMM-Sonos/commits?author=Vaggan\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#research-Vaggan\" title=\"Research\"\u003e🔬\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/MagMar94\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/34011212?v=4?s=100\" width=\"100px;\" alt=\"Magnus\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMagnus\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/CFenner/MMM-Sonos/commits?author=MagMar94\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCFenner%2FMMM-Sonos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCFenner%2FMMM-Sonos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCFenner%2FMMM-Sonos/lists"}