Read the statement by Michael Teeuw here.
Adding suspend and resume functions into modules
-
Hi everyone,
Im using the facial recognition and added multiple modules into different classes.
All the modules works fine together but my CPU load spikes up to ~90-100% at the startup.This made me stopping adding new awesome personal modules for each person. I found out the “Suspend and Resume” functions in the Development Documentation. I want to implement it into my Mirror to suspend unused modules.
The point is if Person1 is recognized, the Default and the Person 2 modules should be suspended and Person 1 should be resumed etc etc.
I made a short example of my config.js using the clock module and 2 persons.
If you can help me further with 1 module, the location and the way of using it, i can use the code to add it for the other modules.var config = { port: 8080, language: 'nl', timeFormat: 24, units: 'metric', modules: [ { module: 'clock', position: 'top_left', classes: 'default' }, { module: 'currentweather', position: 'top_right', classes: 'Person1', config: { location: 'location', appid: 'APPID' } }, { module: 'weatherforecast', position: 'top_right', classes: 'Person2', header: 'Weather Forecast', config: { location: 'location', appid: 'APPID' } }, { module: 'MMM-Facial-Recognition', config: { recognitionAlgorithm: 1, lbphThreshold: 50, fisherThreshold: 250, eigenThreshold: 3000, useUSBCam: true, trainingFile: '/home/pi/MagicMirror/modules/MMM-Facial-Recognition/training.xml', interval: 1, logoutDelay: 15, users: ['Person1', 'Person2'], defaultClass: "default", everyoneClass: "everyone" } }, //------------------------------------------------- ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== 'undefined') {module.exports = config;}
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login