MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. in_a_days
    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 2
    • Posts 71
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Motion Detector

      @oscarkindberg Try this instead:

                  {
                          module: 'motiondetector',
                          config: {
                                  timeout: 300000 // time in milliseconds for to switch off the display after last movement is detected.
                          }
                  },
      

      This is set for a 5 minute delay. Modify the timeout value if you want a longer or shorter delay before your screen turns off.

      posted in Utilities
      in_a_daysI
      in_a_days
    • RE: Motion Detector

      Same here. Great work and many thanks @danielis!

      posted in Utilities
      in_a_daysI
      in_a_days
    • RE: Motion Detector

      Well… so much for that theory lol. I just got the ENOMEM error from Motion Detector.

      0_1483816079700_error.jpg

      posted in Utilities
      in_a_daysI
      in_a_days
    • RE: MM-Navbar - Navigation Bar for Touchscreens to hide/show modules

      @shashank

      For sure. Forgive me if there are several steps.

      First thing is to install this module

      https://github.com/alexyak/voicecontrol

      Go to your MagicMirror/modules folder and type

      git clone https://github.com/alexyak/voicecontrol.git

      Then install dependencies with

      sudo apt-get install python-pyaudio python3-pyaudio sox

      Next, install the navbar. Again, make sure you are in the MagicMirror/modules folder and type

      git clone https://github.com/chr1syy/MM-navbar.git

      Then you will need to go to this website and define your voice commands.

      https://snowboy.kitt.ai/

      Keep track of the keywords you define and the filenames you produce. Each keyword/command will require you to download a .pmdl file that needs to be copied into the MagicMirror folder on your Pi. I’m only using 3 commands so far - calendar, newsfeed, and weather.

      Still with me? Sweet! Lets configure config.js. Go to the MagicMirror/config folder and

      nano config.js

      Assuming you know where to place a new module in this file, add the navbar module with

                  {
                          module: 'MM-navbar',
                          position: 'fullscreen_above'
                  },
      

      Next we will add the voice control call to the same config.js file. There are a couple variables here that will depend on the keywords and filenames you used on the snowboy site. Here is the code I use

                {
                          module: 'voicecontrol',
                          position: 'bottom_right',
                          config: {
                                  models: [
                                                  {
                                                          keyword: "Calendar",
                                                          description: "Say 'Calendar' to toggle display",
                                                          file: "calendar.pmdl",
                                                          message: "CALENDAR"
                                                  },
                                                  {
                                                          keyword: "Newsfeed",
                                                          description: "Say 'Newsfeed' to toggle display",
                                                          file: "newsfeed.pmdl",
                                                          message: "NEWSFEED"
                                                  },
                                                  {
                                                          keyword: "Weather",
                                                          description: "Say 'Weather' to toggle display",
                                                          file: "weather.pmdl",
                                                          message: "WEATHER"
                                                  }
                                          ]
      
                                  }
                  },
      

      Note that the keyword and file need to match the keyword and filenames you used on your Snowboy files. Save and quit out of config.js and we’ll hit the last step. We need to make a couple changes to the navbar code. Navigate to MagicMirror/modules/MM-navbar then

      nano MM-navbar.js

      First change is at line 13. Right now lines 12-19 look like this

      notificationReceived: function(notification, payload, sender){
      	if (notification === 'DOM_OBJECTS_CREATED'){
      		MM.getModules().exceptModule(this).exceptWithClass('clock').enumerate(function(module){
      			module.hide(1000, function(){
      			});
      		});
      	}
      },
      

      You will need to modify it to look like this

          notificationReceived: function(notification, payload, sender){
                  if (notification === "CALENDAR"){
                          var calendarbutton = document.getElementById('calendar-button');
                          calendarbutton.click();
                  }
                  if (notification === "NEWSFEED"){
                          var newsbutton = document.getElementById('news-button');
                          newsbutton.click();
                  }
                  if (notification === "WEATHER"){
                          var weatherbutton = document.getElementById('weather-button');
                          weatherbutton.click();
                  }
          },
      

      Now we’re going down to the section that originally starts on line 32

      	wrapper.className = "center";
      	weatherbutton.className = "wi wi-day-rain-mix navbar";
      	calendarbutton.className = "fa fa-calendar navbar";	
      	newsbutton.className = "fa fa-newspaper-o navbar";		
      

      And change it to

                  wrapper.className = "center";
                  weatherbutton.className = "wi wi-day-rain-mix navbar";
                  weatherbutton.id = 'weather-button';
                  calendarbutton.className = "fa fa-calendar navbar";
                  calendarbutton.id = 'calendar-button';
                  newsbutton.className = "fa fa-newspaper-o navbar";
                  newsbutton.id = 'news-button';
      

      Save, close and restart your MM and you should have a working, voice responsive nav bar. I know there are kind of a lot of steps here and typos and omissions are entirely possible. If you have any problems let me know and I’ll try to help. Cheers!

      posted in System
      in_a_daysI
      in_a_days
    • RE: Motion Detector

      @mydiva

      The system stat module I’m referring to is this one.

      https://github.com/BenRoe/MMM-SystemStats

      It would have to be specifically installed by the user. But looking at the screenshot from @trividar, there are a couple different modules throwing up errors. These couple lines show the modules that appear to be crashing the system:

      0_1483811268365_error.jpg

      You can see mmm-systemtemperature and MMM-DHT22 producing error events. I would start by commenting out these modules. Just add a

      /*

      before and a

      */

      after the section of your config.js file that loads these modules. If that eliminates the crashing you can be confident it is these modules causing the problem, and you can either try to fix them or look for alternatives.

      EDIT: The common theme between my error and the error posted here is the ENOMEM code, and the fact that all these modules are measuring system temperature. MMM-SystemStats, mmm-systemtemperature, and MMM-DHT22 are all reading temperatures. I would be willing to bet there’s a bug or memory leak somewhere in the code that is pulling or logging temperature info. I’m not convinced any of these particular errors are related to the Motion Detector module.

      posted in Utilities
      in_a_daysI
      in_a_days
    • RE: Motion Detector

      @jdahli1

      Unfortunately, I’m pretty new too!

      To update - my mirror would still freeze (though it might take a couple hours) even after the changes I suggested. For me, the last error before the crash ALWAYS comes from the system status module (same exact ENOMEM error from the @trividar post). With the sys stat module disabled, I seem to be crash free. May not be the same thing you’re experiencing.

      I also removed Watchdog after reading a bit more about it’s purpose.

      If you are able to copy the log file from your most recent crash, someone smarter than me may be able to help.

      posted in Utilities
      in_a_daysI
      in_a_days
    • RE: MM-Navbar - Navigation Bar for Touchscreens to hide/show modules

      I think this module is very cool! My present build is non-touch so I made some small additions (informed by @GinSeng in another thread) and I’m currently using voice to trigger the Navbar. Love it! I’ll be happy to provide code or details if anybody is interested.

      posted in System
      in_a_daysI
      in_a_days
    • RE: Motion Detector

      @jdahli1

      I have also experienced something similar, always while running under a heavy load. Are you running a lot of modules, or anything that is very intensive? Some tasks like video streaming are incredibly demanding on the CPU.

      My working solution was to modify my module selection so I’m not overworking the processor, and to increase the ‘updateInterval’ in my SystemStats section of config.js. Maybe try 15000 or 20000ms, see if it the crash occurs less often. I also run WatchDog and it would register the SystemStats failure. I don’t see WatchDog in these logs so this may not apply, but I also added increased ‘interval’ and ‘timeout’ settings to config.js. I have not seen this SystemStats crash for quite a while.

      FWIW - after this crash WatchDog/pm2 does NOT restart my mm shell. All the other failures auto-restart, but something about this one crashes to the desktop. Also - sorry for threadjacking a “Motion Detection” thread!

      posted in Utilities
      in_a_daysI
      in_a_days
    • RE: Introduce yourself!

      Howdy, I’m John. I’m a 35 year old punk rock nerd living in Las Vegas, NV.

      I play in a band and own and operate a commercial recording studio. I’ve always been a computer guy and studied C++ in high school, 15+ years ago.

      I don’t consider myself a particularly skilled craftsman, so I recruited a good friend to help with assembly. He is a general contractor with access to tools and knowledge of how to build a professional looking frame. I think we’re going to attempt our first monitor debezel this weekend. We are very excited!

      Thank you so much for creating this resource, and thanks to all the folks that have shared! I’m still trying to refresh and update my programming knowledge - hopefully I’ll be able to contribute to this shared information in the near future.

      posted in General Discussion
      in_a_daysI
      in_a_days
    • RE: Where are you from?

      Las Vegas, NV

      :)

      posted in General Discussion
      in_a_daysI
      in_a_days
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 7 / 8