• 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-Page-Selector: A page switcher that can set positions of modules

Scheduled Pinned Locked Moved System
94 Posts 14 Posters 77.0k Views 15 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.
  • V Offline
    Veldrovive Module Developer
    last edited by Nov 12, 2018, 4:10 PM

    @Banandze,
    I’m going to address the issue with the switching only working four times before shutting down. First, are you using pm2 to manage you mirror? If that is the case, try just starting it from a terminal instance so it does not automatically restart if it crashes.
    When I said “Is there any output to the console”, what I meant is, in the terminal window where you started magic mirror, is there any text that prints out when the issues start? Also, in your electron instance, in the top menu, when you click on view then toggle developer tools, it will bring up a window with a console in it. If there is anything in red there I would like to see it.
    What I am assuming is happening is that magic mirror itself is running out of resources and causing the issues.

    I am not quite certain what you mean by:
    “I put first one upper in config file and wrote “top_left” for both modules but they are shown in wrong way”
    Are you saying that you want one module to appear above another, but it is instead appearing below? If that is the case then I will need to see your config again to know exactly what you mean and attempt to fix the problem.

    1 Reply Last reply Reply Quote 0
    • B Offline
      Banandze
      last edited by Nov 13, 2018, 3:13 PM

      @Veldrovive I will try it on the weekend. Yes, you ynderstand me with the problem of appearing. There is my config

      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: "ru",
      	timeFormat: 24,
      	units: "metric",
      
      	modules: [
                      {
      			"module": "MMM-Page-Selector",
      			"position": "top_center",
      			"config": {
      				"defaultPage": "главная",
      				"displayTitle": true,
      				"selectPageNotif": [],
      				"incrementPageNotif": [],
      				"decrementPageNotif": []
      			}
      		},
                      {
                         module: 'MMM-page-indicator',
                         position: 'bottom_bar',
                         "pages": "all",
                         config: {
                         pages: 6,
                         activeBright: true,
                         inactiveHollow: true,
                         }
                      },
      		{
           			module: "alert",
                              "pages": "all",
      		},
                      {
      		module: 'MMM-PIR-Sensor',
      	        "pages": "all",
                 	config: {
                               sensorPIN: 22,
                               powerSaving: true,
                               powerSavingDelay: 120,
                              // See 'Configuration options' for more information.
      		}
                	},
                      {
                      module:     'MMM-3Day-Forecast',
                      position:   'top_right',
                      "pages": {"главная": "top_right"},
               	config: {
      		api_key:    '2f91769xxxxxxxxxxxxxxx',
      		lat:        54.61972,
      		lon:        39.740002,
      		units:      'M',
      		lang:       'ru',
      		interval:   900000,
                	}
                      },
                      {
      		module: "currentweather",
      		position: "top_right",
                      animationSpeed: 500,                     	// This can be any of the regions.
      		"pages": {"погода": "top_left"},							// Best results in left or right regions.
      		config: {
      			// See 'Configuration options' for more information.
      			location: "Рязань",
      			locationID: "500096", //Location ID from http://openweathermap.org/help/city_list.txt
      			appid: "ab3164xxxxxxxxxxxx" //openweathermap.org API key.
      		}
                  	},
                      {
                      module: "MMM-EARTH",
                      position: "bottom_center",
                      "pages": {"погода": "middle_center"},
                      config: {
                      mode: "Natural",
                      rotateInterval: 5000,
                      MaxWidth: "50%",
                      MaxHeight: "50%",
                      }
                      },
                      {
                      module: "weatherforecast",
                      position: "left",       // This can be any of the regions.
                      colored: true,
                      pages: {погода: "left"}, 
                      config: {
                              // See 'Configuration options' for more information.
                              location: "Рязань",
                              locationID: "500096", //Location ID from http://openwea$
                              appid: "ab31646bxxxxxxxxxxxxx" //openweather
                      }
                      },
      	        {
      			module: "updatenotification",
      			position: "top_bar",
                              "pages": "all",
      	       	},
      		{
      			module: "clock",
      			position: "top_left",
                              "pages":{"главная": "top_left", "погода": "top_left", "почта": "top_left", "новости": "top_left", "календарь": "top_left", "фото": "top_left" },
      		},
      		{
      			module: "calendar",
      			header: "US Holidays",
      			position: "top_left",
      	                "pages": {"календарь": "upper-third"},	
                      	config: {
      				calendars: [
      					{
      						symbol: "calendar-check-o ",
      						url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
               				}
      				]
      			}
      		},
      		{
              		module: "newsfeed",
      			position: "bottom_bar",
      			"pages": {"главная": "bottom_bar", "новости": "bottom_bar"},
                              config: {
      				feeds: [
      					{
      						title: "Финансовые новости MFD",
      						url: "http://mfd.ru/rss/news/handler.ashx"
      					}
      				],
      				showSourceTitle: true,
      				showPublishDate: true
      			}                      
                  	},
                      {
      			"module": "MMM-Cursor",
      		},
      	]
      
      };
      
      
      1 Reply Last reply Reply Quote 0
      • V Offline
        Veldrovive Module Developer
        last edited by Nov 13, 2018, 10:05 PM

        @Banandze,
        I’ll take a look at it. It is very possible that I made a mistake while refactoring and module precedence has been swapped.

        1 Reply Last reply Reply Quote 0
        • V Offline
          Veldrovive Module Developer
          last edited by Nov 13, 2018, 10:09 PM

          Changes that edit the way users must set up their config.js file have been made to this module. The position prop is no longer necessary to have inside the module config and the way to exclusions are handled has changed. For more information, look at the updated readme in the development branch of the GitHub page.
          These changes will be merged into the master branch in a couple of days which will cause errors if your config is not updated.

          1 Reply Last reply Reply Quote 1
          • R Offline
            rudibarani Project Sponsor
            last edited by rudibarani Nov 17, 2018, 12:54 AM Nov 16, 2018, 8:56 PM

            Dear @Veldrovive,

            would it be possible to add an option to make the current page persistent until the next page change?

            I have to use cases where this would help:

            • if the Pi restarts, the Mirror always shows the standard page - no matter what page was active before the restart.
            • if you open the Mirror on a browser (e.g. mobile phone), you always see the standard page until the next page change happens.

            In both cases, if would be great to see the currently “active” page. Maybe there is a way to store and restore the current page?

            Thanks a lot for your active development of the module!

            1 Reply Last reply Reply Quote 0
            • V Offline
              Veldrovive Module Developer
              last edited by Nov 17, 2018, 12:26 AM

              Persistent properties such as those could be achieved through a temp file so definitely something that could be implemented.
              My reading week is over so I don’t have as much time to do development now, but I’ll get it done in some free time.

              R 1 Reply Last reply Nov 17, 2018, 12:39 AM Reply Quote 0
              • R Offline
                rudibarani Project Sponsor @Veldrovive
                last edited by Nov 17, 2018, 12:39 AM

                @veldrovive That would be great - thanks a lot!!!
                You could implement it as an option for the config part - maybe there are people out there that like to have a fallback to the standard page.

                1 Reply Last reply Reply Quote 0
                • V Offline
                  Veldrovive Module Developer
                  last edited by Nov 17, 2018, 12:42 AM

                  Yea. I’m trying my best not to change base functionality so any sort of bells and whistles like this will have to be manually activated.

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rudibarani Project Sponsor
                    last edited by Nov 20, 2018, 5:25 AM

                    @Veldrovive If I got your new pages-implementation right, we define a name for a module which is later used to organize the page layout. Is that correct? Would it be possible to give multiple names to the same module (not have on module configured and shown multiple times via different names)?

                    It would be helpful for modules with rate-limited APIs, if different parts of one module should be shown at different locations on the same page. I would like to achieve this via a custom css which addresses your name-tag.

                    If this where possible, I would like to take this one step further in the future and implement a distance based layout which keeps the information most important to me readable throughout the room, when I prepare for my way to work. Changing the layout via css could be dynamic and would not involve a whole page refresh as it occurs when switching between pages.

                    1 Reply Last reply Reply Quote 0
                    • V Offline
                      Veldrovive Module Developer
                      last edited by Nov 20, 2018, 3:44 PM

                      Ok, I’ve implemented persistent pages. In order to access them right now, you need to be in the development branch since I don’t have the time to do extensive testing.

                      I’m not exactly sure what you mean when you say “not have on module configured and shown multiple times via different names”. You do not want to have the same module shown multiple times on the same page?
                      If the module was shown multiple times by this module, then all the instances would have the same config and I don’t see how that would help with rate-limited APIs.
                      Could you clarify?

                      R 1 Reply Last reply Nov 25, 2018, 8:32 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 9
                      • 10
                      • 4 / 10
                      4 / 10
                      • First post
                        39/94
                        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