<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Adding suspend and resume functions into modules]]></title><description><![CDATA[<p dir="auto">Hi everyone,</p>
<p dir="auto">Im using the facial recognition and added multiple modules into different classes.<br />
All the modules works fine together but my CPU load spikes up to ~90-100% at the startup.</p>
<p dir="auto">This made me stopping adding new awesome personal modules for each person. I found out the “Suspend and Resume” functions in the <a href="https://github.com/MichMich/MagicMirror/tree/master/modules" target="_blank" rel="noopener noreferrer nofollow ugc">Development Documentation</a>. I want to implement it into my Mirror to suspend unused modules.</p>
<p dir="auto">The point is if <em>Person1</em> is recognized, the <em>Default</em> and the <em>Person 2</em> modules should be suspended and <em>Person 1</em> should be resumed etc etc.</p>
<p dir="auto">I made a short example of my config.js using the clock module and 2 persons.<br />
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.</p>
<pre><code>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;}


</code></pre>
]]></description><link>https://forum.magicmirror.builders/topic/1651/adding-suspend-and-resume-functions-into-modules</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 06:08:51 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/1651.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Feb 2017 11:58:08 GMT</pubDate><ttl>60</ttl></channel></rss>