• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-repeating-schedule

Scheduled Pinned Locked Moved Utilities
17 Posts 4 Posters 10.2k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    nimasmi
    last edited by Oct 5, 2016, 9:37 PM

    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.

    S 1 Reply Last reply Jan 21, 2017, 3:38 AM Reply Quote 2
    • S Offline
      shashank @nimasmi
      last edited by yawns Jan 22, 2017, 2:08 PM Jan 21, 2017, 3:38 AM

      @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']
      
      S 1 Reply Last reply Jan 21, 2017, 12:40 PM Reply Quote 0
      • S Offline
        strawberry 3.141 Project Sponsor Module Developer @shashank
        last edited by Jan 21, 2017, 12:40 PM

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

        Please create a github issue if you need help, so I can keep track

        S 1 Reply Last reply Jan 21, 2017, 2:26 PM Reply Quote 0
        • S Offline
          shashank @strawberry 3.141
          last edited by yawns Jan 22, 2017, 2:08 PM Jan 21, 2017, 2:26 PM

          @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,
                          
                      }
                  }
              },
          
          S 1 Reply Last reply Jan 21, 2017, 2:42 PM Reply Quote 0
          • S Offline
            strawberry 3.141 Project Sponsor Module Developer @shashank
            last edited by strawberry 3.141 Jan 21, 2017, 2:42 PM Jan 21, 2017, 2:42 PM

            @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: [
                ...
              ]
            };
            

            Please create a github issue if you need help, so I can keep track

            S 2 Replies Last reply Jan 21, 2017, 3:00 PM Reply Quote 0
            • S Offline
              shashank @strawberry 3.141
              last edited by yawns Jan 22, 2017, 2:07 PM Jan 21, 2017, 3:00 PM

              @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"],
              
              1 Reply Last reply Reply Quote 0
              • S Offline
                shashank @strawberry 3.141
                last edited by yawns Jan 22, 2017, 2:09 PM Jan 21, 2017, 3:02 PM

                @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'],
                            }
                        }
                    },
                
                1 Reply Last reply Reply Quote 0
                • N Offline
                  nimasmi
                  last edited by Jan 22, 2017, 11:05 AM

                  @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.

                  S S 2 Replies Last reply Jan 22, 2017, 11:09 AM Reply Quote 0
                  • S Offline
                    strawberry 3.141 Project Sponsor Module Developer @nimasmi
                    last edited by Jan 22, 2017, 11:09 AM

                    @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.

                    Please create a github issue if you need help, so I can keep track

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      shashank @nimasmi
                      last edited by yawns Jan 22, 2017, 2:07 PM Jan 22, 2017, 12:12 PM

                      @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'],
                      		}
                      		}
                      	},
                      
                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy