Code Monkey home page Code Monkey logo

mmm-paprikamenu's Introduction

MMM-PaprikaMenu

This is a module for MagicMirror. It displays your weekly menu from Paprika.

Screen Shot

Installation

  1. Move to MagicMirror's modules directory and clone the repo with
    git clone https://github.com/kaelspencer/MMM-PaprikaMenu.git
  2. cd into MMM-PaprikaMenu and run npm install

Config

At a minimum, you need a Paprika cloud sync account. Provide that email and password in the config.

Option Description
email REQUIRED
The email/user account for Paprika

Type: string
password REQUIRED
The password for your Paprika account

Type: string
weekStartsOnSunday The modules shows the current week's menu. If true, the first day of the week will be Sunday. If false, Monday.

Type: bool
Default: false
priorDayLimit How many previous days of this current week will be displayed. If 0, only today until the end of the week are shown.

Type: int
Default: 7
priorEntryLimit How many entries from previous days should be shown in total. priorDayLimit takes precedence. For example, with 3 entries per day, priorEntryLimit set to 5 and priorDayLimit set to 1, you will only see 3 prior entries.

Type: int
Default: 50
fadePriorEntries Should entries from previous days in the current week be faded.

Type: bool
Default: true
showPictures Show pictures corresponding to that days meal.

Type: bool
Default: true
roundPictureCorners Round the meal picture corners.

Type: bool
Default: false
dateFormat Display format for the date; uses moment.js format string.

Type: string
Default: "dddd"
breakfastDisplay Paprika has a meal type where 0 corresponds to "Breakfast". You can change the word that is displayed.

Type: string
Default: "Breakfast"
lunchDisplay Paprika has a meal type where 1 corresponds to "Lunch". You can change the word that is displayed.

Type: string
Default: "Lunch"
dinnerDisplay Paprika has a meal type where 2 corresponds to "Dinner". You can change the word that is displayed.

Type: string
Default: "Dinner"
snackDisplay Paprika has a meal type where 3 corresponds to "Snack". You can change the word that is displayed.

Type: string
Default: "Snack"
dateMealSeperator Above each menu item, the date and meal type are displayed. For example, by default you'll see "Tuesday - Dinner". This setting controls the characters separating dateFormat and the meal display.

Type: string
Default: " - "
mealSortOrder The default sort order is breakfast (0), lunch (1), dinner (2), and lunch (3). You can change this sort order. For example, if you want dinner first: [2, 0, 1, 3]. The numbers correspond to the *Display options above. Note: each number 0-3 must appear exactly once in the array.

Type: array of int
updateInterval How often, in minutes, to query Paprika.

Type: int
Default: 60 minutes
updateFadeSpeed How quickly to fade out and back in the module upon update.

Type: int
Default: 500

Here is an example of an entry in config.js. Take note of snackDisplay and mealSortOrder. Here, we use the snack entries as a reminder of things we need to do to prepare for future meals, e.g., thaw meat. snackDisplay changes what appears, and mealSortOrder moves the snack entries to the top of the list for that day.

{
    module: "MMM-PaprikaMenu",
    header: "Dinner Menu",
    position: "top_left",
    classes: "default everyone",
    config: {
        email: "[email protected]",
        password: "Secret!",
        weekStartsOnSunday: true,
        roundPictureCorners: true,
        snackDisplay: "Meal preparation reminder",
        mealSortOrder: [3, 0, 1, 2]
    }
},

Dependencies

This package depends on the following:

mmm-paprikamenu's People

Contributors

dependabot[bot] avatar kaelspencer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mmm-paprikamenu's Issues

Uncaught TypeError: Cannot read property 'appendChild' of undefined. Module doesn't show.

I installed the module today in my freshly setup MM, but when I enable it, I get the following error in the inspector:

Uncaught TypeError: Cannot read property 'appendChild' of undefined  
    at main.js:39
    at Array.forEach (<anonymous>)  
    at createDomObjects (main.js:23)
    at Object.modulesStarted (main.js:477)
    at startModules (loader.js:59)
    at loader.js:40
    at HTMLLinkElement.stylesheet.onload (loader.js:200)

The module loads and gets all the info it needs from Paprika, but doesn't show up and even blocks other modules from showing up. The logs show no errors.
I isolated the module to see it was an incompatibility issue with another module, but the error still shows up when PaprikaMenu is the only module in the config.

List of only recipes with clickable expand action

Hi and thanks for this nice plugin!
I am building kitchen recipe portal with touchscreen monitor and wondering if this plugin can be extended to add list of recipes that can be opened by clicking?

Thanks a lot,
I

Magic mirror visionect

Hi Kael,

Saw that you have some other repo for the Visionect tablet. Do you have perhaps any Idea on how to get MagicMirror displaying on the Eink tablets from Visionect through their suite?

Menu won't load

Hope somebody may have the same issue or could supply some help.
Somehow PaprikaMenu stop working for me and do not longer load the Menu and just shows "Loading ...". Can't find something in the logs and tried it also with the original example configuration with same results.

Also not helping output from /home/pi/.pm2/logs/MagicMirror-out.log:
0|MagicMir | MMM-PaprikaMenu: Week starts: 2019-03-17, next week starts: 2019-03-24
0|MagicMir | MMM-PaprikaMenu: Waiting on 2 Paprika recipe calls.
0|MagicMir | MMM-PaprikaMenu: All recipe queries returned.
0|MagicMir | MMM-PaprikaMenu: Updating recipe
0|MagicMir | MMM-PaprikaMenu: Updating recipe

Thanks in advance!

Loading...

Hi,

I've a paprika account and I'm trying to setup this on my mirror.
My configuration is the following:

                {
                        module: "MMM-PaprikaMenu",
                        header: "Menus",
                        position: "top_right",
                        config: {
                                email: "aaaaaaaaaa",
                                password: "bbbbbbbbb",
                                weekStartsOnSunday: false,
                                roundPictureCorners: true,
                                snackDisplay: "Snack",
                                breakfastDisplay: "Pti déj",
                                lunchDisplay: "Dîner",
                                dinnerDisplay: "Souper",
                                dateFormat:"dddd"
                        }
                },

I also did the npm install after having cloned the module.

But when I display it, I see:
image

No errors, nothing. Any idea how I can troubleshot this or what the issue could be?

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.