Skip to content

This is a module for MagicMirror² to display the menu of canteens from universities in Germany and Switzerland (based on openmensa.org API).

License

Notifications You must be signed in to change notification settings

KristjanESPERANTO/MMM-Canteen

 
 

Repository files navigation

MMM-Canteen

MMM-Canteen is a module for the MagicMirror² project.

It shows the the menu including the prices of canteens from universities in Germany and Switzerland (based on openmensa.org).

Screenshots

Example of a canteen in Halle with veggie information

Example of a canteen in Halle with veggie information

Example of a canteen in Leipzig without veggie information

Example of a canteen in Leipzig

Installation

Just clone the module into your modules folder of your MagicMirror² and execute npm ci in the module’s directory:

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

Configuration

To use this module, add it to the config.js file. Here is an example:

{
  module: "MMM-Canteen",
  position: "bottom_center",
  config: {
    canteenName: "Mensa am Park",
    canteen: 63,
    status: "employees",
    switchTime: "15:00",
    showVeggieColumn: true
  }
},

It is also possible to add multiple instances. Here is a simple example:

{
  module: "MMM-Canteen",
  position: "right",
  config: {
    canteenName: "Mensa 1",
    canteen: 240
  }
},
{
  module: "MMM-Canteen",
  position: "right",
  config: {
    canteenName: "Mensa 2",
    canteen: 241,
  }
},

Configuration options

Option Description Type Default
updateInterval Interval to update data Integer 10 * 60 * 1000 (= 10 minutes)
canteen ID from the openmensa.org url Integer 63 (= Mensa am Park, Uni Leipzig)
status Your status
Possible values: "employees", "students", "pupils", "others"
String "employees"
truncate Truncate more than x letters Integer 100
canteenName Name of the canteen String "Kantine"
switchTime Shows the menu from next day, if switchTime < now Timestamp (HH:mm) "16:00"
animationSpeed Speed of the update animation (in milliseconds).
If you don't want that the module blinks during an update, set the value to 0.
Possible values: 0 - 5000
Integer 500
showVeggieColumn Show Veggie Column or not Boolean true
debug Debugging Boolean false

Update

Go to the module’s folder inside MagicMirror modules folder and pull the latest version from GitHub and install:

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

Special Thanks

  • Michael Teeuw for creating the inspiring project MagicMirror².
  • k-0 for initiating this module. Since he does not react to Pull Requests, I continue to maintain the module as a fork here.
  • The great community of MagicMirror² that keeps this impressive project alive and permanently improves it.
  • All contributors for finding and fixing errors in this module.

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 🙂

About

This is a module for MagicMirror² to display the menu of canteens from universities in Germany and Switzerland (based on openmensa.org API).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 74.2%
  • Nunjucks 21.5%
  • CSS 4.3%