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

    Posts

    Recent Best Controversial
    • RE: Module Position

      @maxbachmann

      // get the module to move with it's identifier
      var clock = document.getElementById('module_0_clock');
      
      // append it to the region you like
      document.querySelector('div.region.top.left div.container').appendChild(clock);    
      

      it will work only if you already have a module in that position, otherwise you need to ovverride the style to display block

      document.querySelector('div.region.top.left div.container').style.display = 'block';
      

      that’s it

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: GasBuddy

      @dherl0623 you should log the response of gasbuddy, sounds like you are not getting a valid json response from the api

      posted in Requests
      strawberry 3.141S
      strawberry 3.141
    • RE: Module Position

      @maxbachmann no, you would get the module itself, the wrapper has an id with the identifier of the module, then you would get the wrapper of the position and would call appendChild with your module

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: Module Position

      @maxbachmann there is now magicmirror api for it, but you could manipulate the dom and set the module in a different region manually.

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: Midori white screen (Raspberry Pi Zero W)

      @meyraa from what i heard in the forum here, the users of the pi zero reported all that midori is the only browser on this pi that has no performance issues. The advantage of the chromium browser is that it is completely compatible, as electron internally uses the chromium project.

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: Midori white screen (Raspberry Pi Zero W)

      @meyraa midori has problems with es6. did you try to deactivate all modules and activate one by one again to see if there is a module that is using es6?

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: Firing off Javascript after getDom elements have drawn on the page

      @jetnet the only hook that I’m aware off is when the getdom function gets executed the first time, then you could work with MODULE_DOM_CREATED or DOM_OBJECTS_CREATED, but for me it sounds like you are looking for something that gets triggered everytime the dom gets updated not just once.

      https://github.com/MichMich/MagicMirror/tree/master/modules#notificationreceivednotification-payload-sender

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: Debugging

      @Sputnik could be the updatenotification module, which is probably not able to read a modules git config. Did you download modules manually or did you use git clone?

      posted in Development
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-voice

      @ime90 can you check the .lm and .dic files in your module folder and see if they are empty or include your commands

      posted in Utilities
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-voice for Brits!

      @joe84maiden be aware, that when you add more modules for voice recognition, the module will create a new dictionairy automatically. So all your adjustments would be lost if you don’t backup them somewhere ;)

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-voice

      @dmwilsonkc if you run your mycroft core from the node helper as i do with pocketsphinx in voice then there is no need at all to mess with the socket server

      posted in Utilities
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-voice

      @dmwilsonkc I did MMM-Mobile for my bachelor thesis to connect to the MagicMirror via mobile and be able to control and change config of it, the qr code was meant for pairing the devices, so not everyone is able to hook into my socket channel and send commands. But you have to be aware of the differences between socket notifications and normal notifications. socket notifications describe only the communication between your module and his node_helper (or in my case the mobile app, because I extended the socket server), but this gives you no communication with other modules like the clock. Therefore you need normal notifications which describe the communication between modules and the core MM. Be aware of that those notifications can only be sent via the module not the node_helper.

      My workflow was like this. Node_helper extends socket server. Mobile send command to node_helper, then the node_helper sends it to the module and the module broadcasts it to all other modules.

      https://github.com/MichMich/MagicMirror/blob/master/modules/README.md#thissendnotificationnotification-payload
      https://github.com/MichMich/MagicMirror/blob/master/modules/README.md#thissendsocketnotificationnotification-payload

      posted in Utilities
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-voice

      @dmwilsonkc the module has a socket like https://github.com/MichMich/MagicMirror/blob/master/js/socketclient.js#L11, basically its a channel with the module name, if you then send messages, the module doesn#t differentiate if its from mycroft or node_helper, as it isnt aware of multiple entities.

      posted in Utilities
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-voice

      @dmwilsonkc Error: resource busy/unavailable referring to the Microphone your microphone cannot be used by multiple processes at a time.

      In your case I rather suggest to write an own module for mycroft instead of a fork, as you’re using a complete different stt engine.

      If you’re interested in doing it via websockets you could have a look into mmm-mobile where i did something similar

      posted in Utilities
      strawberry 3.141S
      strawberry 3.141
    • RE: setInterval for multiple API requests

      @Privacywonk i would do it like this, copy your schedule update to node helper

      • send a socket notification from client to nodehelper in the start method to initialise the socket connection (e.g. the config)
        this.sendSocketNotification("CONFIG", this.config);
      • in the nodehelper when you receive the notification, run schedule update
      socketNotificationReceived: function(notification, payload) {
        if (notification === 'CONFIG') {
          this.config = payload;
          if (this.started !== true) {
            this.started = true;
            this.scheduleUpdate();            
          }
        }
      }
      

      the started flag makes sure it gets called only once, even if you’re connecting multiple clients.

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: setInterval for multiple API requests

      @Privacywonk in your old node_helper code you had a recursion. Every time you called the function fetchMagicseaweedData you set a new interval, but the old one(s) was still running. It’s basically like this.

      First execution: Interval
      Second execution: Interval -- Interval
      Third execution: Interval -- Interval -- Interval -- Interval
      ...
      

      so your intervals are created in O(n²), that explains why you end up with a couple of thousands after a while.

      You have multiple options to fix this:

      • change setInterval to setTimeout (which gets only executed once)
      • move the creation of the interval outside of the function and ensure it will be only called once in the lifetime of your module
      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: Run module

      @autonomus you can do that in the node_helper, it’s also already done by some modules

      e.g. https://nodejs.org/dist/latest-v8.x/docs/api/child_process.html#child_process_child_process_exec_command_options_callback

      posted in Requests
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-voice

      @dogfeet if you changed that, then you also have to apply your renamin here

      if(notification === "FALL_HOW DO" && sender.name === "MMM-voice"){
              if(/(LOOK)/g.test(payload)){
                  this.hide(1000);
                  this.updateDom(300);
                  // unhide the module,
                  // set a 10 sec timeout
                  // hide your module
              }
          }
      
      posted in Utilities
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-Assistant google-auth.js

      @albertlwj the file is in a different directory

      do cd scripts first

      posted in Troubleshooting
      strawberry 3.141S
      strawberry 3.141
    • RE: MMM-voice

      @dogfeet i don’t know why it is FALL instead of VOICE in your case?

      this is the code https://github.com/fewieden/MMM-voice/blob/master/MMM-voice.js#L203-L217

      the important parts are if (notification === 'VOICE') and this.sendNotification(${notification}_${payload.mode}, payload.sentence);

      how can notification be voice and a few lines later it is fall? did you modify any files?

      posted in Utilities
      strawberry 3.141S
      strawberry 3.141
    • 1
    • 2
    • 11
    • 12
    • 13
    • 14
    • 15
    • 84
    • 85
    • 13 / 85