Read the statement by Michael Teeuw here.
default Weather, current with wethergov issues
-
I’m playing around with Weather/Current/weathergov setting for the US and I see a lot of issue. First the Windspeed is 33 NNW (it’s 7 NNW) and the temperature 54F ‘feels like’ 32F.
When I visit the weathergov API URL for lon/lat I see “5 to 10 mph” instead of a windspeed. My guess is that this may be part of the issue. I’m not really sure how to debug this as some of the javascript looks very different than what I’m used to.
Any pointers on how I can help, please let me know.
-
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: falseuseBeaufort Pick between using the Beaufort scale for wind speed or using the default units.
Possible values: true or false
Default value: trueif 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.
-
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:
-
This is what I am guessing is your weather.
-
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.
-