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

default Weather, current with wethergov issues

Scheduled Pinned Locked Moved Bug Hunt
16 Posts 4 Posters 3.3k 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 Apr 14, 2021, 6:36 PM

    @linuxha

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

    1 Reply Last reply Reply Quote 0
    • L Offline
      linuxha
      last edited by Apr 15, 2021, 12:00 PM

      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 Apr 15, 2021, 2:07 PM

        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 Apr 15, 2021, 2:14 PM Reply Quote 0
        • S Away
          sdetweil @linuxha
          last edited by Apr 15, 2021, 2:14 PM

          @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 Apr 15, 2021, 2:55 PM Reply Quote 0
          • L Offline
            linuxha @sdetweil
            last edited by linuxha Apr 15, 2021, 2:57 PM Apr 15, 2021, 2:55 PM

            @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 Apr 16, 2021, 11:56 AM

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

              1 Reply Last reply Reply Quote 0
              • P Offline
                phodges7727
                last edited by May 12, 2021, 3:48 PM

                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