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

Scheduled Pinned Locked Moved Utilities
6 Posts 2 Posters 1.1k 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 May 28, 2023, 12:36 PM

    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 May 28, 2023, 12:38 PM Reply Quote 1
    • S Away
      sdetweil @btastic
      last edited by May 28, 2023, 12:38 PM

      @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 May 28, 2023, 12:43 PM Reply Quote 0
      • B Offline
        btastic @sdetweil
        last edited by May 28, 2023, 12:43 PM

        @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 May 28, 2023, 1:19 PM Reply Quote 1
        • S Away
          sdetweil @btastic
          last edited by sdetweil May 28, 2023, 1:47 PM May 28, 2023, 1:19 PM

          @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 May 28, 2023, 3:27 PM Reply Quote 0
          • B Offline
            btastic @sdetweil
            last edited by btastic May 28, 2023, 3:28 PM May 28, 2023, 3:27 PM

            @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 May 28, 2023, 3:29 PM Reply Quote 0
            • S Away
              sdetweil @btastic
              last edited by May 28, 2023, 3:29 PM

              @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 May 29, 2023, 11:58 AM
              • 1 / 1
              1 / 1
              • First post
                3/6
                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