Skip to content

MagicMirrorModules/MMM-SystemTemperature

 
 

Repository files navigation

MMM-SystemTemperature

This is a module for MagicMirror² that displays your system's CPU temperature on your mirror.

It also allows safe shutdown of your system using MMM-Remote-Control if you configure it.

Screenshot

MMM-SystemTemperature Screenshot

Installation

In your terminal, go to your MagicMirror's modules directory, clone this repository and install the dependencies:

cd ~/MagicMirror/modules
git clone https://github.com/MagicMirrorModules/MMM-SystemTemperature
cd MMM-SystemTemperature
npm ci

Update

To update this module, pull the latest changes from the repository and reinstall the dependencies:

cd ~/MagicMirror/modules/MMM-SystemTemperature
git pull
npm ci

Configuration

To use this module, add it to the modules array in the config/config.js file:

    {
      module: 'MMM-SystemTemperature',
      position: 'top_center',  // This can be any of the regions.
      classes: 'small dimmed', // Add your own styling. Optional.
      config: {
        // See 'Configuration options' for more information.
      }
    },

Configuration options

The following properties can be configured:

Option Description
prependString The text that will be shown before the temperature.
Default value: 'System temperature: '
updateInterval How often does the content needs to be fetched? (Milliseconds)
Possible values: 1000 - 86400000
Default value: 5000 (5 seconds)
animationSpeed Speed of the update animation. (Milliseconds)
Possible values: 0 - 5000
Default value: 0 (animation off)
unit Temperature unit of measurement
Possible values: c (Celsius), f (Fahrenheit), k (Kelvin)
Default value: c (Celsius)
warning Specific config for warning state (triggers at or above this temperature)
Possible values: { temp: 0-999, color: '#HEX', command: Object }
Default value: { temp: 60, color: 'orange', command: undefined }
critical Specific config for critical state (triggers at or above this temperature)
Possible values: { temp: 0-999, color: '#HEX', command: Object }
Default value: { temp: 75, color: 'red', command: { notification: 'REMOTE_ACTION', payload: { action: 'SHUTDOWN' } } }
NOTE: The REMOTE_ACTION notification (SHUTDOWN and MONITOROFF) actions require the MMM-Remote-Control module to be installed.

Contributing

If you find any problems, bugs or have questions, please open a GitHub issue in this repository.

Pull requests are of course also very welcome 🙂

Code of Conduct

Please see the Code of Conduct. By contributing you agree to its terms.

Developer commands

  • node --run lint - Run linting and formatter checks.
  • node --run lint:fix - Fix linting and formatter issues.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

All notable changes to this project will be documented in the CHANGELOG.md file.

About

Display the temperature of your CPU on your MagicMirror².

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors

Languages

  • JavaScript 97.6%
  • CSS 2.4%