Anonym-tsk / MMM-YouTube

MagicMirror module for youtube player with runtime configuration and controllable by notification.
MIT License
14 stars 4 forks source link

MMM-AssistantMk2 doesn't play videos #9

Closed arjunalwe closed 4 years ago

arjunalwe commented 4 years ago

In fact, it doesn't do anything other than show me a link.

I'm using the default config file and that's it. I've also added the words with-MMM-Youtube.js to the recipe section of the MMM-AssistantMk2 part in the config file. Here they are:

      module: "MMM-AssistantMk2",
      position: "fullscreen_above",
      config: {
        ui: "Fullscreen",
        assistantConfig: {
          latitude: 43.770978,
          longitude: -79.344643,
        },
        micConfig: { // put there configuration generated by auto-installer
          recorder: "arecord",
          device: "plughw:1",
        },
        recipes: [ "with-MMM-Hotword.js", "with-MMM-YouTube.js"],
        profiles: {
          "default": {
        profileFile: "default.json",
        lang: "en-US"
        }
          },
       },
    },

    {
      module: "MMM-YouTube",
      position: "top_right",
    },

I've also monitored both the terminal and the npm start dev stream and nothing seems to be out of the ordinary

eouia commented 4 years ago

So, tell me what you did and what you expected and what you got.

arjunalwe commented 4 years ago

From my understanding, when I asked my Google Assistant to play something on YouTube, it was supposed to play the thing I asked it to. I asked it to play something by saying "Play x on YouTube" or "YouTube play x". However, neither variation worked and the Google Assistant simply froze until it timed out and deactivated

arjunalwe commented 4 years ago

Sorry I took so long to respond btw

eouia commented 4 years ago

On SDK level YouTube feature is not supported. Instead, We've added some trick. When you search some terms like "Michael Jackson Thriller", and the search result(screenOutput response) has a link of youtube, The link will be transferred to MMM-YouTube module than will be played if playable.

arjunalwe commented 4 years ago

Ok it shows me the link now but MMM-YouTube doesn't play it

eouia commented 4 years ago

There could be some reason which could not be playable. Most cases will be Error:150, Not allowed to play outside of Youtube. Anyway, you'd better show me the backend and frontend log to know what happened.

arjunalwe commented 4 years ago

This is the terminal output after I said "Thriller":

[11:45:55.456] [LOG] [HOTWORD] begins. [11:45:55.458] [LOG] [HOTWORD] Detector starts listening. [11:46:04.208] [LOG] [HOTWORD] Detected: SMARTMIRROR [11:46:04.942] [LOG] [HOTWORD] After Recording: 4000 [11:46:05.210] [LOG] [HOTWORD] After Recording: 4000 [11:46:05.230] [LOG] [HOTWORD] After Recording: 4000 [11:46:05.440] [LOG] [HOTWORD] After Recording: 8000 [11:46:05.699] [LOG] [HOTWORD] After Recording: 8000 [11:46:05.944] [LOG] [HOTWORD] After Recording: 8000 [11:46:06.187] [LOG] [HOTWORD] After Recording: 4000 [11:46:06.201] [LOG] [HOTWORD] After Recording: 4000 [11:46:06.433] [LOG] [HOTWORD] After Recording: 4000 [11:46:06.445] [LOG] [HOTWORD] After Recording: 4000 [11:46:06.701] [LOG] [HOTWORD] After Recording: 4000 [11:46:06.730] [LOG] [HOTWORD] After Recording: 4000 [11:46:06.934] [LOG] [HOTWORD] After Recording: 4000 [11:46:06.947] [LOG] [HOTWORD] After Recording: 4000 [11:46:08.168] [LOG] [HOTWORD] stops. [11:46:08.171] [LOG] [HOTWORD] After Recording finised. size: 68050 [11:46:08.176] [LOG] [HOTWORD:B2W] WAV_FILE_CREATED: /home/pi/MagicMirror/modules/MMM-Hotword/temp/afterRecording.wav 68050 [11:46:08.177] [LOG] [HOTWORD] Final Result: { detected: true, hotword: 'SMARTMIRROR', file: 'temp/afterRecording.wav' } [11:46:12.378] [LOG] [HOTWORD] begins. [11:46:12.380] [LOG] [HOTWORD] Detector starts listening.

The output for this was a link to the video, however, nothing played.

The window that opens after you type npm start dev showed nothing remotely related to MMM-YouTube either

eouia commented 4 years ago

Set debug:true on AMK2. It will show more detailed log.

eouia commented 4 years ago

And Front log will be needed. I think your issue lies on Front end not back end.

arjunalwe commented 4 years ago

How do I access that?

arjunalwe commented 4 years ago

Nvm it works

arjunalwe commented 4 years ago

It was just a stupid typo in the recipe config

arjunalwe commented 4 years ago

Sorry I wasted your time