Giter Site home page Giter Site logo

nawak86 / mmm-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slametps/mmm-tools

0.0 1.0 0.0 131 KB

Dsiplay stats and remote controlling MagicMirror on SBC(ATB & RPI), MMM-TelegramBot supported

License: MIT License

CSS 9.03% JavaScript 90.97%

mmm-tools's Introduction

MMM-Tools

Dsiplay stats and remote controlling MagicMirror on SBC(ATB & RPI), MMM-TelegramBot supported.

Screenshots

on MagicMirror

on Telegram

Feature

  • Display system status on MagicMirror
  • MMM-TelegramBot commands, /status and /screen on|off are supported.
  • You can set alert threshold for abnormal status of MagicMirror. You can get warning message by notification and TelegramBot

Install

cd [YourMagicMirrorDirectory]/modules
git clone https://github.com/eouia/MMM-Tools

If you want to use screen capture function, you should install scrot additionally.

sudo apt-get install scrot

Configuration

{
  module: 'MMM-Tools',
  position: 'bottom_right',
  config: {
    device : "ATB", // "RPI" is also available
    refresh_interval_ms : 10000,
    warning_interval_ms : 1000 * 60 * 5,
    enable_warning : true,
    warning : {
      CPU_TEMPERATURE : 65,
      GPU_TEMPERATURE : 65,
      CPU_USAGE : 75,
      STORAGE_USED_PERCENT : 80,
      MEMORY_USED_PERCENT : 80
    }
  }
}
// For more detailed information, see below;

Detailed Configuration

field default description
device "ATB" "ATB" for Asus TinkerBoard (TinkerOS),
"RPI" for Raspberry Pi (Raspbian).
refresh_interval_ms 10000 Milliseconds for refreshing status informaion on MagicMirror
warning_interval_ms 300000 Milliseconds for preventing multiple warning message. After passing this duration from previous warning messages, same warning message will be sent.
enable_warning true Set for sending warning message (notification and TelegramBot message)
warning See the below Threshold values for warning message

warning

fields default description
CPU_TEMPERATURE 65 Set CPU or SoC temperature for warning
GPU_TEMPERATURE 65 Set GPU temperature for warning
CPU_USAGE 75 Set % of CPU Usage (ref. /proc/stat) for warning
STORAGE_USED_PERCENT 80 Set % of used space of storage(SD Card) for warning
MEMORY_USED_PERCENT 80 Set % of used space of memory(RAM) for warning

Commands (For MMM-TelegramBot)

command description
/status Show system status
/screen on Turn display on
/screen off Turn display off
/capture Get current MagicMirror screenshot

Customizing view

You can customize view of this module with CSS. See the MMM-Tools.css

 .Tools .status_item.status_ip {
   order: 1; // change order
   /* display : none; */ //set display
 }

For Asus Tinker Board user

  • on current TinkerOs (v 1.9), there is no vgcencmd, vbetool, tvservice or equivalents. So I should use xset for controlling screen.
  • First you should set your xset dpms and screensaver on boot like this.
xset s noblank
xset s off
xset -dpms

xset s 0 0
xset dpms 0 0 0

There is no /boot/config.text in TinkerOS unlike Raspbian. I use Xfce Power Manager on TinkerOS LXDE desktop. (Preference > Power Manager menu) Set Blank after and Put to sleep after and Switch off after by Never. It works.

  • If you have any good idea for controling screen, please tell me.

For Raspberry Pi(Raspbian) user

  • Don't forget setting device:"RPI", in config.js
  • I have no RPI currently, so I cannot test enough. Please test and report issue for this module.
  • I'm not an expert as SysAdmin, thus I don't know the best way to detect and control screen on Raspberry Pi.
  • I don't know how to detect monitor status without xset q on RPI. I need your help.

Updated

2017-10-16

  • Indonesian translations added (Thanks to @slametps)
  • some bugs fixed.

2017-09-01

  • Some bugs are fixed
  • /capture command is added.

mmm-tools's People

Contributors

eouia avatar slametps avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.