• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
  1. Home
  2. F17MC
  3. Posts
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
F
Offline
  • Profile
  • Following 1
  • Followers 0
  • Topics 0
  • Posts 10
  • Groups 0

Posts

Recent Best Controversial
  • RE: MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.

    @ejay-ibm
    I really want the module to control only one device. I configured that device in the configuration file, but then used the magicmirror as an output device. Then that was the error.
    I started disabling youtube and its automatic playback of mmm-assistantmk2, but then I turned it back on.

    A doubt. As I really only want to control a device with your module, I could do that if, for example, I’m listening to spotify on my computer, but I say to magicmirror: “start music on spotify” make the change directly to the deviceID that I have in the config file and start the music?

    posted in Entertainment
    F
    F17MC
    Mar 15, 2019, 12:08 PM
  • RE: MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.

    @ejay-ibm said in MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.:

    @F17MC
    So in your config.js you have set your device id to ; a8caee9b12196a964f5a9b0fafaf7ef1

    at this step
    Error while refreshing:
    { StatusCodeError: 404 - {“error”:{“status”:404,“message”:“Device not found”}}

    currentDeviceID variable is passed by case ‘PLAY_SPOTIFY’:
    payload[“deviceId”] = this.config.deviceId;

    "If I don’t say a command before, I get error 404. " what do you mean ? could you clarify ?

    “But when I try it with the device which is the deviceID that I wrote in the module code, it works.”
    Yes that is expected .

    For now you can only start playing on the device ID given in the config file as mentioned in the readme :

    This Module allow to control Spotify player on your Mirror . For now you can only control a single device. It could be your mirror if you are running Raspotify on it. Request to play a song it will be played on your select device in the config.js file. other command doesn’t need a device to be set. So if you are already playing a song on another device, the modules allow you to control this device from your module. But if you request a new song or playlist the set device in config file will play it on it you can not start a new song on a different device from now .

    Does that clarify the point ?

    Ejay

    If I don’t say a command before, I get error 404. " what do you mean ? could you clarify ?
    I wanted to erase this sentence but I could not edit my post. It should not be there.

    Yes, the module is working perfect now!
    Thanks.

    posted in Entertainment
    F
    F17MC
    Mar 15, 2019, 11:59 AM
  • RE: MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.

    @ejay-ibm
    I tried again and I receive this:

    [AMK2] end-of-utterance
    [AMK2] Transcription: los planetas Spotify  --- Done: true
    [AMK2] openSpotify found: https://open.spotify.com/artist/0N1TIXCk9Q9JbEPXQDclEL
    { requestId: '5c8b16da-0000-2878-a45c-...' } { profileFile: 'default.json', lang: 'es-ES' }
    [AMK2] Device Action: { requestId: '5c8b16da-0000-2878-a45c-...' }
    [AMK2] Assistant Text Response: 
    [HOTWORD] begins listening.
    Refreshed access token because it has expired. Expired at: 11:26:53 now is: 11:27:56
    Error while refreshing:
    { StatusCodeError: 404 - {"error":{"status":404,"message":"Device not found"}}
        at new StatusCodeError (/home/pi/MagicMirror/modules/MMM-SpotifyControl/node_modules/request-promise-core/lib/errors.js:32:15)
        at Request.plumbing.callback (/home/pi/MagicMirror/modules/MMM-SpotifyControl/node_modules/request-promise-core/lib/plumbing.js:104:33)
        at Request.RP$callback [as _callback] (/home/pi/MagicMirror/modules/MMM-SpotifyControl/node_modules/request-promise-core/lib/plumbing.js:46:31)
        at Request.self.callback (/home/pi/MagicMirror/modules/MMM-SpotifyControl/node_modules/request/request.js:185:22)
        at emitTwo (events.js:126:13)
        at Request.emit (events.js:214:7)
        at Request.<anonymous> (/home/pi/MagicMirror/modules/MMM-SpotifyControl/node_modules/request/request.js:1161:10)
        at emitOne (events.js:116:13)
        at Request.emit (events.js:211:7)
        at IncomingMessage.<anonymous> (/home/pi/MagicMirror/modules/MMM-SpotifyControl/node_modules/request/request.js:1083:12)
      name: 'StatusCodeError',
      statusCode: 404,
      message: '404 - {"error":{"status":404,"message":"Device not found"}}',
      error: { error: { status: 404, message: 'Device not found' } },
      options: 
       { url: 'https://api.spotify.com/v1/me/player/play',
         body: 
          { context_uri: 'spotify:artist:0N1TIXCk9Q9JbEPXQDclEL',
            position_ms: 0 },
         qs: { device_id: 'a8caee9b12196a964f5a...' },
         headers: 
          { Authorization: 'Bearer BQDuIGXWvxdIB5T...' },
         json: true,
         method: 'PUT',
         callback: [Function: RP$callback],
         transform: undefined,
         simple: true,
         resolveWithFullResponse: false,
         transform2xxOnly: false },
      response: 
       IncomingMessage {
         _readableState: 
          ReadableState {
            objectMode: false,
            highWaterMark: 16384,
            buffer: [Object],
            length: 0,
            pipes: null,
            pipesCount: 0,
            flowing: true,
            ended: true,
            endEmitted: true,
            reading: false,
            sync: true,
            needReadable: false,
            emittedReadable: false,
            readableListening: false,
            resumeScheduled: false,
            destroyed: false,
            defaultEncoding: 'utf8',
            awaitDrain: 0,
            readingMore: false,
            decoder: null,
            encoding: null },
         readable: false,
         domain: null,
         _events: 
          { end: [Array],
            close: [Array],
            data: [Function],
            error: [Function] },
         _eventsCount: 4,
         _maxListeners: undefined,
         socket: 
          TLSSocket {
            _tlsOptions: [Object],
            _secureEstablished: true,
            _securePending: false,
            _newSessionPending: false,
            _controlReleased: true,
            _SNICallback: null,
            servername: null,
            npnProtocol: false,
            alpnProtocol: false,
            authorized: true,
            authorizationError: null,
            encrypted: true,
            _events: [Object],
            _eventsCount: 9,
            connecting: false,
            _hadError: false,
            _handle: null,
            _parent: null,
            _host: 'api.spotify.com',
            _readableState: [Object],
            readable: false,
            domain: null,
            _maxListeners: undefined,
            _writableState: [Object],
            writable: false,
            allowHalfOpen: false,
            _bytesDispatched: 479,
            _sockname: null,
            _pendingData: null,
            _pendingEncoding: '',
            server: undefined,
            _server: null,
            ssl: null,
            _requestCert: true,
            _rejectUnauthorized: true,
            parser: null,
            _httpMessage: [Object],
            read: [Function],
            _consuming: true,
            _idleNext: null,
            _idlePrev: null,
            _idleTimeout: -1,
            [Symbol(asyncId)]: 7397,
            [Symbol(bytesRead)]: 555 },
         connection: 
          TLSSocket {
            _tlsOptions: [Object],
            _secureEstablished: true,
            _securePending: false,
            _newSessionPending: false,
            _controlReleased: true,
            _SNICallback: null,
            servername: null,
            npnProtocol: false,
            alpnProtocol: false,
            authorized: true,
            authorizationError: null,
            encrypted: true,
            _events: [Object],
            _eventsCount: 9,
            connecting: false,
            _hadError: false,
            _handle: null,
            _parent: null,
            _host: 'api.spotify.com',
            _readableState: [Object],
            readable: false,
            domain: null,
            _maxListeners: undefined,
            _writableState: [Object],
            writable: false,
            allowHalfOpen: false,
            _bytesDispatched: 479,
            _sockname: null,
            _pendingData: null,
            _pendingEncoding: '',
            server: undefined,
            _server: null,
            ssl: null,
            _requestCert: true,
            _rejectUnauthorized: true,
            parser: null,
            _httpMessage: [Object],
            read: [Function],
            _consuming: true,
            _idleNext: null,
            _idlePrev: null,
            _idleTimeout: -1,
            [Symbol(asyncId)]: 7397,
            [Symbol(bytesRead)]: 555 },
         httpVersionMajor: 1,
         httpVersionMinor: 1,
         httpVersion: '1.1',
         complete: true,
         headers: 
          { 'content-type': 'application/json; charset=utf-8',
            'cache-control': 'private, max-age=0',
            'access-control-allow-origin': '*',
            'access-control-allow-headers': 'Accept, Authorization, Origin, Content-Type, Retry-After',
            'access-control-allow-methods': 'GET, POST, OPTIONS, PUT, DELETE, PATCH',
            'access-control-allow-credentials': 'true',
            'access-control-max-age': '604800',
            'content-length': '76',
            date: 'Fri, 15 Mar 2019 10:27:56 GMT',
            via: '1.1 google',
            'alt-svc': 'clear',
            connection: 'close' },
         rawHeaders: 
          [ 'Content-Type',
            'application/json; charset=utf-8',
            'Cache-Control',
            'private, max-age=0',
            'Access-Control-Allow-Origin',
            '*',
            'Access-Control-Allow-Headers',
            'Accept, Authorization, Origin, Content-Type, Retry-After',
            'Access-Control-Allow-Methods',
            'GET, POST, OPTIONS, PUT, DELETE, PATCH',
            'Access-Control-Allow-Credentials',
            'true',
            'Access-Control-Max-Age',
            '604800',
            'Content-Length',
            '76',
            'Date',
            'Fri, 15 Mar 2019 10:27:56 GMT',
            'Via',
            '1.1 google',
            'Alt-Svc',
            'clear',
            'Connection',
            'close' ],
         trailers: {},
         rawTrailers: [],
         upgrade: false,
         url: '',
         method: null,
         statusCode: 404,
         statusMessage: 'Not Found',
         client: 
          TLSSocket {
            _tlsOptions: [Object],
            _secureEstablished: true,
            _securePending: false,
            _newSessionPending: false,
            _controlReleased: true,
            _SNICallback: null,
            servername: null,
            npnProtocol: false,
            alpnProtocol: false,
            authorized: true,
            authorizationError: null,
            encrypted: true,
            _events: [Object],
            _eventsCount: 9,
            connecting: false,
            _hadError: false,
            _handle: null,
            _parent: null,
            _host: 'api.spotify.com',
            _readableState: [Object],
            readable: false,
            domain: null,
            _maxListeners: undefined,
            _writableState: [Object],
            writable: false,
            allowHalfOpen: false,
            _bytesDispatched: 479,
            _sockname: null,
            _pendingData: null,
            _pendingEncoding: '',
            server: undefined,
            _server: null,
            ssl: null,
            _requestCert: true,
            _rejectUnauthorized: true,
            parser: null,
            _httpMessage: [Object],
            read: [Function],
            _consuming: true,
            _idleNext: null,
            _idlePrev: null,
            _idleTimeout: -1,
            [Symbol(asyncId)]: 7397,
            [Symbol(bytesRead)]: 555 },
         _consuming: true,
         _dumped: false,
         req: 
          ClientRequest {
            domain: null,
            _events: [Object],
            _eventsCount: 5,
            _maxListeners: undefined,
            output: [],
            outputEncodings: [],
            outputCallbacks: [],
            outputSize: 0,
            writable: true,
            _last: true,
            upgrading: false,
            chunkedEncoding: false,
            shouldKeepAlive: false,
            useChunkedEncodingByDefault: true,
            sendDate: false,
            _removedConnection: false,
            _removedContLen: false,
            _removedTE: false,
            _contentLength: null,
            _hasBody: true,
            _trailer: '',
            finished: true,
            _headerSent: true,
            socket: [Object],
            connection: [Object],
            _header: 'PUT /v1/me/player/play?device_id=a8caee9b1219... HTTP/1.1\r\nAuthorization: Bearer BQDuIGXWvxdIB5TBbyg...\r\nhost: api.spotify.com\r\naccept: application/json\r\ncontent-type: application/json\r\ncontent-length: 71\r\nConnection: close\r\n\r\n',
            _onPendingData: [Function: noopPendingOutput],
            agent: [Object],
            socketPath: undefined,
            timeout: undefined,
            method: 'PUT',
            path: '/v1/me/player/play?device_id=a8caee9b12196...',
            _ended: true,
            res: [Circular],
            aborted: undefined,
            timeoutCb: null,
            upgradeOrConnect: false,
            parser: null,
            maxHeadersCount: null,
            [Symbol(outHeadersKey)]: [Object] },
         request: 
          Request {
            domain: null,
            _events: [Object],
            _eventsCount: 5,
            _maxListeners: undefined,
            body: '{"context_uri":"spotify:artist:0N1TIXCk9Q9JbEPXQDclEL","position_ms":0}',
            headers: [Object],
            method: 'PUT',
            readable: true,
            writable: true,
            explicitMethod: true,
            _qs: [Object],
            _auth: [Object],
            _oauth: [Object],
            _multipart: [Object],
            _redirect: [Object],
            _tunnel: [Object],
            _rp_resolve: [Function],
            _rp_reject: [Function],
            _rp_promise: [Object],
            _rp_callbackOrig: undefined,
            callback: [Function],
            _rp_options: [Object],
            setHeader: [Function],
            hasHeader: [Function],
            getHeader: [Function],
            removeHeader: [Function],
            localAddress: undefined,
            pool: {},
            dests: [],
            __isRequestRequest: true,
            _callback: [Function: RP$callback],
            uri: [Object],
            proxy: null,
            tunnel: true,
            setHost: true,
            originalCookieHeader: undefined,
            _disableCookies: true,
            _jar: undefined,
            port: 443,
            host: 'api.spotify.com',
            url: [Object],
            path: '/v1/me/player/play?device_id=a8caee9b12196...',
            _json: true,
            httpModule: [Object],
            agentClass: [Object],
            agent: [Object],
            _started: true,
            href: 'https://api.spotify.com/v1/me/player/play?device_id=a8caee9b12196a96...',
            req: [Object],
            ntick: true,
            response: [Circular],
            originalHost: 'api.spotify.com',
            originalHostHeaderName: 'host',
            responseContent: [Circular],
            _destdata: true,
            _ended: true,
            _callbackCalled: true },
         toJSON: [Function: responseToJSON],
         caseless: Caseless { dict: [Object] },
         read: [Function],
         body: { error: [Object] } } }
    
    
    

    The result is perfect.
    But I get error 404, Device not found. I try while I listen to music on my laptop and my magic mirror with raspotify, and I get the same error.
    I have edit my deviceID and my Authorization in the code for privacy.

    EDIT:

    I think I know what is the problem.
    I have tried with two devices, and it don’t work. But when I try it with the device which is the deviceID that I wrote in the module code, it works.

    If I don’t say a command before, I get error 404.

    Working:

    [AMK2] end-of-utterance
    [AMK2] Transcription: para la música  --- Done: true
    { requestId: '5c883e4a-0000-24fa-b7be-...' } { profileFile: 'default.json', lang: 'es-ES' }
    [AMK2] Device Action: { requestId: '5c883e4a-0000-24fa-b7be-...' }
    [AMK2] Assistant Text Response: 
    [AMK2] Conversation Completed
    [HOTWORD] begins listening.
    Refreshed access token because it has expired. Expired at: 11:45:40 now is: 11:48:02
    [HOTWORD] <<  espejito  >> is detected. //My hotword
    [HOTWORD] stops listening
    [AMK2] assistant ready
    [AMK2] Conversation starts.
    [AMK2] Assistant Text Response: 
    [AMK2] end-of-utterance
    [AMK2] Transcription: Rafa Pons en Spotify  --- Done: true
    [AMK2] openSpotify found: https://open.spotify.com/artist/0DnmOp2SUaeavTi6a32pGY
    { requestId: '5c884094-0000-27db-94c8-...' } { profileFile: 'default.json', lang: 'es-ES' }
    [AMK2] Device Action: { requestId: '5c884094-0000-27db-94c8-...' }
    [AMK2] Assistant Text Response: 
    play on: a8caee9b12196a964f5a9b0fafaf7ef1
    [HOTWORD] begins listening.
    
    
    posted in Entertainment
    F
    F17MC
    Mar 15, 2019, 10:34 AM
  • RE: MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.

    @ejay-ibm yes, with YouTube it works. But with Spotify no. I try with “artist + song Spotify”, “artist + song on Spotify” etc. Always run the video in YouTube.

    posted in Entertainment
    F
    F17MC
    Mar 14, 2019, 9:19 PM
  • RE: MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.

    @ejay-ibm I thought your module only works to play/stop/next/previous. I have tried run “Bob Marley Spotify” and nothing happens. With other artist the same.
    If I can test something…
    Pd: Spanish + Spotify premium

    posted in Entertainment
    F
    F17MC
    Mar 14, 2019, 4:59 PM
  • RE: MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.

    Awesome! I have installed it and it works, but… I have a problem with MMM-AssistantMk2 + your module.

    MMM-AssistantMk2 is working. I say: Smartmirror, play music on Spotify (my command). And it works.

    But, later, if I want to say something to MMM-AssistantMk2, I can’t.

    It’s my log:

    [HOTWORD] stops listening
    Speaker error: 1
    Whoops! There was an uncaught exception...
    1
    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    

    Maybe the problem is that if the speakers are using by other “process”, MMM-AssistantMk2 have a problem to use?
    Anyway, it is perfect . I’m testing…

    posted in Entertainment
    F
    F17MC
    Mar 13, 2019, 10:59 PM
  • RE: [MMM-MusicOnDemand] - Play music from deezer with a browser in the background

    @ejay-ibm said in [MMM-MusicOnDemand] - Play music from deezer with a browser in the background:

    Fantastic !
    I’m preparing as well a stand alone module to control spotify with the mk2 assistant as well . I should be able to release and share in a couple of days . I just need to fix one big bug and it will be OK .
    Thanks for your module We will have all we need to control music with our mirror !
    so cool

    Ejay

    Wow! That is fantastic!
    I have a question. I’m living in Spain, and I’m using a Spotify account from other country.
    All works fine, and I don’t need VPN to play my music.
    Do you think that I could be able to use my Spotify account with your module?

    Thanks!

    posted in Entertainment
    F
    F17MC
    Mar 12, 2019, 3:14 PM
  • RE: Spotify Play?

    @mantha Hi! How can I install this feature?
    I want launch Spotify with my MagicMirror. I have installed NowPlayingOnSpotify, AssistantMK2 and Raspotify. All works fine.
    Now, I can do the next: If I said to AssistantMK2 “SmartMirror, play Spotify on Chromecast Audio”, it launch raspotify and select my ChromeCast Audio as output. Do you think that it is possible?

    Sorry for my English.

    posted in Bug Hunt
    F
    F17MC
    Mar 6, 2019, 8:26 PM
  • RE: How to start MM with a module as default hidden

    @sean said in How to start MM with a module as default hidden:

    @f17mc
    You can show modules hidden by others by force with MMM-AssistantMk2.
    modify your command(using moduleExec) like this.

    exec: (module, params, key) => { 
            module.hide(1000, {"force":true})
     }
    

    it works perfect! Thanks a both!

    posted in Troubleshooting
    F
    F17MC
    Feb 8, 2019, 5:01 PM
  • RE: How to start MM with a module as default hidden

    @thestigh said in How to start MM with a module as default hidden:

    I used sendNotification to resolve this :)

    Could you show me how?? I’m using MMM-AssistantMk2 and I can hide and show modules with voice. But I want set another modules hidden by default, and show it by voice.
    If I set the modules hidden by MMM-remote-control I can’t show it by mmm-assistantmk2.

    posted in Troubleshooting
    F
    F17MC
    Feb 8, 2019, 3:42 PM
  • 1 / 1
Enjoying MagicMirror? Please consider a donation!
MagicMirror created by Michael Teeuw.
Forum managed by Sam, technical setup by Karsten.
This forum is using NodeBB as its core | Contributors
Contact | Privacy Policy