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.
    • 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
          • L Offline
            linuxha
            last edited by

            Okay, I see the issue with windSpeed. The URL returns windSpeed in km_h-1 (k/h), the convertSpeed(metSec) function appears to be m/s. I’m not sure how to fix this for general use. I’ll try to fix it for my use first.

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

              @linuxha google search on conversion says divide the km/h by 3.6 to get m/s

              Sam

              How to add modules

              learning how to use browser developers window for css changes

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

                @sdetweil , thanks, I did find those but I’m also trying to figure out a way so when I change the code it doesn’t break the existing. I’m just giving it thought now.

                To convert kph to mph: *0.621371. I 'm used to MPH and m/s or kph wouldn’t register with me. I can handle temperatures and distance in metric but not wind speeds.

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

                  Ah feels like also needs to consider “windChill” & “heatIndex”. I’m betting they’re mutually exclusive.

                  1 Reply Last reply Reply Quote 0
                  • phodges7727P Offline
                    phodges7727
                    last edited by

                    I think the weather.gov API using /points/ has been deprecated. It switched to gridpoints/{wfo}/{x}/{y}. I am not skilled enough to know what to switch in the config file to make it work.

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