MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    MMM-ProfileSwitcher, A Profile/User/Layout Switching Module

    Utilities
    user switch profile layout module
    21
    91
    61329
    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.
    • tosti007
      tosti007 Module Developer last edited by tosti007

      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.


      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 Reply Quote 2
      • Snille
        Snille Module Developer last edited by

        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

        paviro tosti007 2 Replies Last reply Reply Quote 0
        • paviro
          paviro Admin @Snille last edited by

          @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
          • tosti007
            tosti007 Module Developer @Snille last edited by

            @Snille first of all you’re welcome 😃 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
            • tosti007
              tosti007 Module Developer last edited by

              @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
              • tosti007
                tosti007 Module Developer last edited by

                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
                • Snille
                  Snille Module Developer last edited by Snille

                  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

                  tosti007 1 Reply Last reply Reply Quote 0
                  • tosti007
                    tosti007 Module Developer @Snille last edited by tosti007

                    @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 😃

                    		{
                    			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

                    Snille tosti007 2 Replies Last reply Reply Quote 0
                    • Snille
                      Snille Module Developer @tosti007 last edited by

                      @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

                      tosti007 1 Reply Last reply Reply Quote 0
                      • tosti007
                        tosti007 Module Developer @Snille last edited by tosti007

                        @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

                        Snille 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 9
                        • 10
                        • 1 / 10
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy