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.

    default Weather, current with wethergov issues

    Scheduled Pinned Locked Moved Bug Hunt
    16 Posts 4 Posters 4.2k 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.
    • S Offline
      scumbelly @linuxha
      last edited by

      @linuxha

      Hi,

      What is your default for ‘units’ in the config.js file?

      Config Options…

      Possible values: config.units = Specified by config.js, default = Kelvin, metric = Celsius, imperial =Fahrenheit

      and if your are asking about the current weather module

      useKMPHwind Uses KMPH as units for windspeed.
      Possible values:true or false
      Default value: false

      useBeaufort Pick between using the Beaufort scale for wind speed or using the default units.
      Possible values: true or false
      Default value: true

      if you are using weather module - windUnits

      What units to use for wind speed. If specified overrides units setting. Specified by config.js

      Possible values: config.units = Specified by config.js, default = Kelvin, metric = Celsius, imperial = Fahrenheit

      It’s best to check your options per module.

      Cheers.

      L 1 Reply Last reply Reply Quote 0
      • L Offline
        linuxha @scumbelly
        last edited by

        @scumbelly

        Here’s the weather config section:

        	units:      "imperial", // global
        ...
        		{
        			module: "weather",
        			//position: "top_right",
        			position: "bottom_left",
        			config: {
        				type: "current",
        				weatherProvider: "weathergov", //Default value: openweathermap
        				//windUnits: "imperial", // this is messed up in the code
        				tempUnits: "imperial",
        				useBeaufort: false,
        				fade: false,
        				// See 'Configuration options' for more information.
        				//apiBase: "https://api.weather.gov/points/",
        				//weatherEndpoint: "/forecast/hourly", // for current
        				lat:        40.25571,
        				lon:        -74.39416,
        			}
        		},
        

        I basically get this:
        chopped screen shot

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          scumbelly @linuxha
          last edited by

          @linuxha

          71e0d7b5-b7cd-413c-ab5f-240452abc444-image.png

          This is what I am guessing is your weather.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            scumbelly @scumbelly
            last edited by

            @linuxha

            That’s odd. Your wind speed looks like it could be in meters/seconds but it should be about 3.3 @ 7 miles per hour. So, are you using the current weather module or the ‘new’ weather module?

            Cheers

            L 1 Reply Last reply Reply Quote 0
            • L Offline
              linuxha @scumbelly
              last edited by

              @scumbelly , the new weather module, the old is call currentweather and weatherforecast. Those are commented out in my config.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                scumbelly @linuxha
                last edited by

                @linuxha

                With following set you should get correct weather… except wind chill.

                language: “en”,
                locale: “en-US”,
                logLevel: [“INFO”, “LOG”, “WARN”, “ERROR”], // Add “DEBUG” for even more logging
                timeFormat: 12,
                units: “imperial”,

                		config: {
                			type: "current",
                			weatherProvider: "weathergov", //Default value: openweathermap
                			weatherEndpoint: "/forecast/hourly",
                			degreeLabel: true,
                			showFeelsLike: false,
                			lat:        40.25571,
                			lon:        -74.39416,
                

                No matter what I tried Feels Like came up as 32degrees. The web site shows “wind chill” and openweathermap shows “feels like” and the current.njk translates “FEELS” - DEGREE. I’m scratching my head for now.

                Cheers.

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  scumbelly @scumbelly
                  last edited by

                  @linxha

                  I captured an xml string from your location…

                  e28cb8d0-fd62-4197-b794-3ede660df47f-image.png

                  <current_observation version=“1.0”
                  xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
                  xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
                  xsi:noNamespaceSchemaLocation=“http://www.weather.gov/view/current_observation.xsd”>
                  NOAA’s National Weather Service
                  <credit_URL>http://weather.gov/</credit_URL>

                  http://weather.gov/images/xml_logo.gif

                  NOAA's National Weather Service http://weather.gov 15 minutes after the hour 60 Belmar-Farmingdale, NJ KBLM 40.18333 -74.13333 Last Updated on Apr 14 2021, 12:56 pm EDT Wed, 14 Apr 2021 12:56:00 -0400 A Few Clouds 70.0 F (21.1 C) 70.0 21.1 39 from the West at 9.2 gusting to 17.3 MPH (8 gusting to 15 KT) West 270 9.2 17.3 8 15 1016.4 mb 1016.4 30.02 44.1 F (6.7 C) 44.1 6.7 10.00 http://forecast.weather.gov/images/wtf/small/ http://www.weather.gov/data/obhistory/KBLM.html few.png http://www.weather.gov/data/METAR/KBLM.1.txt http://weather.gov/disclaimer.html http://weather.gov/disclaimer.html http://weather.gov/notice.html

                  … but I saw no ‘wind chill’ or ‘feels like’ information at the time I grabbed the file.

                  I’ve gone about as far as I can. Hopefully someone can add more to this for you.

                  Cheers.

                  L 1 Reply Last reply Reply Quote 0
                  • L Offline
                    linuxha @scumbelly
                    last edited by linuxha

                    @scumbelly , huge thanks for the help. What URL did you use to get the XML? For weather.gov, I’ve been seeing JSON.

                    I think I’ll toss in a few log statements and see what weather.gov code is using.

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      scumbelly @linuxha
                      last edited by

                      @linuxha

                      https://w1.weather.gov/xml/current_obs/KBLM.xml

                      1 Reply Last reply Reply Quote 0
                      • L Offline
                        linuxha
                        last edited by

                        I figured out the Feels like being 32F, it’s getting a null in the heat index from weather.gov. I’ve added code to check for null and use the currentWeather.temperature instead. I’ll send diffs later (where do I send them?) when I’ve finished with the windSpeed.

                        		if(currentWeatherData.heatIndex.value) {
                        			currentWeather.feelsLikeTemp = this.convertTemp(currentWeatherData.heatIndex.value);
                        		} else {
                        			// If null, set it to the current temperature
                        			currentWeather.feelsLikeTemp = currentWeather.temperature;
                        		}
                        
                        

                        Sorry it took so long for me to figure out this env. I’m using the browser to debug now. I’ve not done this much. :-)

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