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.

    Calendar does not run on secondary screen

    Scheduled Pinned Locked Moved Solved Troubleshooting
    14 Posts 2 Posters 674 Views 2 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.
    • BKeyportB Online
      BKeyport Module Developer
      last edited by BKeyport

      I’m trying to move my calendar apps to my 2nd screen…

      I’m currently using the old X Window Manager (for now - if someone has a guide to run multi-screen in modern display systems, hit me up)

      As title says, Calendar will not run on the 2nd instance. Logs at debug level show no errors, no warnings, no debug, nothing. Just shows “Loading…” .

      I’m in a server/client environment.

      Also, while clock runs, it’s ignoring the config specified in the module. (oops, forgot to move over the CSS, it does work, just was hard to see due to screen size)

      /* Magic Mirror Config by Brendan Keyport. */
      /* Secondary Display - Office */
      var config = {
      	address: "0.0.0.0",
      	port: 8081, 
      	electronOptions: { 
      		webPreferences: {
      			webSecurity: false,
      			webviewTag: true,
      		},
      		x: 1920
      	},
      	ipWhitelist: [], 
      	language: "en",
      	timeFormat: 12,
      	units: "imperial",
      	logLevel: ["INFO", "LOG", "WARN", "ERROR", "DEBUG"],
      //	customCss: "css/custom2.css",
      	modules: [
      		{
      			module: 'clock', // built-in
      			position: 'top_bar',
      			config: {
      				displaySeconds: true,
      			}
      		},
      		{
      			module: "calendar", // Built in
      			position: "top_left",  // testing mode
      			config: {
      				animationSpeed: 0,
      				broadcastEvents: true,
      				broadcastPastEvents: true,
      				fetchInterval: 60000, // minimum 1 minute. 
      				maximumEntries: 999999,
      				calendars: [
      					{
      						url: "<Redact>",
      						name: "Main",
      						symbol: "calendar",
      						color: "Aqua",
      					},
      					{
      						url: "<redact>",
      						name: "Utility",
      						symbol: "trash-can",
      						color: "Orange",
      					},
      					{
      						url: "<Redact>",
      						name: "Seahawks",
      						symbol: "football",
      						color: "#69BE28",
      					},
      					{
      						url: "<redact>",
      						name: "Sounders",
      						symbol: "futbol",
      						color: "#5D9741",
      					},
      					{
      						url: "<Redact>",
      						name: "Kraken",
      						symbol: "hockey-puck",
      						color: "#99d9d9",
      					},
      					{
      						url: "<redact>",
      						name: "Mariners",
      						symbol: "baseball",
      						color: "#C4CED4",
      					},
      
      					{
      						url: "<redact>",
      						name: "Huskies",
      						symbol: "paw",
      						color: "#ECDCA8",
      					},
      
      					{
      						url: "<redact>",
      						name: "Holidays",
      						symbol: "gift",
      						color: "#FFF",
      					},
      					{
      						url: "<redact>",
      						name: "K7LED",
      						symbol: "walkie-talkie",
      						color: "lime",
      					},
      					{
      						url: "<redact>",
      						name: "Personal",
      					},
      				],
      			},
      		},
      /*************** DO NOT EDIT BELOW ***************/
      	]
      };
      
      if (typeof module !== "undefined") {
      	module.exports = config;
      }
      
      

      The "E" in "Javascript" stands for "Easy"

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @BKeyport
        last edited by

        @BKeyport

        edit MagicMirror/js/server.js

        add these two lines

        				allowEIO3: true,   // line 45
        				pingInterval: 120000,  // server → client ping every 2 mins   //add
        				pingTimeout:  120000   // wait up to 2 mins for client pong   //add	
        

        edit MagicMirror/js/socketclient.js

        add these two lines

            this.socket = io(`/${this.moduleName}`, {  // line 15
                        path: `${base}socket.io`,
                        pingInterval: 120000,  // send pings every 2 mins     // add
                        pingTimeout: 120000    // wait up to 2 mins for a pong  // add
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        BKeyportB S 2 Replies Last reply Reply Quote 0
        • S Offline
          sdetweil @BKeyport
          last edited by sdetweil

          @BKeyport i dont understand what you are saying

          multi screen

          client server

          calendar

          MagicMirror is a browser, it runs on a logical screen

          on a desktop, multiple displays are all one screen

          so are you saying you are vnc’d in with two sessions? two displays?

          multiple web browsers to same MagicMirror server/port will get the same stuff

          multiple web browsers to same server/ different ports will get different stuff ( as configured)

          multiple browsers will appear on the remote system per the system design

          1 minute refresh might not be enough time to get all the entries processed

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          BKeyportB 1 Reply Last reply Reply Quote 0
          • BKeyportB Online
            BKeyport Module Developer @sdetweil
            last edited by BKeyport

            @sdetweil

            Multi-screen: https://docs.magicmirror.builders/configuration/introduction.html#a-couple-of-real-world-examples (remember, I re-wrote this?)

            Client/Server: https://docs.magicmirror.builders/getting-started/installation.html#server-only

            Calendar = default calendar module.

            Most of the calendars are in fact local, so timing don’t matter. The only problem I’m having is that this exact configuration works on the screen running as main monitor, but not on the screen running as secondary. Main monitor’s header info is this:

            var config = {
            	address: "0.0.0.0",
            	port: 8080,
            	ipWhitelist: [],
            	language: "en",
            	timeFormat: 12,
            	units: "imperial",
            	//logLevel: ["INFO", "LOG", "WARN", "ERROR", "DEBUG"],
            

            The "E" in "Javascript" stands for "Easy"

            S 2 Replies Last reply Reply Quote 0
            • S Offline
              sdetweil @BKeyport
              last edited by

              @BKeyport what browser are you using to connect to the MagicMirror instances?

              do you have one MagicMirror folder or two?
              two sep config files, so if one instance you use the MM_CONFIG_FILE env to launch the second

              just trying to get detail so i can repeat this

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @BKeyport
                last edited by sdetweil

                @BKeyport if you manually refresh the page where you are expecting the calendar to display, does it?

                we had/have bug where the socket send of the events from calendar module is not received at the client
                see
                https://github.com/MagicMirrorOrg/MagicMirror/issues/3380

                manual refresh works

                see this for a possible workaround

                https://github.com/MMM-CalendarExt2/MMM-CalendarExt2/issues/393#issuecomment-3075487788

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                BKeyportB 1 Reply Last reply Reply Quote 0
                • BKeyportB Online
                  BKeyport Module Developer @sdetweil
                  last edited by

                  @sdetweil

                  Browser is whatever node uses - same problem occurs on other sessions through chrome like browser on my Main PC (Brave)

                  One magic mirror folder - all configs in MM/Config just numbered.
                  Refresh does nothing. (Via Chrome/Brave).

                  Start MM using this:

                  export MM_CONFIG_FILE=config/config2.js
                  export MM_PORT=8081
                  export ELECTRON_DISABLE_GPU=1
                  DISPLAY=:0 node clientonly --address mirrorserv.local --port 8081
                  

                  The "E" in "Javascript" stands for "Easy"

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @BKeyport
                    last edited by sdetweil

                    @BKeyport ok, just fyi, node doesnt have a browser clientOnly uses electron same as full

                    what os, and this is 2.32, right?

                    can you install MMM-ViewNotifications on the second screen instance and see if the events are broadcast.
                    or look in the output of npm run server to see the broadcast message from the parser…

                    Calendar-Fetcher: Broadcasting 19 events from https://calendar.google.com/calendar/ical
                    

                    I’m running two instances now and they behave as expected…

                    I only have 1 calendar

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    BKeyportB 1 Reply Last reply Reply Quote 0
                    • BKeyportB Online
                      BKeyport Module Developer @sdetweil
                      last edited by

                      @sdetweil

                      ViewNotification doesn’t show anything…

                      When I load the mirror in chrome/brave I get this in console:

                      3a65deaa-e983-460b-be94-97aa758f8fd3-image.png

                      The "E" in "Javascript" stands for "Easy"

                      BKeyportB S 2 Replies Last reply Reply Quote 0
                      • BKeyportB Online
                        BKeyport Module Developer @BKeyport
                        last edited by

                        If the answer appears to be frank’s solution in that other thread, I don’t understand what to do or how to fix it. without knowledge of where he’s working I have no idea where to touch.

                        The "E" in "Javascript" stands for "Easy"

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil @BKeyport
                          last edited by

                          @BKeyport those look like browser side messages not server side

                          franks. i dont know either
                          but ill have something for you in the morning

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          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