Skip to content

SalekurPolas/MMM-Pinfo

Repository files navigation

MMM-Pinfo

A MagicMirror² module that can display device information. This module is mainly inspired by MMM-Tools. To develop this module I used Node.js. Also, MagicMirror users can set warnings for abnormal information. MagicMirror will send a notification if any information exceeds the standard value.

Screenshot

Screenshot

Dependencies

Installation

Get the module directly from GitHub and install to MagicMirror using the following commands.

cd ~/MagicMirror/modules/
git clone https://github.com/SalekurPolas/MMM-Pinfo
cd MMM-Pinfo
npm install

Manual Installation

Although dependencies will automatically install during installation on MagicMirror, you can manually install them by the following steps.

  1. async
cd ~/MagicMirror/MMM-Pinfo
npm install async
  1. systeminformation
cd ~/MagicMirror/MMM-Pinfo
npm install systeminformation

Updating

cd ~/MagicMirror/modules/MMM-Pinfo
git pull
npm install

Usage

MMM-Pinfo module can display the following information

Name Description
Model Display model name and number of the device
Serial Display the unique serial number of the device
Network type Display connected network types like WLAN, LAN, etc
IPv4 Display IPv4 of the corresponding network
IPv6 Display IPv6 of the corresponding network
MAC Display MAC address of the corresponding network
RAM Display total size, usage, and percentage usage of the RAM
Storage Display total size, usage, and percentage usage of the Storage
CPU type Display CPU type of the device
CPU usage Display the percentage of usage
CPU temp Display current temperature of the CPU

Module Usage

To setup MMM-Pinfo module in MagicMirror², add the following section to the config.js file in the MagicMirror/config directory.

{
  module: 'MMM-Pinfo',
  position: 'top_left'
}

Configuration

Option Type Default Description
debug boolean true Enable printing debug information
refresh number 5000 Time in milliseconds to refresh automatically
itemAlign string 'left' MMM-Pinfo items alignment.
labelAlign string 'left' Item's label alignment.
valueAlign string 'center' Item's value alignment.
labelSize number null Size of the item's label in px
containerSize number null Size of the item's value container in px
DEVICE.labelModel string 'Model' Label of the model
DEVICE.displayModel boolean true Display model
DEVICE.orderModel number 1 Order of model
DEVICE.labelSerial string 'Serial' Label of serial
DEVICE.displaySerial boolean true Display serial
DEVICE.orderSerial number 2 Order of serial
OS.labelOs string 'OS' Label of OS
OS.displayOs boolean false Display OS
OS.orderOs number 3 Order of OS
NETWORK.labelType string 'NET Type' Label of NET Type
NETWORK.displayType boolean false Display NET Type
NETWORK.orderType number 4 Order of NET Type
NETWORK.labelIPv4 string 'IPv4' Label of IPv4
NETWORK.displayIPv4 boolean true Display IPv4
NETWORK.orderIPv4 number 5 Order of IPv4
NETWORK.labelIPv6 string 'IPv6' Label of IPv6
NETWORK.displayIPv6 boolean false Display IPv6
NETWORK.orderIPv6 number 6 Order of IPv6
NETWORK.labelMac string 'MAC' Label of MAC
NETWORK.displayMac boolean false Display MAC
NETWORK.orderMac number 7 Order of MAC
RAM.labelRam string 'RAM' Label of RAM
RAM.displayRam boolean true Display RAM
RAM.orderRam number 8 Order of RAM
STORAGE.labelStorage string 'Storage' Label of Storage
STORAGE.displayStorage boolean true Display Storage
STORAGE.orderStorage number 9 Order of Storage
CPU.labelType string 'CPU Type' Label of CPU Type
CPU.displayType boolean false Display CPU Type
CPU.orderType number 10 Order of CPU Type
CPU.labelUsage string 'CPU Usage' Label of CPU Usage
CPU.displayUsage boolean false Display CPU Usage
CPU.orderUsage number 11 Order of CPU Usage
CPU.labelTemp string 'CPU Temp' Label of CPU Temp
CPU.displayTemp boolean true Display CPU Temp
CPU.orderTemp number 12 Order of CPU Temp
WARNING.enable boolean false Display warning for unusual value
WARNING.interval number 5000 Time in milliseconds to refresh warning
WARNING.check.CPU_TEMP number 65 Normal temperature for CPU Temp
WARNING.check.CPU_USAGE number 75 Normal usage for CPU
WARNING.check.RAM_USED number 80 Normal usage for RAM
WARNING.check.STORAGE_USED number 80 Normal usage for STORAGE

Default Configuration

{
  module: 'MMM-Pinfo',
  position: 'top_left',
  config: {
    debug: true,
    refresh: 5000,
    itemAlign: 'left',
    labelAlign: 'left',
    valueAlign: 'center',
    labelSize: null,
    containerSize: null,

    DEVICE: {
      labelModel: "Model",
      displayModel: true,
      orderModel: 1,

      labelSerial: 'Serial',
      displaySerial: true,
      orderSerial: 2
    },

    OS: {
      labelOs: 'OS',
      displayOs: false,
      orderOs: 3
    },

    NETWORK: {
      labelType: 'NET Type',
      displayType: false,
      orderType: 4,

      labelIPv4: 'IPv4',
      displayIPv4: true,
      orderIPv4: 5,

      labelIPv6: 'IPv6',
      displayIPv6: false,
      orderIPv6: 6,

      labelMac: 'MAC',
      displayMac: false,
      orderMac: 7
    },

    RAM: {
      labelRam: 'RAM',
      displayRam: true,
      orderRam: 8
    },

    STORAGE: {
      labelStorage: 'Storage',
      displayStorage: true,
      orderStorage: 9,
    },

    CPU: {
      labelType: 'CPU Type',
      displayType: false,
      orderType: 10,

      labelUsage: 'CPU Usage',
      displayUsage: false,
      orderUsage: 11,

      labelTemp: 'CPU Temp',
      displayTemp: true,
      orderTemp: 12
    },

    WARNING: {
      enable: false,
      interval: 1000 * 60 * 5,
      check: {
        CPU_TEMP: 65,
        CPU_USAGE: 75,
        RAM_USED: 80,
        STORAGE_USED: 80
      }
    },
  }
}

Issues

  • Support for multiple language is not yet complete.
  • If if have any other issues then let me know at Issues.

Credits