• 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-ProfileSwitcher, A Profile/User/Layout Switching Module

Scheduled Pinned Locked Moved Utilities
userswitchprofilelayoutmodule
91 Posts 21 Posters 111.3k Views 23 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.
  • T Offline
    tosti007 Module Developer
    last edited by tosti007 May 6, 2017, 11:47 PM Jan 12, 2017, 2:21 PM

    This Module adds the ability to have different layouts for different profiles. I noticed that other were looking for it aswell and might not want to have Paviro’s Facial Recognition Module with it.
    This module uses the configured module’s classes and hides/shows them according to the current active profile.

    Features

    • Set any number of modules per profile
    • Use module name as profile
    • Configure multiple profiles
    • Set module for every profile
    • Set multiple custom messages for each profile (randomly chosen)

    You can find it here.
    [card:tosti007/MMM-ProfileSwitcher]


    Version 1

    • First version and implementation
    • Bug fixes and minor changes
    • Added random chosen message

    Version 2

    • Added configurable timers!
    • Add the use of lockstrings (thanks to @Jopyth)
    • Support older browsers
    • Added Spanish translations (thanks to @roramirez)

    Version 2.1

    • Added possibility to set a timer on the default class
    • Added French translation (thanks to @PatriceG)

    If you have any questions or requests for future features, don’t hesitate to ask!
    Note: If you use this module in combination with Paviro’s Facial Recognition Module and you update his then don’t forget to update this module and read the line numbers again.

    If there is anything don't hesitate to contact me!
    ProfileSwitcher, TouchNotifications

    L 1 Reply Last reply Mar 5, 2017, 11:42 PM Reply Quote 2
    • S Offline
      Snille Module Developer
      last edited by Jan 13, 2017, 9:40 AM

      Hi! Thank you for this! I will be using your module with MMM-Facial-Recognition.
      I’m not sure but I think he updated his module today (11h ago). So I think the line numbers in your installation instructions may be wrong…
      Can you maybe describe the lines to remove a little so I can find them in the “new” code? :)

      Thank you!

      If you cant find it, make it and share it!
      Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

      P T 2 Replies Last reply Jan 13, 2017, 6:35 PM Reply Quote 0
      • P Offline
        paviro Admin @Snille
        last edited by Jan 13, 2017, 6:35 PM

        @Snille We are working on an optional setting :) Just wait some more days and you won’t need to modify any code!

        We're all stories in the end. Just make it a good one, eh?

        – The Doctor

        1 Reply Last reply Reply Quote 1
        • T Offline
          tosti007 Module Developer @Snille
          last edited by Jan 14, 2017, 1:27 AM

          @Snille first of all you’re welcome :D and exactly what @paviro says :) I already wrote him about this and the code has been writen. We will have to test it and maybe make some modifications and once it’s fully implemented I will change my readme! About the line numbers: yes you are right. I will update that tomorrow morning.

          If there is anything don't hesitate to contact me!
          ProfileSwitcher, TouchNotifications

          1 Reply Last reply Reply Quote 1
          • T Offline
            tosti007 Module Developer
            last edited by Jan 15, 2017, 1:35 AM

            @all I think the module is in a stable version for now. I might update the readme in the near future for the new compatability with MMM-Facial-Recognition.

            I am curious if people would be interested in having the ability to have multiple profiles active. This could be fairly easily implemented, but I don’t know if anyone actually wants this feature. If you do please let me know and I will give it a go!

            If there is anything don't hesitate to contact me!
            ProfileSwitcher, TouchNotifications

            1 Reply Last reply Reply Quote 0
            • T Offline
              tosti007 Module Developer
              last edited by Jan 15, 2017, 5:13 PM

              Apperantly the first link was broken, I added a bracket too much. Fixed now :)

              If there is anything don't hesitate to contact me!
              ProfileSwitcher, TouchNotifications

              1 Reply Last reply Reply Quote 0
              • S Offline
                Snille Module Developer
                last edited by Snille Jan 20, 2017, 11:23 PM Jan 20, 2017, 8:03 PM

                Hi again, have the face recognition module and yours been “integrated” yet? I saw your pull request on there, but now it looks like it’s a conflict? I have modified per your instructions so that it works now, but I keep getting notifications about the face recognition module update… But i don’t dare to update. :)

                Another matter… I sometimes get greetings and leave messages in german (I think?) even though I have defined my own.
                And, is there a way to disable the title “Benutzer Profile” showing up above the message in the “popup” when you are greeted? Found it… :)

                My module conf:

                		{
                			module: "MMM-ProfileSwitcher",
                			header: "Profile",
                			config: {
                				enterMessages: {
                					"Snille Louise Martin": "Hej %profile%!",
                					"Snille": ["Hoppas dagen varit bra!", "Ser man på, välkommen!"], 
                					"Louise": ["Kul i skolan idag?", "Kul att ses!"], 
                					"Martin": ["Kul att ses!", "Allt bra?"] 
                				},
                				leaveMessages: {
                					"everyone": "Ses snart %person%!", 
                					"Snille": ["Hej då, jag kommer sakna dig...", true] 
                				}
                			}
                		},
                

                Thank you for the great module!

                Best regards Snille

                If you cant find it, make it and share it!
                Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                T 1 Reply Last reply Jan 20, 2017, 11:23 PM Reply Quote 0
                • T Offline
                  tosti007 Module Developer @Snille
                  last edited by tosti007 Jan 20, 2017, 11:26 PM Jan 20, 2017, 11:23 PM

                  @Snille about the facial recognition: @paviro would do some testing first and make sure everything works fine and then it’s still up to him to merge the pull request. About the conflict: yes I am aware that he changed his codebut forgot to update my pull request and I will update the line numbers aswell, thank you! I will let you know when I changed it.

                  About the German xD that’s really odd, do you have your global language settings on German? If you don’t it shouldn’t be German.
                  To disable the title set the title value of the module’s config to false. Like so: alright :D

                  		{
                  			module: "MMM-ProfileSwitcher",
                  			header: "Profile",
                  			config: {
                                                  title: false,
                  				enterMessages: {
                  					"Snille Louise Martin": "Hej %profile%!",
                  					"Snille": ["Hoppas dagen varit bra!", "Ser man på, välkommen!"], 
                  					"Louise": ["Kul i skolan idag?", "Kul att ses!"], 
                  					"Martin": ["Kul att ses!", "Allt bra?"] 
                  				},
                  				leaveMessages: {
                  					"everyone": "Ses snart %person%!", 
                  					"Snille": ["Hej då, jag kommer sakna dig...", true] 
                  				}
                  			}
                  		},
                  

                  And I am really happy to hear that you are enjoying the module :)

                  If there is anything don't hesitate to contact me!
                  ProfileSwitcher, TouchNotifications

                  S T 2 Replies Last reply Jan 20, 2017, 11:29 PM Reply Quote 0
                  • S Offline
                    Snille Module Developer @tosti007
                    last edited by Jan 20, 2017, 11:29 PM

                    @tosti007 Hehe, I just edited my post when you replied. Found the title thing… Sorry for not reading… :)
                    I have my language like so:

                    	ipWhitelist: [
                    		"127.0.0.1",
                    		"::ffff:127.0.0.1",
                    		"::1",
                    		"::ffff:10.0.0.1/120" 
                    	],
                    	language: "sv",
                    	modules: [
                    

                    Seems to work with the clock at least (get the swedish names of the days. :)…
                    I just saw a “leave message” in german… I have to try to grab a screenshot…

                    If you cant find it, make it and share it!
                    Modules: MMM-homeassistant-sensors, MMM-Modulebar, MMM-Profilepicture, MMM-Videoplayer

                    T 1 Reply Last reply Jan 20, 2017, 11:34 PM Reply Quote 0
                    • T Offline
                      tosti007 Module Developer @Snille
                      last edited by tosti007 Jan 20, 2017, 11:35 PM Jan 20, 2017, 11:34 PM

                      @Snille ah yea I don’t have Swedish translations (I only speak English, German and Dutch and that’s more than enough imo xD) and apparently it chooses German then instead.
                      Try setting includeEveryoneMessages to false in the config. It shouldn’t show up then but if it doesn’t let me know.

                      If there is anything don't hesitate to contact me!
                      ProfileSwitcher, TouchNotifications

                      S 1 Reply Last reply Jan 20, 2017, 11:38 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 9
                      • 10
                      • 1 / 10
                      1 / 10
                      • First post
                        3/91
                        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