Read the statement by Michael Teeuw here.
default Weather, current with wethergov issues
-
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:

-
-
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
-
@scumbelly , the new weather module, the old is call currentweather and weatherforecast. Those are commented out in my config.
-
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.
-
@linxha
I captured an xml string from your location…
<current_observation version=“1.0”
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
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… 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.
-
@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.
-
-
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. :-)
-
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.
-
@linuxha google search on conversion says divide the km/h by 3.6 to get m/s
-
@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.
-
Ah feels like also needs to consider “windChill” & “heatIndex”. I’m betting they’re mutually exclusive.
-
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
