Install Magic Mirror 2 modules

From CMEE4K
Jump to navigation Jump to search

The build-in or default modules

Clock

{
   module: "clock",
   position: "top_left",
   config: {
	timeFormat: 12,
	showPeriod: true,
	showPeriodUpper: true,
	displayType: "both"
   }
}

Weather

{
  module: "currentweather",
  position: "top_right",
    config: {
	location: "Markham",
	locationID: "6066513",
	appid: "21d662ee325f989b2be726746cdb6404"
    }
},
{
  module: "weatherforecast",
  position: "top_right",
  header: "Weather Forecast",
    config: {
	location: "Markahm",
	locationID: "6066513",
	appid: "21d662ee325f989b2be726746cdb6404"
  }
}

Calendar

Refresh every hour (3600,000).

{
  module: "calendar",
  header: "Canada Holidays",
  position: "top_left",
  config: {
        displaySymbol: true,
        timeFormat: "absolute",
        maximumEntries: 4,
        maximumNumberOfDays: 90,
        fetchInterval: 3600000,
	calendars: [
	   {
		symbol: "calendar-check",
		url: "webcal://www.calendarlabs.com/ical-calendar/ics/39/Canada_Holidays.ics"
	   }
	]
  }
}

Personalize: Use Google Calendar

  • Create a group in your Calendar in https://calendar.google.com/calendar
    • Click the Settings menu on top-right > Settings
    • On the left panel, below General, expand the Add calendar menu
    • Click Create new calendar
      • Put the name of the new Calendar, Description, and click Create calendar
  • Setting this new calendar
    • On the left panel, click and expand the new calendar
    • The first choice should be Calendar settings. If not, select it.
      • On the right panel
        • In Access permissions, check the Make available to public
        • Scroll down to Customize section
          • Copy the Public address iCal format. This URL can be accessed from other applications.
Google Calendar Create new.png

Add the following configuration, where

  • Refresh every 15 min (900,000)
  • URL is from above
{
  module: "calendar",
  header: "RPi MM Calendar",
  position: "top_center",
  config: {
     tableClass: "large",
     displaySymbol: true,
     timeFormat: "absolute",
     maximumEntries: 8,
     maximumNumberofDays: 5,
     fetchInterval: 900000,
     colored: true,
     coloredSymbolOnly: true,
     calendars: [
	{
           color: '#99FF99',
	   symbol: "video",
	   url: "https://calendar.google.com/calendar/ical/......group.calendar.google.com/public/basic.ics"
	}
     ]
  }
}

News Feed

{
  module: "newsfeed",
  position: "bottom_bar",
  config: {
    feeds: [
	{
           title: "Canada CBC",
	   url: "https://rss.cbc.ca/lineup/canada.xml",
	},
	{
	   title: "Toronto CBC",
	   url: "https://rss.cbc.ca/lineup/canada-toronto.xml",
	},
    ],
    showSourceTitle: true,
    showPublishDate: true,
    broadcastNewsFeeds: true,
    broadcastNewsUpdates: true
  }
}

MMM-Tools

https://github.com/bugsounet/MMM-Tools
Display stats and remote controlling MagicMirror on SBC(ATB & RPI), MMM-TelegramBot supported.
cd ~/MagicMirror/modules
git clone https://github.com/bugsounet/MMM-Tools

Configuration

{
  module: 'MMM-Tools',
  position: 'bottom_right',
  config: {
    device : "RPI", // "ATB" is also available
    refresh_interval_ms : 5000,
    warning_interval_ms : 1000 * 60 * 5,
    enable_warning : true,
    assistantSay: false,
    warning : {
      CPU_TEMPERATURE : 65,
      GPU_TEMPERATURE : 65,
      CPU_USAGE : 75,
      STORAGE_USED_PERCENT : 80,
      MEMORY_USED_PERCENT : 80
    },
    uptime: { // display uptime in your language (RPI only)
      day: "day",
      hour: "hour",
      minute: "minute",
      plurial: "s"
    }
  }
}

MMM-LCDControl

https://github.com/Txukie/MMM-LCDControl
It provides LCD control via a PIR module.

Usage

{
	module: 'MMM-LCDControl',
	config:
	{
		GPIO_PIR: 21,
                GPIO_LCD_ONOFF: 20,
                GPIO_LCD_STATUS: 12,
                screenOffTimer: 30
	}
}

Dependencies


MMM-Widget

https://github.com/ulrichwisser/MMM-Widget
MagicMirror module for external web widgets

Installation

cd ~/MagicMirror/modules/
git clone https://github.com/eouia/MMM-Widget

Configuration

Format

{
  module: "MMM-Widget",
  config: {
    widgets: [
      {
        html:"<font color=lightyellow>This is <b>Simon Yuen</b></font>",
        position: "top_left",
        width: "250px",
        height: "100px",
        backgroundColor: "#000"
      },
      ... // If you want to display several widgets, add here.
    ]
  }
}

Example from their web page

html:"<script type='text/javascript' src='http://www.mta.info/sites/all/libraries/mta_WidgetScripts/serviceStatusWidget.js'></script>",

This is the serviceStatusWidget.js code (one line):

document.write('<iframe width="230" height="430" border="0" frameborder="0" src="http://service.mta.info/ServiceStatus/status.html?widget=yes" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>')

Formatted

document.write(
  '<iframe width="230" height="430" border="0" frameborder="0"
   src="http://service.mta.info/ServiceStatus/status.html?widget=yes"
   marginwidth="0" marginheight="0" vspace="0" hspace="0"
   allowtransparency="true" scrolling="no">
   </iframe>')