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 directory 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 directory 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 🙂

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Developer commands

  • npm run lint - Run linting and formatter checks.
  • npm run lint:fix - Fix linting and formatter issues.
  • npm run release - Bump version for release.
  • npm run test - Run linting and formatter checks + run spelling check.
  • npm run test:spelling - Run spelling check.

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

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

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 77.5%
  • Nunjucks 18.7%
  • CSS 3.8%