• 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.

How to develop modules

Scheduled Pinned Locked Moved General Discussion
5 Posts 4 Posters 13.0k Views 4 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.
  • N Offline
    Nikhil
    last edited by Aug 7, 2018, 7:35 AM

    I am aware of python core, nodejs and javascript. I am running magic mirror with the available third party apps at the magic mirror repository. Now I want to develop some other modules, so what are the other programming languages I need to know to develop magic mirror modules? Can someone please post a tutorial about how to develop the modules?

    ? 1 Reply Last reply Aug 7, 2018, 7:56 AM Reply Quote 0
    • ? Offline
      A Former User @Nikhil
      last edited by Aug 7, 2018, 7:56 AM

      @nikhil

      • https://github.com/MichMich/MagicMirror/blob/master/modules/README.md
      • https://github.com/MichMich/MagicMirror/wiki/3rd-party-modules

      You’d better start from modifying any simple 3rd-party-modules.

      1 Reply Last reply Reply Quote 2
      • D Offline
        doubleT Module Developer
        last edited by Aug 7, 2018, 12:23 PM

        I’d second that.

        For a quick overview:

        The DOM (all visible elements) is based on HTML, styled with CSS and usually filled with content and function by Java Script. That’s all you need for basic modules.

        If you go further, you’ll need Python in case you have something connected to the Pi andnodeJS for advanced modules with some backend code, like API calls, though some nodeJS knowledge will help you a lot to understand the whole structure in the first place.

        jQuery can be a helpful Java Script library.
        API calls usually deliver JSON or – rarely – XML, but both should be familiar if you know JS objects and arrays and HTML.

        As Sean said, playing around and manipulating existing modules should help you a lot. Go through the code, see if you understand the connections and find out what happens if you manipulate it.

        Your most important tool when working in js-files is the browser console where you can print to with the js code console.log("show me the content of var x: " + x); MM code Log.info("show me the content of var x: " + x);

        1 Reply Last reply Reply Quote 1
        • ? Offline
          A Former User
          last edited by A Former User Aug 7, 2018, 12:30 PM Aug 7, 2018, 12:27 PM

          I wrote this;
          https://forum.magicmirror.builders/topic/8534/head-first-developing-mm-module-for-extreme-beginners

          1 Reply Last reply Reply Quote 5
          • M Offline
            Mykle1 Project Sponsor Module Developer
            last edited by Mykle1 Aug 7, 2018, 11:30 PM Aug 7, 2018, 11:29 PM

            I wrote this 8 months ago and it may help someone. It’s meant to be used as a learning tool for beginner module creators.

            https://github.com/mykle1/MMM-UFO

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 3
            • 1 / 1
            1 / 1
            • First post
              3/5
              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