MMM-repeating-schedule



  • I’ve made a module, https://github.com/nimasmi/MMM-repeating-schedule. The README gives more details, and a lengthier rationale, but the main aim is to make it possible to show a calendar-like display of events, but without the faff of configuring a repeating event through Google Calendar.

    I made it to show my kids’ school dinner menus.

    Comments welcome.



  • @nimasmi hi i could not able to get this Module working i wanted to use this for my Sons school menu , help me to share your config file , where to enter the below Var function

    var weekOne = ['sandwich', 'rice', 'beans', 'soup', 'pizza']
    var weekTwo = ['toast', 'omelette', 'leftovers', 'wraps', 'hot pot']
    var weekThree = ['fish', 'barbecue', 'potato', 'pie', 'curry']
    


  • @shashank put it above var config = {...};



  • @strawberry-3.141 is it like this

    modules: [
        {
            module: 'MMM-repeating-schedule',
            position: 'top_right',
    		config: {
    		var weekOne = ['sandwich', 'rice', 'beans', 'soup', 'pizza']
    		var weekTwo = ['toast', 'omelette', 'leftovers', 'wraps', 'hot pot']
    		var weekThree = ['fish', 'barbecue', 'potato', 'pie', 'curry']
                headerText: 'School meals',
                dates: {
                    '2017-01-20': weekOne,
                    '2017-01-27': weekTwo,
                    '2017-01-28': weekThree,
                    
                }
            }
        },
    


  • @shashank no as i told above the var config line

    var weekOne = [‘sandwich’, ‘rice’, ‘beans’, ‘soup’, ‘pizza’];
    var weekTwo = [‘toast’, ‘omelette’, ‘leftovers’, ‘wraps’, ‘hot pot’];
    var weekThree = [‘fish’, ‘barbecue’, ‘potato’, ‘pie’, ‘curry’];
    
    var config = {
      port: 8080,
      language: 'en',
    
      ...
    
      modules: [
        ...
      ]
    };
    


  • @strawberry-3.141 i tried , MM not starting

    var weekOne = [‘sandwich’, ‘rice’, ‘beans’, ‘soup’, ‘pizza’];
    var weekTwo = [‘toast’, ‘omelette’, ‘leftovers’, ‘wraps’, ‘hot pot’];
    var weekThree = [‘fish’, ‘barbecue’, ‘potato’, ‘pie’, ‘curry’];
     
    var config = {
    	port: 8080,
    	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "192.168.1.0/24" , "::ffff:192.168.1.0/24"],
    


  • @strawberry-3.141 i am trying both of this modules , MM not starting

    {
            module: 'MMM-repeating-schedule',
            position: 'top_right',
    		config: {
                headerText: 'School meals',
                dates: {
                    '2017-01-20': weekOne,
                    '2017-01-27': weekTwo,
                    '2017-01-28': weekThree,
                     }
            }
        },
    	{
            module: 'MMM-repeating-schedule',
            position: 'top_right',
            config: {
                headerText: 'Work lunches',
                dates: {
                    '2016-09-12': ['sandwich', 'rice', 'beans', 'soup', 'pizza'],
                    '2016-09-19': ['toast', 'omelette', 'leftovers*', 'wraps', 'hot pot'],
                    '2016-09-26': ['fish', 'barbecue', 'potato', 'pie', 'curry'],
                }
            }
        },
    


  • @strawberry-3.141’s format is correct. My file looks like this:

    var weekOne = [
        'Jacket Potato with cheese or Tuna Mayonnaise (V) or Margherita Pizza (V)<br />Sweetcorn, Spaghetti Rings<br />Raspberry Iced Smoothie',
        'Pork (or vegetarian) Sausages with Mashed Potato<br />Mixed Seasonal Vegetables<br />Chocolate Sponge with Pears & Custard',
        'Roast Chicken (or Quorn)<br />Yorshire Pudding, Roast Potatoes & Gravy<br />Melting Moments',
        'Beef Spahgetti Bolognaise or Vegetarian Bolognese<br />Garlic Bread, Green Beans, Sweetcorn<br />Fruit Cheesecake',
        'Breaded Fish or Pink Salmon Nuggets with Chips, or Pasta or Mixed Bean Korma with Rice (V)<br />Baked Beans, Peas<br />Strawberry Jelly with Peach Slices'
    ];
    var weekTwo = [
        'Ham & Cheese Pizza or Margherita Pizza (V)<br />Sweetcorn, Baked Beans<br />Oaty Apple Crumble with Custard',
        'Beef Meatballs or Veggie Meatballs (V)<br />Freshly-made Tomato Sauce or Rich Tasty Gravy, Pasta or Rice, Mixed Broccoli & Cauliflower<br />Orange Cake',
        'Roast Pork (or Quorn)<br />Yorkshire Pudding, Roast Potates & Gravy, Green Beans, Carrots<br />Shortbread Biscuit with Orange Wedge',
        'Cheese Whirl with New Potatoes or Jacket Potato with Baked Beans or Tuna Mayonnaise<br />Broccoli, Sweetcorn<br />Sticky Ginger Cake with Custard',
        'Battered Fish Fillet with Chips or Pasta or Chille con Veggie with Rice or Chips<br />Baked Beans, Peas<br />Chocolate Ice Cream',
    ];
    var weekThree = [
        'Pepperoni Pizza or Margherita Pizza<br />Baked Beans, Sweetcorn<br />Strawberry Mousse',
        'Pasta with Tomato Sauce or Macaroni Cheese<br />Mixed Seasonal Vegetables<br />Sticky Cake with Custard',
        'Roast Chicken (or Quorn)<br />Yorkshire Pudding, Roast Potatoes & Gravy, Savoy Cabbage, Carrots<br />Banana Cake',
        'Chicken & Sweetcorn Pie with New Potatoes or Potato-Topped Vegetarian Pie<br />Broccoli, Peas<br />Cheese & Crackers with Apple Wedge or Mixed Grapes',
        'Fish Fingers or Veggie Sausage Roll<br />Chips or Pasta, Sweetcorn, Baked Beans<br />Chocolate Crispy Cake',
    ];
    
    var config = {
    	port: 8080,
    

    etc.

    Your code example that you say doesn’t work uses curly quotes, which are not valid characters for JS code (they are valid in strings, but not to demarcate a string literal). It may be just an artefact of the way you’ve cut and pasted your code example here. Nonetheless, ensure your config.js file uses straight single and double inverted commas.



  • @nimasmi I started a remote desktop session with him and indeed there were the wrong quotes. after we changed that the module still didn’t display. i couldn’t spot any error neither in the browser console nor in the terminal. i had to stop there because i had no time left.



  • @nimasmi hi i tried , still not working no content display on MM, other modules are working fine

    var weekOne = ['Jacket Potato with cheese or Tuna Mayonnaise'];
     var weekTwo = ['Ham & Cheese Pizza'];
     var weekThree = ['Pepperoni Pizza'];
      var config = {
    	port: 8080,
    
    {
    			module: 'MMM-repeating-schedule',
    			position: 'bottom_right',
    			config: {
    			headerText: 'School meals',
    			dates: {
    			'2017-01-22': weekOne,
    			'2017-01-29': weekTwo,
    			'2017-02-05': weekThree,
    		}
    	}
    },
    	{
    			module: 'MMM-repeating-schedule',
    			position: 'bottom_left',
    			config: {
    			headerText: 'Work Lunch',
    			dates: {
    			'2017-01-22': ['sandwich'],
    			'2017-01-23': ['toast'],
    			'2017-01-24': ['fish'],
    		}
    		}
    	},
    

Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.