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-Navigate, Navigation inside MagicMirror with Rotary Encoder

    Scheduled Pinned Locked Moved System
    45 Posts 6 Posters 17.6k Views 5 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.
    • A Offline
      AxLed Module Developer
      last edited by AxLed

      Here is my first module.

      Description

      A module to connect a rotary encoder to MagicMirror and use it for Navigation inside of MagicMirror I wanted to use interaction to the MagicMirror and decided to use a rotary encoder, which has 3 functions: Clockwise, Counterclockwise and Press. These fucntions where combined to a navigation, so you have some possibilities, f.e.: Page increment/decrement, Newsfeed Article more/less details and actions for notification system. The navigation fades out, if not used.

      Screenshot

      MMM-Navigate

      Download

      [card:Ax-LED/MMM-Navigate]

      Update 06.06.2018
      Version 1.1 is online
      Changelog:

      • added ability to send notifications to MMM-Navigate by other modules
      • added locked mode, so you can put two(2) actions in one(1) navigation link which belong together (like PAGE_INCREMENT and PAGE_DECREMENT). More details see Configuration options (Action).
      • modified css, so locked mode is visual (red frame when locked) in MM
      • added second click confirmation notification’ for the following REMOTE_ACTIONs (SHUTDOWN, RESTART, REBOOT)

      Please let me know what you think.

      AxLED

      yawnsY 1 Reply Last reply Reply Quote 0
      • yawnsY Offline
        yawns Moderator @AxLed
        last edited by yawns

        @axled said in MMM-Navigate, Navigation inside MagicMirror with Rotary Encoder:

        @admins: How can i insert the github card for my module?

        You use this code, just without spaces

        [ card:Ax-LED/MMM-Navigate ]
        
        1 Reply Last reply Reply Quote 0
        • A Offline
          AxLed Module Developer
          last edited by

          Thank you yawns

          1 Reply Last reply Reply Quote 0
          • A Offline
            AxLed Module Developer
            last edited by

            Hi to all,

            version 1.1 is online, details see first topic of this thread.

            AxLED

            1 Reply Last reply Reply Quote 0
            • A Offline
              AgP42 Project Sponsor Module Developer
              last edited by

              Hello,

              I am using your module what is really great and works perfectly fine on my side.

              I configure it to allow some others fonctions, after finding out that the fonctions from the module “MMM-Remote-Control” can be used on your navigation module. I also read part of the “node_helper.js” of this module to try to find out the possibilities avaliable.

              This allow me to add the ability of “refresh” and “monitoroff” and “monitoron” on my navigation menu :

                              {
                                      module: "MMM-Navigate",
                                      header: "Navigation",
                                      position: "middle_center",
                                      config: {
                                                      Alias: [
                                                              'Changer de Page (Press puis rotation)',
                                                              'Luminosité écran (Press puis rotation)',
                                                              'Afficher adresse Remote',
                                                              'Ecran off/on (Press puis rotation)',
                                                              'Recharger affichage',
                                                              'Redemarrer le MagicMirror',
                                                              'Reboot RPI',
                                                              'Shutdown RPI'
                                                      ],
                                                      Action: [
                                                              [{notification:'PAGE_INCREMENT',payload:''},{notification:'PAGE_DECREMENT',payload:''}],//action array, first press locks menu, after this rotation CW/CCW executes, second press release lo$
                                                              [{notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS&value=100"}},{notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS&value=50"}}],
                                                              {notification: "SHOW_ALERT", payload: {type:"notification",message:"http://192.168.xx.xx:8080/remote.html"}},//single action, execute on press
                                                              [{notification: "REMOTE_ACTION", payload: {action: "MONITOROFF"}},{notification: "REMOTE_ACTION", payload: {action: "MONITORON"}}],
                                                              {notification: "REMOTE_ACTION", payload: {action: "REFRESH"}},
                                                              {notification: "REMOTE_ACTION", payload: {action: "RESTART"}},
                                                              {notification: "REMOTE_ACTION", payload: {action: "REBOOT"}},
                                                              {notification: "REMOTE_ACTION", payload: {action: "SHUTDOWN"}}
                                                      ],
                                                      GPIOPins: [26,20,19]//rotary cw, rotary ccw, rotary press (BCM Numbering)
                                                      },
                              },
              
              

              But then I tried 2 others improvment that I couln’t fullfill :

              • change the timer value to display the notification : to do so I add the value “timer” for the notification :
               {notification: "SHOW_ALERT", payload: {type:"notification",message:"http://192.168.xx.xx:8080/remote.html",timer: 15}},
              

              But this had no impact…

              • add the possibility to change the brightness of the screen directly from the navigation menu, to do so I tried :
              [{notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS&value=100"}},{notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS&value=50"}}],
              

              but also :

              [{notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS", value:100}},{notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS", value:50}}],
              

              but no way to make it work…

              Would you have any advice how to realize such fonctions ?

              Thank you in advance,

              1 Reply Last reply Reply Quote 0
              • A Offline
                AxLed Module Developer
                last edited by AxLed

                @AgP42
                Hi,

                thanks for your request, i checked my code and can give you a solution for the brightness issue.
                I found out, that it seems to be a problem with MMM-Remote-Control, node_helper.js

                But there is a workaround:
                Replace line 618
                res.send({"status": "success"});
                through
                if (res) { res.send({"status": "success"}); }

                Thanks to glitch452 who found the error, details see:
                https://github.com/Jopyth/MMM-Remote-Control/issues/76

                Sample code for config.js, Module MMM-Navigate:

                {notification: "REMOTE_ACTION", payload: {action: "BRIGHTNESS", value: "200"}},
                

                AxLED

                1 Reply Last reply Reply Quote 0
                • A Offline
                  AgP42 Project Sponsor Module Developer
                  last edited by

                  Great ! Thank you so much !

                  But as said on the link you gave :

                  @axled said in MMM-Navigate, Navigation inside MagicMirror with Rotary Encoder:

                  Thanks to glitch452 who found the error, details see:
                  https://github.com/Jopyth/MMM-Remote-Control/issues/76

                  the line to replace is

                  res.send({"status": "success"});
                  

                  and not

                   self.sendSocketNotification(query.action, query.value);
                  

                  Then it is working perfectly !

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    AxLed Module Developer
                    last edited by

                    @AgP42
                    You are right, i told you the wrong line, i corrected my thread above.
                    I am glad it is working on your MM as needed.
                    AxLED

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      AxLed Module Developer
                      last edited by

                      Hi to all MM Builders,

                      i made an update to my module MMM-Navigate.

                      1.2 Changelog:

                      • tadded lock icon next to navigation alias, if locked
                      • code cleaned

                      Happy navigation.

                      AxLED

                      1 Reply Last reply Reply Quote 0
                      • E Offline
                        Eisblume
                        last edited by

                        Hi,

                        i installed this module with the Rotary Encoder KY-040. Scroll through navigation work fine, but nothing happened, when I press the button on the encoder.

                        Test with Url (yourmmip:8080/remote?action=NOTIFICATION&notification=PRESSED) works fine.

                        What could be the problem ??

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 1 / 5
                        • 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