tbouron / mmm-sonos Goto Github PK
View Code? Open in Web Editor NEWMagicMirror module that displays playing tracks on your Sonos network
License: Apache License 2.0
MagicMirror module that displays playing tracks on your Sonos network
License: Apache License 2.0
Hello
I have been unable to make this module work and I think I have narrowed it down to a Sonos Boost in my system
Every time the boost is plugged in I get the following errors and the module displays nothing
0|mm | [10.06.2021 18:56.52.463] [ERROR]
0|mm | (node:31409) UnhandledPromiseRejectionWarning: Error: upnp: Request failed with status code 405///<HTML><HEAD><TITLE>Error 405</TITLE></HEAD><BODY><H1>Error 405</H1><P>Method Not Allowed</P></BODY></HTML>
0|mm | at /home/pi/MagicMirror/modules/MMM-Sonos/node_modules/sonos/lib/services/Service.js:90:25
0|mm | at runMicrotasks (<anonymous>)
0|mm | at processTicksAndRejections (internal/process/task_queues.js:97:5)
0|mm | [10.06.2021 18:56.52.464] [ERROR] (node:31409) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9
)
My take is that an unrecognised command is sent to the boost and the error is not properly handled/ignored
This is the boost device object in my system, nothing seems to distinguish it from the speaker devices
Sonos {
host: '192.168.1.162',
port: 1400,
options: {
endpoints: {
transport: '/MediaRenderer/AVTransport/Control',
rendering: '/MediaRenderer/RenderingControl/Control',
device: '/DeviceProperties/Control'
},
spotify: { region: '3079' }
},
_events: [Object: null prototype] {
newListener: [AsyncFunction: implicitListen]
},
_eventsCount: 1
}
I will try to trace it down to the actual error but documenting here what I have found thus far
[23:39:56.742] [ERROR] Error: Cannot find module 'sonos'
at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
at Function.Module._load (internal/modules/cjs/loader.js:528:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/home/pi/MagicMirror/modules/MMM-Sonos/node_helper.js:2:59)
at Object. (/home/pi/MagicMirror/modules/MMM-Sonos/node_helper.js:141:3)
at Module._compile (internal/modules/cjs/loader.js:711:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
[23:39:56.743] [LOG] Whoops! There was an uncaught exception...
[23:39:56.744] [ERROR] { Error: Cannot find module 'sonos'
at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
at Function.Module._load (internal/modules/cjs/loader.js:528:25)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/home/pi/MagicMirror/modules/MMM-Sonos/node_helper.js:2:59)
at Object. (/home/pi/MagicMirror/modules/MMM-Sonos/node_helper.js:141:3)
at Module._compile (internal/modules/cjs/loader.js:711:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) code: 'MODULE_NOT_FOUND' }
The module is not loading on the MM.
Are there any dependancies, like an API or whatever?
I have an issue that I don't see any "Sonos" info on the screen. The standard modules works OK. I can se in the log Windwos that my Pi have contact with my Sonos system.
Any idea?
Best Regards Toni
Love this module! super clean and works perfectly. Not so much of an issue but more of a request. Complete noob to java and coding in general but learning as I go. Is it possible to add a scrolling feature for the track title, artist, album, etc?
Hello,
Is there a way to change the size of the font of the album's name ?
Thanks
Yann
Hey there,
I wanted to put this module in my Mirror, but I when I put the code into config.js, moved it to a different part of the screen, and saved, it was like it disabled the auto-start I had on it, and I couldn’t start anything with npm run start. As soon as I deleted the module from config.js, it worked fine. Can someone please help?
Hi,
is it possible to add the track number in front of the track. On which api or whatever is the module running. From what does ist get the data?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.