MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Adding new Module in Config



  • Hi, can someone help me out please, been a while since I’ve edited the config file of my magic mirror.
    Im trying to add the Tado module, and cant seem to get it all verified.

    This is how the end of my last module ends and then starting with the Tado module. What am i doing wrong?

    Thanks

          module: 'newsfeed',
          position: 'bottom_bar',
          config: {
            feeds: [
              {
                title: 'BBC',
                url: 'http://feeds.bbci.co.uk/news/rss.xml'
              }
            ],
            startTags: [],
            endTags: [],
            prohibitedWords: []
          }
        }
      ],
      paths: {
        modules: 'modules',
        vendor: 'vendor'
      }
    },
    }
         {
    
             module: 'MMM-Tado',
             position: 'middle',
             config: {
                 username: '********',
                 password: '*******',
                 updateInterval: 300000
             }
         }
         
    }
    

  • Project Sponsor Module Developer

    @jakuk

    So, assuming your MM was working before you tried to add this, I would remove that addition. Check that your MM is now running again, then add

    {
            module: 'MMM-Tado',
            position: 'top_right', // This can be any of the regions.
            config: {
                username: 'your_tado_username', 
                password: 'your_tado_password', 
                updateInterval: 300000
            }
        },
    

    Following this guide

    https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners



  • thank you very much for your reply… Yes my MM was working before i added the new module…
    Still doesn’t seem to want to work.
    Ive added the module like you said and still doesn’t load up…

    This is how my config looks now.

    Thanks

     title: 'BBC',
                url: 'http://feeds.bbci.co.uk/news/rss.xml'
              }
            ],
            startTags: [],
            endTags: [],
            prohibitedWords: []
          }
        }
      ],
      paths: {
        modules: 'modules',
        vendor: 'vendor'
      }
    }
    
    
    {
            module: 'MMM-Tado',
            position: 'top_right', // This can be any of the regions.
            config: {
                username: '***', 
                password: '***', 
                updateInterval: 300000
            }
        },
         
    

  • Project Sponsor Module Developer

    @jakuk

    Try putting a comma after the curly bracket at the end of the news entry, like so:

    paths: {
        modules: 'modules',
        vendor: 'vendor'
      }
    }, 
    

    then your tado entry after that



  • still nothing after adding the , to the bracket…



  • @Mykle1 practice, line up the {} and {} vertically… when u create a {

    add a } in the same column on a new line, put stuff between them

    each module should end with },

    after the last module is the ] of the modules:[ list started at the top

    each module has AT LEAST

    {
        module:"???name???",
        config: {
        }
    },
    

    all config stuff for the module goes between the {} and close of the config: section



  • Sorry does this help at all?

    Line 155 col 2 ‘destructuring binding’ is available in ES6 (use ‘esversion: 6’) or Mozilla JS extensions (use moz).
    Line 159 col 17 Expected an identifier and instead saw ‘MMM-Tado’.
    Line 160 col 19 Expected an identifier and instead saw ‘top_right’.
    Line 162 col 23 Expected an identifier and instead saw ‘*****’.
    Line 163 col 23 Expected an identifier and instead saw ‘*******’.
    Line 164 col 29 Expected an identifier and instead saw ‘300000’.
    Line 174 col 1 Unexpected ‘if’.
    Line 174 col 1 Expected an identifier and instead saw ‘if’ (a reserved word).
    Line 174 col 3 Missing semicolon.
    Line 174 col 34 Expected an assignment or function call and instead saw an expression.
    Line 174 col 35 Missing semicolon.



  • @jakuk said in Adding new Module in Config:

    Line 159 col 17 Expected an identifier and instead saw ‘MMM-Tado’.

    so, lets look on the line BEFORE 159, cause there was a problem (it is NOT expecting to see )

    }    // < --- 
    what is this? 
         {     // < mmm-tado module start
    
             module: 'MMM-Tado',
             position: 'middle',
             config: {
                 username: '********',
                 password: '*******',
                 updateInterval: 300000
             }
         }  // < mm-tado end
    

    end of all modules is ], but I don’t see that either


Log in to reply