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

    smassy

    @smassy

    0
    Reputation
    220
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    smassy Unfollow Follow

    Latest posts made by smassy

    • RE: Almost done need to active my mirror by Phrase

      @otto

      I think you can do that but it’s going to be painful since the mirror will listen and react to everything people say near him. The magic word (jarvis, mirrror mirror,etc…) is a safeguard to that behavior.

      posted in Troubleshooting
      S
      smassy
    • RE: Almost done need to active my mirror by Phrase

      @otto

      In config.js

       {
                              module: "MMM-AssistantMk2",
                              position: "top_right",
                              config: {
                                   // --- ESSENTIALS / modifying for your environment might be needed.
                                  deviceLocation: {
                                      coordinates: { // set the latitude and longitude of the device to get localized information like weather or time. (ref. mygeoposition.com)
                                          latitude: 45.6307, // -90.0 - +90.0
                                          longitude: -72.9563, // -180.0 - +180.0
                                      },
                                  },
                                  recipes: ["hide_and_show_all_modules.js","playlist.js","volume.js"],
                                  defaultProfile: "default", // If you have several profiles and want to set one of them as default profile, describe here.
                                  profiles: {
                                      "default" : { // profile name.
                                          profileFile: "default.json", // profile file name.
                                          lang: "fr-CA"
                                          //currently available (estimation, not all tested):
                                          //  de-DE, en-AU, en-CA, en-GB, en-US, en-IN
                                          // fr-CA, fr-FR, it-IT, ja-JP, es-ES, es-MX, ko-KR, pt-BR
                                          // https://developers.google.com/assistant/sdk/reference/rpc/languages
                                      },
                                      /* Add your other profiles here, if exists.
                                      "other_profile" : {
                                          profileFile: "other.json",
                                              lang: "de-DE"
                                          }
                                      */
                                  },
                                  record: { // Full values are in `FOR EXPERTS` section.
                                       recordProgram: "arecord",  // Defaults to "arecord" - also supports "rec" and "sox"
                                       device: "plughw:1"       // recording device (e.g.: "plughw:1")
                                  },
                                  notifications: {
                                      ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
                                      ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
                                  },
                                  play: { // Full values are in `FOR EXPERTS` section.
                                      playProgram: "mpg321", // recommended.
                                  },
                                  // --- OPTIONAL / not important but customizable for your usage
                                  responseVoice: true, // If available, Assistant will response with her voice.
                                  responseScreen: true, // If available, Assistant will response with some rendered HTML
                                  responseAlert: true, // If available, Assistant will response with Alert module of MM
                                  // Sometimes, any response might not be returned. responseAlert is useful for displaying error.
                                  screenZoom: "80%", // Adjust responseScreen to your mirror size.
                                  screenDuration: 0, // milliseconds. How long responseScreen will be shown after speech.
                                  //If you set 0, Screen Output will be closed after Response speech finishes ASAP.
                                  youtubeAutoplay: true, //If set as true, found Youtube video will be played automatically.
                                  pauseOnYoutube:true, //If set as true, You cannot activate Assistant during youtube playing.
                                                       //Recommended for the performance (Because permanent hotword detecting might make performance lower)
                                  youtubePlayerVars: { // You can set youtube playerVars for your purpose, but should be careful.
                                      "controls": 0,
                                      "loop": 1,
                                      "rel": 0,
                                  },
      youtubePlayQuality: "default", //small, medium, large, hd720, hd1080, highres or default
                                  useWelcomeMessage: "", //Try "brief today" as this value. You can use this value to check module working when MM is starting.
                                  onIdle: {
                                  //timer: 1000*60*30, // if you don't want to use this feature, just set timer as `0` or command as ""
                                  //command: "HIDEMODULES",
                                     timer: 0,
                                     command: null,
                                  },
                                  onActivate: {
                                      timer: 0,
                                      //command: "SHOWMODULES"
                                      command: null,
                                  },
                              },
                          },
      
      posted in Troubleshooting
      S
      smassy
    • RE: Volume control

      Last time I bug you with that I promise.:smiling_face_with_halo:

      I fixed it that way

            case this.config.notifications.VOLUME_DOWN:
              var vol = parseInt(this.currentVolume) - curUpDownScale
              if (vol < 0) vol = 0
              this.sendSocketNotification(this.config.notifications.VOLUME_SET, vol)
              break
            case this.config.notifications.VOLUME_UP:
              var vol = parseInt(this.currentVolume) + curUpDownScale
              if (vol > 100) vol = 100
              this.sendSocketNotification(this.config.notifications.VOLUME_SET, vol)
              break
      

      By adding the parseInt to make sure that it’s an integer.

      All working fine now!!

      Thank again, really like your module!

      posted in Utilities
      S
      smassy
    • RE: Volume control

      @Sean

      Just to let you know.

      the ‘-M’ did not fixed the volume problem. I found out ,using the console, that the variable, for an unknown reason, when I use ‘VOLUME_SET’ followed by ‘VOLUME_UP’ it append the current volume number and the updownscale instead of doing the addition.

      using volume_set 50 and updownscale 10

      Console:

      Block
            curUpDownScale: 10
            vol: "5010"
      

      But when I use ‘VOLUME_SET’ followed by ‘VOLUME_DOWN’ it work with no issue. Also in that order I can use ‘VOLUME_UP’ after…

      I also realized that the vol number is not between double quote

      Block
            curUpDownScale: 10
            vol: 40
      

      Still looking to find where it breaks

      posted in Utilities
      S
      smassy
    • RE: Almost done need to active my mirror by Phrase

      @otto

      The way I did it is by using MMM-Assistantmk2, hotword and google voice reco. There is an already build ‘recipe’ in Assistantmk2 that do what you want.

      The module is hide_and_show_all_modules.js

      var recipe = {
        transcriptionHook: {
          "HIDE_ALL_MODULES": {
            pattern: "Go to sleep",
            command: "HIDEMODULES"
          },
          "SHOW_ALL_MODULES": {
            pattern: "Wake up",
            command: "SHOWMODULES"
          },
        },
        command: {
          "HIDEMODULES": {
            moduleExec: {
              module:()=>{
                return []
              },
              exec: (module, params, key) => {
                module.hide(1000, null, {lockString:"AMK2"})
              }
            }
          },
          "SHOWMODULES": {
            moduleExec: {
              module:()=>{
                return []
              },
              exec: (module, params, key) => {
                module.show(1000, null, {lockString:"AMK2"})
              }
            }
          },
        },
      }
      
      exports.recipe = recipe
      

      In your config.js file , within the MMM-AssistantMk2 section, there is a line where you have to put all your ‘recipes’

      recipes: ["hide_and_show_all_modules.js","playlist.js","volume.js"],
      

      When I say ‘Jarvis Go to sleep’ my screen goes black and then when I say ‘Jarvis Wake up’ all my modules appear.

      For the record I’m french :smiling_face: so the phrases there are not the one I’m using, it may need some test so you don’t use google reserved words.

      posted in Troubleshooting
      S
      smassy
    • Volume control

      Re: MMM-Volume

      @Sean

      Hello, just got the volume part to work but when I tested it I got a strange behavior.

      first my code:

      This is the content of my recipe file in MMM-AssistantMK 2
      (https://github.com/eouia/MMM-AssistantMk2/)

      var recipe = {
          transcriptionHook: {
              "volume_down": {
                  pattern: "Baisse le volume", 
                  command: "volume_down"
              },
              "volume_up": {
                  pattern: "Monte le volume",
                  command: "volume_up"
              },
              "volume_set": {
                  pattern: "Volume ([0-9]{1,2}[0]?|100) %",
                  command: "volume_set"
              },
      
          },
          command: {
              "volume_down": {
                  notificationExec: {
                      notification: "VOLUME_DOWN",
                  }
              },
              "volume_up": {
                  notificationExec: {
                      notification: "VOLUME_UP",
                  }
              },
              "volume_set": {
                  notificationExec: {
                      notification: "VOLUME_SET",
                      payload: (params, key) => {
                          return params[1];
                      }
                  }
              },
          },
      }
      exports.recipe = recipe
      

      When I call to Up/down volume it work fine (with a 10 updownscale) It break when I call VOLUME_SET to set it to a specific level (let say 30) and then if I call VOLUME_UP it goes straight to 100 but If I call VOLUME_DOWN first it will work perfectly and go to 20.

      I missed something?

      Thank you!

      posted in Utilities
      S
      smassy
    • RE: MMM-SmartWebDisplay : display web contents (including YouTube) on your MM

      @AgP42

      Hello again, I’m trying to use the embeded calls “SWD_…” but there is something I’m not getting.

      var recipe = {
        transcriptionHook: {
          "playlist_sylvain": {
            pattern: "liste sylvain",
            command: "playlist_1"
          },
          "playlist_lewis": {
            pattern: "liste lewis capaldi",
            command: "playlist_2"
          },
          "playlist_pause": {
            pattern: "arrêt lecture",
            command: "playlist_pause"
          },
          "playlist_play": {
            pattern: "démarre lecture",
            command: "playlist_play"
          },
      
        },
        command: {
           "playlist_1": {
                   notificationExec: {
                           notification: "SWD_URL",
                           payload: {
                                   url:["https://www.youtube.com/embed/0-rG98j2DWE?list=PLa51J4RKCoTXCfr-qubj2FUgPADypF3Gk&autoplay=1"],
                           }
                   }
           },
           "playlist_2": {
                   notificationExec: {
                          notification: "SWD_URL",
                          payload: {
                                  url:["https://www.youtube.com/embed/bCuhuePlP8o?list=RDEMsPjiovzEgfLLK2w1FvFTOg&autoplay=1"],
                          }
                   }
           },
           "playlist_pause": {
                   notificationExec: {
                          notification: "SWD_PAUSE",
                          }
                   },
           "playlist_play": {
                   notificationExec: {
                          notification: "SWD_PLAY",
                          }
                   },
           },
      }
      
      exports.recipe = recipe
      

      Lists are starting correctly but when calling SWD_PAUSE it’s doing nothing and SWD_PLAY restart the list at beginning. Any clue?

      posted in Utilities
      S
      smassy
    • RE: MMM-SmartWebDisplay : display web contents (including YouTube) on your MM

      @sdetweil

      Yes, I restarted my Pi and normal link is playing video now
      https://www.youtube.com/embed/JGwWNGJdvx8?autoplay=1

      ~~My playlist is still not working
      https://www.youtube.com/embed/0-rG98j2DWE?list=PLa51J4RKCoTXCfr-qubj2FUgPADypF3Gk?autoplay=1~~

      scratch that it’s working!!! :-) something must needed a refresh in the services

      posted in Utilities
      S
      smassy
    • RE: MMM-SmartWebDisplay : display web contents (including YouTube) on your MM

      @sdetweil

      Ok I finally got that you were talking about magic mirror, yes it’s 2.8.0. But does it affect smartwebdisplay? I thought the module was independent.

      posted in Utilities
      S
      smassy
    • RE: MMM-SmartWebDisplay : display web contents (including YouTube) on your MM

      @AgP42

      Good news, I was able to make it work thanks to you! But…there is a but… The youtube link with autoplay is not working :-(

      This simple url
      https://www.youtube.com/embed/JGwWNGJdvx8?autoplay=1

      Will give you ‘video unavailable’ error, remove the autoplay tag and it will show (not play).

      Trying to find out how to make it work and I will post my config as soon as I get the hang of it.

      See ya!

      posted in Utilities
      S
      smassy