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-CalendarExt cant get the calendar to show

    Scheduled Pinned Locked Moved Troubleshooting
    23 Posts 8 Posters 14.8k Views 9 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.
    • cruunnerrC Offline
      cruunnerr @Guest
      last edited by cruunnerr

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • cruunnerrC Offline
        cruunnerr
        last edited by cruunnerr

        @Sean said in MMM-CalendarExt cant get the calendar to show:

        pm2 log mm

        So i set a a new installation of MM 2.1.3
        i can’t get the calendar to show up.

        pi@raspberrypi:~ $ pm2 log mm
        [TAILING] Tailing last 15 lines for [mm] process (change the value with --lines option)
        /home/pi/.pm2/logs/mm-error-0.log last 15 lines:
        0|mm       | ERROR! Could not validate main module js file.
        0|mm       | /home/pi/MagicMirror/modules/MMM-CalendarExt/MMM-CalendarExt.js:182
        0|mm       |   addCalendars: async function() {
        0|mm       |                       ^^^^^^^^
        0|mm       | SyntaxError: Unexpected token function
        0|mm       |     at Object.exports.runInThisContext (vm.js:76:16)
        0|mm       |     at Module._compile (module.js:528:28)
        0|mm       |     at Object.Module._extensions..js (module.js:565:10)
        0|mm       |     at Module.load (module.js:473:32)
        0|mm       |     at tryModuleLoad (module.js:432:12)
        0|mm       |     at Function.Module._load (module.js:424:3)
        0|mm       |     at Module.require (module.js:483:17)
        0|mm       |     at require (internal/module.js:20:19)
        0|mm       |     at Class.loadModuleDefaultConfig (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:254:17)
        0|mm       |     at /home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:211:10
        
        /home/pi/.pm2/logs/mm-out-0.log last 15 lines:
        0|mm       | Connecting socket for: MMM-NOAA
        0|mm       | Starting module: MMM-NOAA
        0|mm       | Connecting socket for: MMM-MyCommute
        0|mm       | ====================== Starting node_helper for module [MMM-MyCommute]
        0|mm       | Connecting socket for: MMM-SystemStats
        0|mm       | Connecting socket for: newsfeed
        0|mm       | Starting module: newsfeed
        0|mm       | Connecting socket for: MMM-CalendarExt
        0|mm       | Sockets connected & modules started ...
        0|mm       | Launching application.
        0|mm       | Create new calendar fetcher for url: xxx - Interval: 300000
        0|mm       | Create new calendar fetcher for url: http://i.cal.to/ical/61/nrw/feiertage/71e91ccb.83fad41c-d19fda68.ics - Interval: 300000
        0|mm       | Create new news fetcher for url: http://www.tagesschau.de/xml/rss2 - Interval: 300000
        0|mm       | [RCREPO] Repository scanning...
        0|mm       | [RCREPO] modules.json is updated.
        
        pi@raspberrypi:~/MagicMirror $ npm start dev
        
        > magicmirror@2.1.3 start /home/pi/MagicMirror
        > sh run-start.sh "dev"
        
        Starting MagicMirror: v2.1.3
        Loading config ...
        Loading module helpers ...
        No helper found for module: alert.
        Initializing new module helper ...
        Module helper loaded: MMM-Remote-Control
        Initializing new module helper ...
        Module helper loaded: MMM-Remote-Control-Repository
        Initializing new module helper ...
        Module helper loaded: MMM-PIR-Sensor
        Initializing new module helper ...
        Module helper loaded: updatenotification
        No helper found for module: clock.
        Initializing new module helper ...
        Module helper loaded: calendar
        Initializing new module helper ...
        Module helper loaded: MMM-NOAA
        Initializing new module helper ...
        Module helper loaded: MMM-MyCommute
        Initializing new module helper ...
        Module helper loaded: MMM-SystemStats
        No helper found for module: MMM-GoogleMapsTraffic.
        Initializing new module helper ...
        Module helper loaded: newsfeed
        Initializing new module helper ...
        Module helper loaded: MMM-CalendarExt
        All module helpers loaded.
        Starting server on port 8080 ... 
        You're using a full whitelist configuration to allow for all IPs
        Server started ...
        Connecting socket for: MMM-Remote-Control
        Starting node helper for: MMM-Remote-Control
        Connecting socket for: MMM-Remote-Control-Repository
        Connecting socket for: MMM-PIR-Sensor
        Connecting socket for: updatenotification
        Connecting socket for: calendar
        Starting node helper for: calendar
        Connecting socket for: MMM-NOAA
        Starting module: MMM-NOAA
        Connecting socket for: MMM-MyCommute
        ====================== Starting node_helper for module [MMM-MyCommute]
        Connecting socket for: MMM-SystemStats
        Connecting socket for: newsfeed
        Starting module: newsfeed
        Connecting socket for: MMM-CalendarExt
        Sockets connected & modules started ...
        Whoops! There was an uncaught exception...
        { Error: listen EADDRINUSE 0.0.0.0:8080
            at Object.exports._errnoException (util.js:1026:11)
            at exports._exceptionWithHostPort (util.js:1049:20)
            at Server._listen2 (net.js:1253:14)
            at listen (net.js:1289:10)
            at net.js:1399:9
            at _combinedTickCallback (internal/process/next_tick.js:77:11)
            at process._tickCallback (internal/process/next_tick.js:98:9)
            at Module.runMain (module.js:592:11)
            at run (bootstrap_node.js:402:7)
            at startup (bootstrap_node.js:157:9)
          code: 'EADDRINUSE',
          errno: 'EADDRINUSE',
          syscall: 'listen',
          address: '0.0.0.0',
          port: 8080 }
        MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
        If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
        Launching application.
        ERROR! Could not validate main module js file.
        /home/pi/MagicMirror/modules/MMM-CalendarExt/MMM-CalendarExt.js:182
          addCalendars: async function() {
                              ^^^^^^^^
        SyntaxError: Unexpected token function
            at Object.exports.runInThisContext (vm.js:76:16)
            at Module._compile (module.js:528:28)
            at Object.Module._extensions..js (module.js:565:10)
            at Module.load (module.js:473:32)
            at tryModuleLoad (module.js:432:12)
            at Function.Module._load (module.js:424:3)
            at Module.require (module.js:483:17)
            at require (internal/module.js:20:19)
            at Class.loadModuleDefaultConfig (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:254:17)
            at /home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:211:10
        

        Any idea?

        ? 1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User @cruunnerr
          last edited by

          @cruunnerr
          Async functions are not supported by Node versions older than version 7.6.

          1 Reply Last reply Reply Quote 0
          • cruunnerrC Offline
            cruunnerr
            last edited by cruunnerr

            @Sean
            U think i need to do an update of node?

            So u wanna hear a fun fact?

            On my Mirror itself nothings shows up.
            BUT, when i go to the MagicMirror website via browser or the MMM-RemoteControl it is right there!

            Can anyone explain that?

            the config i test it:

                           {
                                    module: 'MMM-CalendarExt',
                                    position: "bottom_bar",
                                    config: {
                                                  system: {
                                                  show: ['month'],
                                                  },
                                                  views: {
                                                  month: {
                                                  position:'bottom_bar',
                                                  },
                                                  },
                                                  calendars :[
                                                  {
                                                  url: "https://ics.fixtur.es/v2/eintracht-frankfurt.ics"
                                                  },
                                                  ]
                                        }
                            },
            

            alt text

            1 Reply Last reply Reply Quote 0
            • M Offline
              Major
              last edited by

              @cruunnerr

              I just ran an update this morning and I am having the exact problem.

              Same error, and it works through a web browser…

              Have you found a resolution?

              Did updating node help? If so, how do you update it?

              Thank you for your help,
              Major

              F 1 Reply Last reply Reply Quote 0
              • F Offline
                fering3 @Major
                last edited by

                I’m having the same issue for the past few days.

                Updated to the latest release of MM today hoping it would solve it somehow but no luck.

                1 Reply Last reply Reply Quote 0
                • F Offline
                  fering3
                  last edited by

                  Quick update. I hacked around some updates to Node, npm etc, but nothing seemed to work.

                  So I removed the async and the await from the addCalendars function so it looks something like this (file: MMM-CalendarExt.js)

                  addCalendars: function() {
                     var self = this
                     for (var c in this.CurrentConfigs.calendars) {
                       self.addCalendar(self.CurrentConfigs.getCalConfig(c))
                       sleep(1000)
                     }
                   },
                  

                  Seems to work for now. But looking back through github I don’t see that these are recent additions so I don’t know why this started failing now. Hopefully somebody smarter than I will figure it out.

                  1 Reply Last reply Reply Quote 0
                  • cruunnerrC Offline
                    cruunnerr
                    last edited by cruunnerr

                    Significantly Changes in the new update is the use of electron 1.4.15.
                    I used it already before the update, but i don’t want to update (cause of the CPU trouble thing…) to check if it is the reason.
                    but that is the only thing that comes to my mind, since you both got the problem when updating to the newest MM-Version

                    1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User
                      last edited by

                      I doubt MM has downgraded its node version of electron for some reason.
                      Unfortunately, ‘async function’ is not working on the lower version of node. I think that is the reason for this issue.
                      I’ll check and patch this for some time. Sorry, I should do my job first before this. Plz wait for a while.

                      Hein-JanH 1 Reply Last reply Reply Quote 0
                      • Hein-JanH Offline
                        Hein-Jan @Guest
                        last edited by

                        @Sean

                        If I read this right:

                        Changed

                        * Calender week is now handled with a variable translation in order to move number language specific.
                        * Reverted the Electron dependency back to 1.4.15 since newer version don’t seem to work on the Raspberry Pi very well.
                        

                        MM has indeed downgraded…

                        1 Reply Last reply Reply Quote 0
                        • cruunnerrC Offline
                          cruunnerr
                          last edited by cruunnerr

                          yeah, its all discussed in this thread: https://forum.magicmirror.builders/topic/4684/electron-cpu-usage?page=1

                          I had the problem, too. CPU Usage above 80%.
                          When i downgrade to electron 1.4.15 the CPU usage went to nearly 0% !

                          But then i went to the Problem that the CalendarExt Module only shows in an external web browser and not on the MM itself.

                          Think we have to hope, that Sean will find a solution. :D
                          (Or the electron Problem is gone…)

                          N 1 Reply Last reply Reply Quote 0
                          • N Offline
                            ninjabreadman @cruunnerr
                            last edited by

                            @cruunnerr Did you try the solution I suggested here? https://forum.magicmirror.builders/topic/6047/calendar-module-won-t-show-all-events/4

                            Problem with config or JavaScript? Copy/paste it into JSHint.
                            Check out the detailed walkthroughs on install, config, modules, etc.

                            1 Reply Last reply Reply Quote 0
                            • cruunnerrC Offline
                              cruunnerr
                              last edited by

                              Yeah i saw this and tried it. Works great :) Thank you

                              1 Reply Last reply Reply Quote 0
                              • T Offline
                                Turtle
                                last edited by

                                Hello my name is TL and I’m very very very new. I’m just trying to get something to show up and it seems that when I start the MagicMirror that I get all the other modules but the CalendarExt module. For some odd reason I have a feeling I’m missing something rather simple. Below is a copy of my config file and my npm start dev below:.

                                 *
                                 * By Michael Teeuw http://michaelteeuw.nl
                                 * MIT Licensed.
                                 *
                                 * For more information how you can configurate this file
                                 * See https://github.com/MichMich/MagicMirror#configuration
                                 *
                                 */
                                
                                var config = {
                                	address: "localhost", // Address to listen on, can be:
                                	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                                	                      // - another specific IPv4/6 to listen on a specific interface
                                	                      // - "", "0.0.0.0", "::" to listen on any interface
                                	                      // Default, when address config is left out, is "localhost"
                                	port: 8080,
                                	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
                                	                                                       // or add a specific IPv4 of 192.168.1.5 :
                                	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                                	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                                	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
                                
                                	language: "en",
                                	timeFormat: 24,
                                	units: "metric",
                                
                                	modules: [
                                		{
                                			module: "alert",
                                		},
                                		{
                                			module: "updatenotification",
                                			position: "top_bar"
                                		},
                                		{
                                			module: "clock",
                                			position: "top_left"
                                		},
                                		{
                                			module: 'MMM-CalendarExt',
                                			position: "top_left", //anywhere. It is not related to real position of view
                                			config: { // Read below
                                			  system:{
                                			    show: ['daily'],
                                			    locale: '', //when omitted, default value would be your system default locale by moment.js
                                			    showEmptyView: 1,
                                			    fullDayEventLocalize: 1,
                                			    redrawInterval: 30*60*1000, //minimum 60000
                                			    useProfileConfig: 0,
                                  			    startProfile: ''
                                			  },
                                			  defaultView: {
                                			    position: 'bottom_bar',
                                			    positionOrder: -1,
                                			    overflowRolling: 0,
                                			    overflowHeight: 0,
                                			    overflowDuration: 2,
                                			    timeFormat: 'HH:mm',
                                			    dateFormat: "MMM Do",
                                		    	    fullDayEventDateFormat: "MMM Do",
                                			    ellipsis: 0,
                                			    limit:0,
                                			    oneLineEvent:0,
                                			    replaceTitle:[],
                                			    classPattern:[],
                                			    classPatternWhere:["title"],
                                			    symbolPattern:[],
                                			    symbolPatternWhere:["title"]
                                			  },
                                			  views: {
                                                             month: {
                                				showWeeks: 1,
                                				weeksTitle: 'weeks',
                                				weeksFormat: 'wo',
                                				weekdayFormat: 'dd',
                                				titleFormat : 'D',
                                				overTitleFormat : 'MMM D',
                                				monthTitleFormat: "MMMM",
                                			     },
                                			     weeks: {
                                				showWeeks: 1,
                                				weeksTitle: 'weeks',
                                				weeksFormat: 'wo',
                                				weekdayFormat: 'dd',
                                				titleFormat : 'MMM D',
                                				overTitleFormat : 'MMM D',
                                				counts: 4,
                                			     },
                                			     daily: {
                                			        direction: 'row',
                                			        counts: 5,
                                			        titleFormat: "D",
                                			        overTitleFormat: "MMM D",
                                				subtitleFormat: "ddd",
                                			     },
                                			     weekly: {
                                			        direction: 'row',
                                			    	counts: 4,
                                			    	titleFormat: "wo",
                                			    	overTitleFormat: "gggg wo",
                                			    	subtitleFormat: "MMM Do",
                                			     },
                                			     monthly: {
                                			    	direction: 'row',
                                			    	counts: 3,
                                			    	titleFormat: "MMMM",
                                			    	overTitleFormat: "YYYY MMM",
                                				subtitleFormat: "YYYY",
                                  			     },
                                			     current: {
                                				title: 'Current',
                                    				useRelative: 1
                                			     },
                                			     upcoming: {
                                				title: 'Upcoming',
                                    				useRelative: 1
                                			     },
                                			  },
                                		          defaultCalendar: {
                                			     profiles: [],
                                				views: [],
                                				symbol: "",
                                				styleName: "",
                                				replaceTitle:[],
                                				classPattern: [],
                                				classPatternWhere: ["title"],
                                				symbolPattern: [],
                                				symbolPatternWhere: ["title"],
                                				maxEntries:50,
                                				maxDays:180,
                                				interval: 1800000,
                                			  },
                                			  calendars: [
                                			    {
                                			      name: "Schooldays of John",
                                				url: "https://school.com/schedule.ics",
                                				auth: {
                                				user:'john',
                                				pass:'abcd1234',
                                				method:'bearer'
                                    			  }
                                			},
                                		        {
                                			      name: "US Holiday",
                                				url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics",
                                				profile: ['daddy'],
                                				views: ['month', 'upcoming'],
                                				styleName: "style1",
                                				symbol: 'us@fi',
                                				maxEntries: 50,
                                				maxDays:365,
                                				interval: 24*60*60*1000,
                                			}
                                			    
                                		],
                                			  profileConfigs: {
                                			    "Tom" : {},
                                		         
                                			  }
                                			},
                                		},
                                
                                		{
                                			module: "compliments",
                                			position: "lower_third"
                                		},
                                		{
                                			module: "currentweather",
                                			position: "top_right",
                                			config: {
                                				location: "New York",
                                				locationID: "",  //ID from http://www.openweathermap.org/help/city_list.txt
                                				appid: "YOUR_OPENWEATHER_API_KEY"
                                			}
                                		},
                                		{
                                			module: "weatherforecast",
                                			position: "top_right",
                                			header: "Weather Forecast",
                                			config: {
                                				location: "New York",
                                				locationID: "5128581",  //ID from http://www.openweathermap.org/help/city_list.txt
                                				appid: "YOUR_OPENWEATHER_API_KEY"
                                			}
                                		},
                                		{
                                			module: "newsfeed",
                                			position: "bottom_bar",
                                			config: {
                                				feeds: [
                                					{
                                						title: "New York Times",
                                						url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                                					}
                                				],
                                				showSourceTitle: true,
                                				showPublishDate: true
                                			}
                                		},
                                	]
                                
                                };
                                
                                /*************** DO NOT EDIT THE LINE BELOW ***************/
                                if (typeof module !== "undefined") {module.exports = config;}
                                
                                

                                Here is my npm start dev:

                                pi@raspberrypi:~/MagicMirror $ npm start dev
                                npm ERR! Error: ENOENT: no such file or directory, open '/home/pi/MagicMirror/node_modules/dev/package.json'
                                npm ERR!     at Error (native)
                                npm ERR! If you need help, you may report this *entire* log,
                                npm ERR! including the npm and node versions, at:
                                npm ERR!     
                                
                                npm ERR! System Linux 4.9.59-v7+
                                npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "start" "dev"
                                npm ERR! cwd /home/pi/MagicMirror
                                npm ERR! node -v v4.8.2
                                npm ERR! npm -v 1.4.21
                                npm ERR! path /home/pi/MagicMirror/node_modules/dev/package.json
                                npm ERR! syscall open
                                npm ERR! code ENOENT
                                npm ERR! errno -2
                                npm ERR! 
                                npm ERR! Additional logging details can be found in:
                                npm ERR!     /home/pi/MagicMirror/npm-debug.log
                                npm ERR! not ok code 0
                                pi@raspberrypi:~/MagicMirror $ 
                                

                                Thank you.

                                1 Reply Last reply Reply Quote 0

                                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                With your input, this post could be even better 💗

                                Register Login
                                • 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