MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.20.0 is available! For more information about this release, check out this topic.

    New Weather module

    Requests
    6
    16
    593
    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.
    • hango
      hango Module Developer last edited by hango

      It may be worth improving the openweathermap current onecall mode with options like: pressure, dew_point, uvi, visibility and description

      For now the current and daily type not working with onecall.

      Also for forecast with max days for paid users must add the line in openweathermap.js on getParams()

      	var numberOfDays = this.config.maxNumberOfDays < 1 || this.config.maxNumberOfDays > 17 ? 7 : this.config.maxNumberOfDays;
      	params += "&cnt=" + numberOfDays;
      

      and maybe change this

         case "daily":
              this.config.weatherEndpoint = "/forecast/daily";
              break;
         case "forecast":
              this.config.weatherEndpoint = "/forecast";
              break;
      

      https://github.com/cristearazvanh

      1 Reply Last reply Reply Quote 0
      • hango
        hango Module Developer last edited by hango

        https://github.com/cristearazvanh/weather_plus

        Modified MagicMirror currentweather module based on Openweathermap with Onecall endpoint

        preview.png

        Do not make modification and do not replace the default, just add disabled: true in config.js and use this one as 3rd party, then put in config.js:

        {
        	module: "weather_plus",
        	position: "top_right",
        	config: {
        		showFeelsLike: true,
        		realFeelsLike: true,
        		showVisibility: true,
        		showHumidity: true,
        		showPressure: true,
        		showDew: true,
        		showUvi: true,
        		showPrecip: true,
        		showDescription: true,
        			// See currentweather default module 'Configuration options' for more information.
        	}
        }
        

        Update module: https://github.com/cristearazvanh/onecall

        https://github.com/cristearazvanh

        D 1 Reply Last reply Reply Quote 1
        • D
          DJBOOB66 @hango last edited by

          @hango where do I add the disable: true? a few more instructions would be good I’m new

          hango cowboysdude 2 Replies Last reply Reply Quote 0
          • hango
            hango Module Developer @DJBOOB66 last edited by

            @djboob66 after position of module

            https://github.com/cristearazvanh

            D 1 Reply Last reply Reply Quote 0
            • D
              DJBOOB66 @hango last edited by

              @hango
              still not working getting syntax error
              Capture2.PNG

              S A 2 Replies Last reply Reply Quote 0
              • S
                sdetweil @DJBOOB66 last edited by

                @djboob66 and a new line will require a trailing comma, yes?, more to follow

                Sam

                Create a working config
                How to add modules

                1 Reply Last reply Reply Quote 0
                • cowboysdude
                  cowboysdude Module Developer @DJBOOB66 last edited by

                  @djboob66 anywhere outside the config section ie…

                  {
                          module: "Alerts", 
                          config: {
                            css: "2",
                            sec: true
                          },
                          disabled: false,
                          position: "middle_center"
                        }, 
                  

                  OR

                  {
                          disabled: false,
                          module: "Alerts",
                          position: "middle_center"
                          order: "1",
                          config: {
                            css: "2",
                            sec: true
                          }, 
                        }, 
                  

                  Either way works 😉

                  1 Reply Last reply Reply Quote 1
                  • A
                    Alloc @DJBOOB66 last edited by

                    @djboob66 You spelled True wrong in your config

                    1 Reply Last reply Reply Quote 0
                    • hango
                      hango Module Developer last edited by hango

                      @DJBOOB66 so, the correct config is:
                      (don’t miss the comma at the end of rows except the last one)

                      {
                      	module: "weather", 
                      	position: "top_right",
                      	disabled: true, // not disable as I initially wrote wrong
                      	config: {
                      	// no needed anyore
                      	}
                      }, 
                      {
                      	module: "weather_plus",
                      	position: "top_right",
                      	disabled: false,        // not necessary
                      	config: {
                      	// you cand skip these options, they are true by default
                      		showFeelsLike: true,
                      		realFeelsLike: true,
                      		showVisibility: true,
                      		showHumidity: true,
                      		showPressure: true,
                      		showDew: true,
                      		showUvi: true,
                      		showPrecip: true,
                      		showDescription: true,
                      	// Here put all your info. See currentweather default module 'Configuration options' for more information.
                      		lat: "",	// your location latitude
                      		lon: "",	// your location longitude
                      		appid: "",	// your openweathermap API key
                      		location: "", 	// no needed
                      		locationID: ""  // no needed
                      	}
                      },
                      

                      you put disabled: true on wrong module

                      Update module: https://github.com/hangorazvan/onecall

                      https://github.com/cristearazvanh

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        sdetweil @hango last edited by

                        @hango this is the doc on the attributes for a module, independent of the module specific config

                        https://docs.magicmirror.builders/modules/configuration.html

                        Sam

                        Create a working config
                        How to add modules

                        hango 1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy