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-moonraker (for klipper 3D printers)

    Scheduled Pinned Locked Moved Utilities
    6 Posts 2 Posters 1.2k Views 3 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.
    • B Offline
      btastic
      last edited by

      Hello!

      This is my first plugin. I am using a few 3D printers and I thought it would be a great idea to show a some information about the current 3D printing status on my magicmirror.

      example.png

      So I developed a plugin to display data from the moonraker API, which is usually installed next to klipper on a Raspberry PI or other SoC.

      You can find the repository, installation guide and config options on my github: https://github.com/btastic/MMM-moonraker

      Feel free to discuss, ask questions or add suggestions for further development.

      Best regards
      Ben

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

        @btastic very cool… just started 3d printing myself…

        use octoprint on the pi… don’t know if it has user api… (1 week in)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        B 1 Reply Last reply Reply Quote 0
        • B Offline
          btastic @sdetweil
          last edited by

          @sdetweil Thank you. I just had a look at their API, and it shouldn’t be too hard to create a similar plugin. I will have a look at it :)

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

            @btastic cool… and one other interesting thing…

            because you only use fetch, you could do all this in the browser side (mmm-moonraker.js) no need for node_helper

            fetch is built in to the browser

            all the requires() are built in at the browser side…

            I sent you a pull request that collapses everything to the modulename.js

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              btastic @sdetweil
              last edited by btastic

              @sdetweil Thanks for the suggestion. I think there is no right or wrong approach to this, but rather what people like or were taught when they were beginning their programming careers or started learning to code as part of their hobbies.

              Funnily enough I first had it coded all in one place, but I felt it got messier the more code I added. So I personally decided against this approach to have the “frontend” (MMM-moonraker.js) separated from the “backend” (node_helper.js), as it is (imo) good practice to keep the concerns of those separated (https://en.wikipedia.org/wiki/Separation_of_concerns)

              I hope you understand.

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

                @btastic sure… it was the ‘what they were taught’ approach…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • B btastic referenced this topic on
                • 1 / 1
                • 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