Skip to content

KristjanESPERANTO/MMM-Canteen

 
 

Repository files navigation

MMM-Canteen

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

It shows the menu including the prices of canteens from universities in Germany and Switzerland.

The module automatically uses the newer openmensa.jolo.software API when available, and falls back to openmensa.org for canteens not yet supported by the new API.

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:

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

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: false,
        showOnlyKeywords: ["Veganes Gericht", "WOK"],
        blacklistKeywords: []
      }
    },

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

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

Configuration options

Option Description Type Default
updateInterval Interval to update data Integer 20 * 60 * 1000 (= 20 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
showOnlyKeywords Show only meals with case-insensitive keywords in notes or category String[] []
blacklistKeywords Don't show meals with these case-insensitive keywords in notes or category String[] []

Update

Go to the module’s directory and pull the latest version from GitHub:

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

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 install - Install development dependencies.
  • node --run lint - Run linting and formatter checks.
  • node --run lint:fix - Fix linting and formatter issues.
  • node --run test - Run linting and formatter checks + run spelling check.
  • node --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

Code of conduct

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages