A MagicMirror² module that adds weather-reactive snow effects. Evolved from MMM-SnowEffect, this version automatically activates based on current weather conditions!
Version: 3.0.0 (Previously MMM-SnowEffect v2.0.1)
This module is a significant evolution of the original MMM-SnowEffect, adding intelligent weather-based activation:
- Automatic snow effect activation based on weather conditions
- Integration with weather module notifications
- Smart weather type detection for snow, sleet, and related conditions
- Dynamic state management (activate/deactivate based on weather)
- Improved performance and resource management
- Renamed module to MMM-DynamicSnow
- Added weather-reactive snow effect activation
- Integrated with weather module notifications
- Added dynamic weather condition detection
- Improved resource management (snow only shows when relevant)
- Maintained all original snow effect features
- v2.0.1: Performance optimization and configuration simplification
- v2.0.0: Configuration and validation improvements
- v1.0.0: Initial release with basic snow effects
MMM-DynamicSnow listens to your weather module's updates and automatically activates when:
- Snow is detected in the weather conditions
- Sleet is reported
- Blizzard conditions are present
- Snow flurries are occurring
The effect automatically deactivates when these conditions are no longer present.
The module includes a snowKeywords.json
file that defines which weather conditions trigger the snow effect. You can customize this file to match your weather provider's terminology:
{
"snowKeywords": [
"snow",
"sleet",
"blizzard",
"flurries"
]
}
- Locate the
snowKeywords.json
file in your module directory - Add or modify keywords to match your weather provider
- Keywords are case-insensitive
- Changes take effect immediately, no restart required
Common additions might include:
- "winter_storm"
- "snow_showers"
- "light_snow"
- "heavy_snow"
- "snow_grains"
cd ~/MagicMirror/modules
git clone https://github.com/cgillinger/MMM-DynamicSnow.git
Add to your config/config.js
. The module requires two key components:
- A weather module that emits weather notifications
- The MMM-DynamicSnow configuration
Example configuration:
{
module: "MMM-DynamicSnow",
position: "fullscreen_above", // Required position
config: {
// Optional: Override automatic activation
snow: true, // Set to false to disable regardless of weather
// Visual customization
flakeCount: 25, // Number of snowflakes
characters: ['*', '+'], // Snowflake characters
sparkleEnabled: false, // Sparkle effect
minSize: 0.8, // Minimum flake size
maxSize: 1.5, // Maximum flake size
speed: 1.0 // Animation speed
}
}
Ensure you have a weather module configured and working. The default weather module or most third-party weather modules will work.
Option | Description | Default | Notes |
---|---|---|---|
snow |
Manual override | false | Set true to always show, false for weather-reactive |
flakeCount |
Number of flakes | 25 | Range: 1-100 |
speed |
Fall speed | 1.0 | Range: 0.1-5.0 |
minSize |
Min flake size | 0.8 | In rem units |
maxSize |
Max flake size | 1.5 | In rem units |
characters |
Flake styles | ['*', '+'] | Array of characters |
sparkleEnabled |
Sparkle effect | false | Visual enhancement |
The module supports different styles of snowflakes, from simple ASCII characters to more decorative snowflake symbols. Below are examples of both styles running in Stockholm at 0.7°C:
Using simple ASCII characters (
*
and +
) - ideal for lower-powered devices
Configuration used:
{
characters: ['*', '+'],
flakeCount: 25,
sparkleEnabled: false
}
Using snowflake characters (❄) - more visually appealing but slightly more resource-intensive
Configuration used:
{
characters: ['❄', '❆'],
flakeCount: 25,
sparkleEnabled: true
}
Both examples show the module's weather-reactive features, automatically activating as the temperature approaches freezing (0.7°C) with a forecast showing decreasing temperatures through the evening.
{
module: "MMM-DynamicSnow",
position: "fullscreen_above",
config: {
flakeCount: 15, // Reduced count
characters: ['*', '+'], // Simple characters
sparkleEnabled: false, // No sparkle
minSize: 0.8,
maxSize: 1.2 // Smaller max size
}
}
{
module: "MMM-DynamicSnow",
position: "fullscreen_above",
config: {
flakeCount: 40,
characters: ['❄', '❆', '*'],
sparkleEnabled: true,
minSize: 1.0,
maxSize: 2.0
}
}
-
Snow Not Activating
- Check weather module is properly configured
- Verify weather notifications are being sent
- Try manual activation (set
snow: true
) - Check console for weather type notifications
-
Performance Issues
- Reduce
flakeCount
- Disable sparkle effect
- Use simple characters
- Reduce size range
- Reduce
-
Weather Detection Issues
- Check weather module configuration
- Verify weather data includes condition types
- Check console for weather notifications
- Verify snowKeywords.json matches your weather provider's terminology
- Try adding additional keywords that match your weather service
- MagicMirror²: >= 2.20.0
- Weather Module: Any that emits weather type notifications
- Browsers: All modern browsers supported
Issues and pull requests are welcome at MMM-DynamicSnow Issues
- Original MMM-SnowEffect by Christian Gillinger
- Weather integration enhancements by Christian Gillinger
- Based on MagicMirror² by Michael Teeuw
MIT Licensed - See LICENSE file for details