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

Complete Options List for config.js

Scheduled Pinned Locked Moved Troubleshooting
13 Posts 6 Posters 3.1k 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.
  • M Offline
    Mykle1 Project Sponsor Module Developer @nimbus78
    last edited by Mar 19, 2019, 12:44 AM

    @nimbus78

    Yes, and no.

    I found this site to be a fantastic inspiration (and opportunity) to learn the basics of coding. Yes, there is a learning curve when you start out. I struggled painfully in the beginning and I still do with more complex code. Yes, it would be convenient if every readme file were perfectly written for the novice but you are expected to do some of the work, even if that means finding errors in readme files. In which case, you can post an issue at the repo or a pull request that fixes the problem. Boom! You’re contributing.

    There are some wonderful tutorials on this forum (if I do say so myself) that contain very useful information.

    Many module developers come and go so fixing every issue in every module readme is not even possible. The developers that are here are fantastic at supporting their modules, other modules and helping in general.

    If you come across my posts that are older than 2 years ago you will see that I started here with no knowledge of coding. A bored old man looking for something interesting to do. Likely asking the same questions that you are asking. The help I received (and still receive) was/is outstanding.

    So, hang in there. Ask. Learn. Contribute. Have fun!

    Create a working config
    How to add modules

    1 Reply Last reply Reply Quote 0
    • B Offline
      broberg Project Sponsor @nimbus78
      last edited by Mar 19, 2019, 10:56 AM

      @nimbus78 this is why you read the readme file on github for each module.

      There isn’t any standard variables, most modules have their own options that can be configured. And it isn’t really an option to include variables just because, when they are not really used.

      The naming of the variables (config options) is totally up to the creator of the module.

      Some modules have update timers, some don’t, som modules have url variables some don’t. Etc etc

      N 1 Reply Last reply Mar 19, 2019, 2:47 PM Reply Quote 1
      • N Offline
        nimbus78 @broberg
        last edited by Mar 19, 2019, 2:47 PM

        @broberg that’s exactly why I suggested it. The biggest problem I have, is trying to add a configuration that doesn’t have an example. 9 times out of ten I get it wrong and it’s usually because I put a comma where there shouldn’t be one or don’t put one where it should. Or put the variable in quotations when it shouldn’t be. I try to follow the format of the pre installed modules, but those don’t seem to have a consistent format either. Some have a comma at the end of a line or after a }. Some don’t.

        ? B 2 Replies Last reply Mar 19, 2019, 3:03 PM Reply Quote 0
        • ? Offline
          A Former User @nimbus78
          last edited by A Former User Mar 19, 2019, 3:04 PM Mar 19, 2019, 3:03 PM

          @nimbus78
          Anyway, All configuration files have their own structure and syntax. CONFIG.SYS of DOS, Windows INI files, OSX .plistetc, including YAML and JSON.
          While user need to write and modify it by manual, the syntax failure could not be escapable, even with “COMPLETED” config file. PPL will make a mistake absolutely because just it is possible.
          I think you’d better to use MMM-Remote-Control to maintain your config.js. With it, you can change only values without bothering you about syntax.

          S 1 Reply Last reply Mar 19, 2019, 3:10 PM Reply Quote 0
          • S Offline
            sdetweil @Guest
            last edited by Mar 19, 2019, 3:10 PM

            @Sean and we need to keep the tools available and visible.

            Mm provides tools.

            npm run check:config

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            ? N 2 Replies Last reply Mar 19, 2019, 3:13 PM Reply Quote 0
            • ? Offline
              A Former User @sdetweil
              last edited by A Former User Mar 19, 2019, 3:13 PM Mar 19, 2019, 3:13 PM

              @sdetweil
              For myself, I don’t like current npm run check:config. It has an old-schooled (ES5) javascript grammar, so sometimes it cannot understand modern style(ES6) js.
              I recommend Esprima, online js validator (http://esprima.org/demo/validate.html).

              N 1 Reply Last reply Mar 19, 2019, 4:42 PM Reply Quote 1
              • B Offline
                broberg Project Sponsor @nimbus78
                last edited by Mar 19, 2019, 4:21 PM

                @nimbus78

                The issues you state isn’t an issue with what variables the different modules have, the issue you have can easily be remedied with a introduction class to javascript. (But I understand, not everyone will have the will or energy to get a grip on it just to get a config file right).

                And I also understand that some modules aren’t really made for all to use, giving the lack of information for some.
                Using the Readme file from the stock modules is good basis for a readme-template to apply to the modules one makes, and maybe it’s here we should put in more effort to clean things up, but again most 3rd-party modules are made of other users so the support (if any) is thereafter.

                And there is a logic to the use of Quotation marks, commas and brackets.

                Strings of text needs Quotation marks “Something something text string”
                Numbers need no Quotation marks 1234
                Boolean values, True or False, should not have quotation marks even though they are text.

                Commas are use after each “line” unless the “line” is the last one. It’s easier to grasp if you put everything on one row.
                modules: [{module: “alert”},{module: “updatenotification”, position: “top_bar”},{module: “clock”, position: “top_left”} ]

                N 1 Reply Last reply Mar 19, 2019, 4:46 PM Reply Quote 0
                • N Offline
                  nimbus78 @sdetweil
                  last edited by Mar 19, 2019, 4:40 PM

                  @sdetweil I didn’t know about this tool. I will definitely check it out. Thank you.

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    nimbus78 @Guest
                    last edited by Mar 19, 2019, 4:42 PM

                    @Sean if I understand this correctly, I can simply copy the text from my config.js file, paste it into the js validator, and it will show me any mistakes that are in my setup?

                    ? P 2 Replies Last reply Mar 19, 2019, 4:50 PM Reply Quote 0
                    • N Offline
                      nimbus78 @broberg
                      last edited by Mar 19, 2019, 4:46 PM

                      @broberg that is the simplest, most comprehensive explanation I’ve seen so far. That really helps to wrap my head around this. That explanation should be included in the readme file for the MagicMirror. Thank you.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/13
                        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