MMM-ModulesGroupsRotation is a MagicMirror² module that groups modules and toggles their visibility over time. I needed something similar to MMM-pages but I encountered few bugs and decided to create simple version for what I need,
To install the module, use the following commands:
cd ~/MagicMirror/modules
git clone https://github.com/YOUR_USERNAME/MMM-ModulesGroupsRotation.git
To use this module, add it to the modules
array in your config/config.js
file:
{
module: "MMM-ModulesGroupsRotation",
config: {
modulesGroups: [
["module1", "module2"],
["module3", "module4"]
],
rotationTime: 5000, // Rotation time in milliseconds
animationDelay: 1000 // Animation delay in milliseconds
}
}
The following properties can be configured:
Option | Description | Default |
---|---|---|
modulesGroups |
An array of arrays containing the names of modules to group and rotate through. | [[]] |
rotationTime |
Time in milliseconds between module rotations. | 3000 |
animationDelay |
Time in milliseconds for the fade in/out animation when toggling module visibility. | 1000 |
groupDelay |
array of structures, enable different timeouts for different groups | [] |
groupNumber starts at 1 for the first group, timeout is in milliseconds | ||
{ groupNumber: n, timeout: mmmmm } | ||
{ groupNumber:5, timeout:5*60*1000} // 5th group , timeout is 5 minutes |
Example configuration:
{
module: "MMM-ModulesGroupsRotation",
config: {
modulesGroups: [
["clock", "calendar"],
["compliments", "newsfeed"]
],
rotationTime: 5000,
animationDelay: 1000
}
}
This module does not have any external dependencies.
This module was developed by Mo Ezderman.
This module is licensed under the MIT License.