• 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.3k 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.
  • 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
            • L Offline
              lucallmon
              last edited by Jan 25, 2017, 10:20 AM

              Could you please post a working photo to see exactly what it should do? I’m in the market for a better calendar on the MM but before I put the work in, I’d like to see what yours does. thanks.

              1 Reply Last reply Reply Quote 0
              • N Offline
                nimasmi
                last edited by Jan 25, 2017, 10:24 AM

                @lucallmon, there’s a screenshot at https://github.com/nimasmi/MMM-repeating-schedule

                I should say though that this is definitely aimed at repeating events, such as a weekly schedule of clubs, meals, local recycling days or regular meetings, rather than one-off calendar events. Namely the sort of thing that you might not put in a calendar, because it would clutter up your usual view of special events.

                L 1 Reply Last reply Jan 25, 2017, 10:25 AM Reply Quote 0
                • L Offline
                  lucallmon @nimasmi
                  last edited by Jan 25, 2017, 10:25 AM

                  @nimasmi gotcha. thanks.

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    nimasmi
                    last edited by Jan 25, 2017, 10:29 AM

                    @shashank I noted a difference in the name of the module at https://github.com/nimasmi/MMM-repeating-schedule/blob/master/MMM-repeating-schedule.js. In the JS code it’s MMM-weekly-schedule compared to in the README, where it’s MMM-repeating-schedule. I haven’t had chance to test properly whether it is fixed by making these references consistent.

                    The discrepancy is due to a last-minute name change before first posting here, in order to better to communicate the purpose of the module. I don’t have an actual magic mirror, and haven’t used this module since first writing it, so apologies for the oversight. I’ll update and feed back when I can.

                    S 1 Reply Last reply Jan 25, 2017, 1:08 PM Reply Quote 0
                    • S Offline
                      shashank @nimasmi
                      last edited by Jan 25, 2017, 1:08 PM

                      @nimasmi Hi, Thanks module is working fine after making changes in MMM-repeating-schedule.js . I changed Module.register from (“MMM-weekly-schedule”, to Module.register(“MMM-repeating-schedule”, and also ‘MMM-weekly-schedule.css’, to
                      ‘MMM-repeating-schedule.css,’.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        10/17
                        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