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

    Posts

    Recent Best Controversial
    • RE: Advise for a voice assistant

      @bibi Hi,
      I would definitely recommend Mk2assistant + Hotword module.
      Ejay

      posted in General Discussion
      ejay-ibmE
      ejay-ibm
    • RE: MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.

      @wishmaster270 Thank you let me know your feedback once tested !

      posted in Entertainment
      ejay-ibmE
      ejay-ibm
    • MMM-SpotifyControl . Control your Spotify music player using Mk2 assistant.

      Description

      A module to control spotify command : Play / Pause / Resume/ Next using Mk2assistant hook .

      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.

      Special thanks to @mantha who bring this idea and the base code to me.
      Big Thanks to @Sean who helped me in the module development and spent a lot of time to teach me some dev concept.

      Please bear in mind: I’m not a developer and the module might still contain issues.
      I’ll try my best to fix them but if any dev wants to help me in that task or want to help me improve this module you are more than welcome!

      Enjoy

      Ejay

      Download

      [card:ejay-ibm/MMM-SpotifyControl]

      posted in Entertainment
      ejay-ibmE
      ejay-ibm
    • RE: [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

      posted in Entertainment
      ejay-ibmE
      ejay-ibm
    • RE: Total Newbie 24" MagicMirror (Munich, Germany)

      @zdenek Very nice looking and result.

      As often in mirror showcase, the back is not shown ( yes that’s often the ugly part as well I know :) ) but I think it is interesting to see how all hardware are implemented in the back .

      Would you mind to share some pictures of the back ?

      Thanks

      posted in Show your Mirror
      ejay-ibmE
      ejay-ibm
    • RE: MMM-Volume

      @wishmaster270 Thanks for the improvement you bring to the module
      The fading is a cool thing to have

      I have raised a new issue with the new implementation in the code :
      https://github.com/eouia/MMM-Volume/issues/6

      I think Sean didn’t get time yet to look at it yet. So if you can help that’s welcome :)

      Ejay

      posted in Utilities
      ejay-ibmE
      ejay-ibm
    • RE: Strange line in the middle of the monitor

      @Vauxdvihl then I would simply raise a git issue to the dev.
      I don’t know this module, but I would say at first it come from the css, I might be worng.
      Other user of the module can probably help better , but I think the dev can figure this out quickly

      Ejay

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Strange line in the middle of the monitor

      I would suggest to comment your modules one by one to find out the culprit .
      Once target found it will be easier to debug .

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Can't get pm2 to auto launch after reboot

      @gmgarcia719 said in Can't get pm2 to auto launch after reboot:

      pm2 start mm.sh
      pm2 save

      instead try
      pm2 start mm

      pm2 save

      ejay

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: MMM-Assistantmk2 and MMM-Hotword not picking up

      @bachoo786
      The notification allows to the hotword module to receive instruction from the assistant module by notification to pause or resume itself in the right time.
      When assistant 'talk it pause the hotword detection
      ASSISTANT_ACTIVATED: “HOTWORD_PAUSE”,
      When the assistant is done it restart the hotword detection .
      ASSISTANT_DEACTIVATED: “HOTWORD_RESUME”,

      Ejay

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Spotify Play?

      Ok I made a few changes in the MK2assistant node-helper.js

      var re = new RegExp("https:\/\/open\.spotify\.com\/([a-zA-Z0-9?\/]+)", "gm")
              //var re = new RegExp("\\(.open\\.spotify\\.com – (https:\\/\\/open\\.spotify\\.com[^ ]*).\\)", "gm")
              var openSpotify = re.exec(str)
              if (openSpotify) {
              console.error("[AMK2] openSpotify found:", openSpotify[0])
                foundOpenSpotify = openSpotify[0]
              
      

      And as well in Nowplayingoncpotify/core/Spotifyconnector.js

      let uri = replaceall("/", ":", url.replace("https:\/\/open.spotify.com", "spotify"));
      

      The slash were not escaped in the url making half of the line be a comment.

      After updating raspotify to the latest I can say : “Michael Jackson on spotify” and the song start playing .
      Good stuff .

      I’m wondering if slash should be escaped as well here I haven’t do it since it’s working :

      const tokenRefreshEndpoint = 'https://accounts.spotify.com/api/token';
      const apiEndpoint = 'https://api.spotify.com/v1/me/player';
      

      As you can see the editor consider the part after the slash as comment

      0_1552119557018_Capture d’écran 2019-03-09 à 09.18.38.png
      Not sure how it works on interpretor side.

      anyway I’ll post my update in the repo .

      Ejay

      posted in Bug Hunt
      ejay-ibmE
      ejay-ibm
    • RE: MMM-Assistantmk2 and MMM-Hotword not picking up

      Hi,

      1- I would say first to check you CPU charge first , the delay might be due to the load.
      2- just say " Jarvis" … " Micheal jackson smooth criminal" it will play the youtube video clip
      3- if you want to say " ok google" you have to add your own umdl or umdp file.

      Info and new umd* file can be found and created here :
      https://snowboy.kitt.ai/

      hope this help .

      Ejay

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • RE: Spotify Play?

      @mantha
      Sorry typo it well respond with

      open.spotify.com - https...
      

      I have try :

       var re = new RegExp("https:\/\/open\.spotify\.com\/([^ ]*)", "gm")
              var openSpotify = re.exec(str)
              if (openSpotify) {
                console.error("[AMK2] openSpotify found:", openSpotify[1])
                foundOpenSpotify = openSpotify[1]
      

      And I’m getting in console log :

      received a module notification: PLAY_SPOTIFY from sender: MMM-AssistantMk2

      but

      var re = new RegExp("\\(.open\\.spotify\\.com – (https:\\/\\/open\\.spotify\\.com[^ ]*).\\)", "gm")
      

      I’m not getting anything.

      What is strange is that in both case :
      console.error(“[AMK2] openSpotify found:”, openSpotify[1])

      Doesn’t throw anything…
      but as well
      console.log(“[AMK2] video found:”, youtubeVideo[1])
      Doesn’t throw anything either even when it find and play a video. so i’ll not worry for not about the notif logs

      So, for Now, I consider it’s working as PLAY_SPOTIFY notification is fired.

      What would be the next step now?

      Ejay

      posted in Bug Hunt
      ejay-ibmE
      ejay-ibm
    • RE: Spotify Play?

      As well I think the regex is not correct here : node_helper.js line 290

      var re = new RegExp("\\(.open\\.spotify\\.com – (https:\\/\\/open\\.spotify\\.com[^ ]*).\\)", "gm")
      

      should be :

      var re = new RegExp("\(open\.spotify\.com – (https:\/\/open\.spotify\.com[^ ]*\/\)", "gm")
      
      open\.spotify\.com
      

      is the correct regex to match with :
      open.spotify.com
      and

      https:\/\/open\.spotify\.com[^ ]*\/
      

      is the correct regex to match with :
      https://open.spotify.com/fallback1234

      I may be wrong in my interpretation.

      posted in Bug Hunt
      ejay-ibmE
      ejay-ibm
    • RE: Spotify Play?

      @mantha none of both found .
      could you point me to the line in your code sending this to the console log please ?
      I see in MK2 js code

      if (payload.foundOpenSpotify) {
      		this.sendNotification("PLAY_SPOTIFY", {
      			url: payload.foundOpenSpotify
      		})
          };
      

      I can say that the notification is not sent, so no payload.foundOpenSpotify occur

      I can see as well in node_helper.js

      if (openSpotify) {
                console.error("[AMK2] openSpotify found:", openSpotify[1])
                foundOpenSpotify = openSpotify[1]
              }
            })
      

      Why in console error instead of console log ?
      ( Sorry i’m not a dev might be a silly question and I guess the result would be the same if log or error it should be sent to the console… )

      posted in Bug Hunt
      ejay-ibmE
      ejay-ibm
    • RE: Spotify Play?

      Ok I see the answer coming to the screen but it look like it’s not passed to the module.

      "Micheal Jackson on spotify" ((open.spotify.com -- https://open.spotify.com/artist/3fMbdgg4jU18AjLCKBhRSm))\nMichael Jackson wasn't merely the biggest pop .... 
      

      Let me know if you need me to run some test or report logs to help you in debug.

      Ejay

      posted in Bug Hunt
      ejay-ibmE
      ejay-ibm
    • RE: Spotify Play?

      @mantha Thank you for working on this !

      I have installed you modules.

      Unfortunately I can’t make the player respond to my play / stop command .
      the player well respond when I select a song from my phone and send it to raspotify , the module is well updated with cover and paying status .

      But voice command just doesn’t work .

      Anything particular I should say ?
      Maybe your developement is just done 100% done yet.

      Thank you

      Ejay

      posted in Bug Hunt
      ejay-ibmE
      ejay-ibm
    • RE: MMM-AI

      If you have any idea on standby/talk animation I can create for this module feel free to propose them !
      I’m planning to make an ‘HAL’ one
      based on this image :
      0_1551897653917_merlin_135847308_098289a6-90ee-461b-88e2-20920469f96a-articleLarge.jpg

      Ejay

      posted in Fun & Games
      ejay-ibmE
      ejay-ibm
    • MMM-AI

      Hello guys,

      This is my first module !
      Well I give most of the credit to @sean who created the code as i’m not a dev at all .

      What I did is taking MMM-TriggerNotification and MMM-HTMLBox, and merge those 2 modules in one to create mine based on the idea I had.

      https://github.com/ejay-ibm/MMM-AI

      MMM-AI

      MMM-AI is a simple module based on a mix of MMM-NotificationTrigger & MMM-HTMLBOX from eouia that allow to have animation of ‘AI’ kind when the assistant ( Alexa / MMM-Mk2assistant ) is in standby mode ( waiting for user instruction) or talking mode ( when assistant is replying ) triggered by Notification sent by these modules.

      Screenshot

          Standby animation                     Talking animation
      

      0_1551885191851_b8619853-b0eb-48ed-abbb-4f2d2ec7aca0-image.png

      Full gif here :
      https://github.com/ejay-ibm/MMM-AI/blob/master/jarvis-standby2.gif
      https://github.com/ejay-ibm/MMM-AI/blob/master/jarvis-talk2.gif

      alt text

      Installation

      In the MagicMirror/modules directory run :

      git clone https://github.com/ejay-ibm/MMM-AI.git
      

      Configuration Sample

      {
            module: "MMM-AI",
            position: "top_center",
            config: {
              width: "300px",
              height: "300px",
              refresh_interval_sec: 0, // you should not refresh, because content will be back to default value.
              content: `<img id="MY_ANIMATION" src="modules/MMM-AI/jarvis-standby2.gif"/>`,
              triggers: [
                {
                  trigger: "HOTWORD_RESUME", // HOTWORD_LISTENING if you use MMM-HOTWORD  or HOTWORD_RESUME if you use MMM-AssistantMk2
                  fires: [
                    {
                      fire: "standby_Image",
                      payload: payload => {
                        var img = document.getElementById("MY_ANIMATION");
                        img.src = "modules/MMM-AI/jarvis-standby2.gif";
                        return payload;
                      }
                    }
                  ]
                },
      		{
                  trigger: "ASSISTANT_UNDERSTOOD", // HOTWORD_SLEEPING if you use MMM-HOTWORD  or HOTWORD_PAUSE if you use MMM-AssistantMk2
                  fires: [
                    {
                      fire: "Talk_Image",
                      payload: payload => {
                        var img = document.getElementById("MY_ANIMATION");
                        img.src = "modules/MMM-AI/jarvis-talk2.gif";
                        return payload;
                      }
                    }
                  ]
                }
              ]
            }
          },
      
      

      Additional Info

      please make sure you are up to date on the Mk2 assistant module for this module to work as expected
      All other configuration sample from https://github.com/eouia/MMM-HTMLBOX & https://github.com/eouia/MMM-NotificationTrigger are applicable to this module.

      Thanks again to Sean : https://github.com/eouia/ who have created this code that I have merged for this module purpose.
      Animated images are created by me using crazy talk and Photoshop I will work to create additional ones.

      posted in Fun & Games
      ejay-ibmE
      ejay-ibm
    • RE: MMM-Assistantmk2 and MMM-Hotword not picking up

      install audacity and give a quick test to your mic.
      you will know if you mic is dead

      sudo apt-get install audacity

      posted in Troubleshooting
      ejay-ibmE
      ejay-ibm
    • 1 / 1