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

Editing core modules

Scheduled Pinned Locked Moved Troubleshooting
7 Posts 2 Posters 773 Views 2 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.
  • C Offline
    CheapDad
    last edited by Apr 19, 2021, 3:31 PM

    Thank you @sdetweil for helping me along. I’m working on editing the core modules to fit the config that I’d like. The problem I’m running into is that despite using the syntax that appears in the documentation, I’m getting errors.

    For example, my weather module is displaying either Kelvin or Celsius and I’d like it to be imperial. According to the documentation, I think all I need to do is add:

    units: “Imperial”,

    to the config file and I should be golden. However, that’s not what’s happened:

    		{
    			module: "weather",
    			position: "top_right",
    			config: {
    				weatherProvider: "openweathermap",
    				type: "current",
    				location: "Gainesville, US",
    				locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
    				apiKey: "663f6e5e85dfb8bf8d3293ab7cc8cbd1"
    				units: "imperial",
    			}
    

    For us super noobs, it might be helpful to have a sample of the config section, where a user can simply delete the lines that they don’t need.

    BTW, I appreciate that will only help a very small subset of users and I’m grateful for the patience you all show us noobs.

    CheapDad

    C 1 Reply Last reply Apr 19, 2021, 5:03 PM Reply Quote 0
    • C Offline
      CheapDad @CheapDad
      last edited by CheapDad Apr 19, 2021, 5:05 PM Apr 19, 2021, 5:03 PM

      So, I fixed my own problem but created another! For the weather module, I placed the units code and round up code as the first entries in config and it worked! Well, sort of. I do get Fahrenheit and the temperatures are rounded up, except my “feels like” output is 293 degrees!

      Additionally, the time in the current weather field is about 8 hours different than the time in the time module (upper left).

      The code:

      {
      			module: "weather",
      			position: "top_right",
      			config: {
      				units: "Imperial",
      				roundTemp: "True",
      				weatherProvider: "openweathermap",
      				type: "current",
      				location: "Gainesville, US",
      				locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				apiKey: "663f6e5e85dfb8bf8d3293ab7cc8cbd1"
      			}
      		},
      		{
      			module: "weather",
      			position: "top_right",
      			header: "Weather Forecast",
      			config: {
      				units: "Imperial",
      				roundTemp: "True",
      				weatherProvider: "openweathermap",
      				type: "forecast",
      				location: "Gainesville, US",
      				locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
      				apiKey: "663f6e5e85dfb8bf8d3293ab7cc8cbd1"
      			}
      
      S 2 Replies Last reply Apr 19, 2021, 5:55 PM Reply Quote 0
      • S Offline
        sdetweil @CheapDad
        last edited by Apr 19, 2021, 5:55 PM

        @cheapdad gotta have that locationID

        many authors provide sample config layouts

        not all, and not the base.

        your welcome to edit the doc and submit updates

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @CheapDad
          last edited by Apr 19, 2021, 6:39 PM

          @cheapdad also like to correct your words. u are not editing any of the core FILES, you are editing the configuration for the core modules.

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          C 1 Reply Last reply Apr 20, 2021, 1:47 PM Reply Quote 0
          • C Offline
            CheapDad @sdetweil
            last edited by Apr 20, 2021, 1:47 PM

            @sdetweil On the location ID, the documentation indicates that it is not needed if you have “location” entered. If using just “location” without “location ID” is causing the error, then I’ll make the switch. Interestingly, its only the “feels like” that is off. (I figured out the that time difference is sunrise/sunset.)

            On config layouts, I may just do that. Generally, is there any required order of the config lines?

            CheapDad

            S 1 Reply Last reply Apr 20, 2021, 1:50 PM Reply Quote 0
            • S Offline
              sdetweil @CheapDad
              last edited by Apr 20, 2021, 1:50 PM

              @cheapdad said in Editing core modules:

              Generally, is there any required order of the config lines?

              no… any order is fine… the modules definitions go inside the

              modules: [ 
              ]
              

              list
              order is fifo (first in, first out)

              by position

              three in the top_left,
              from top of config.js down that is the order they will appear

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • C Offline
                CheapDad
                last edited by Apr 20, 2021, 1:59 PM

                @sdetweil I’ll check that out; thank you!

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