version 0.2.0 released 2018-04-05
- provided frontend representation for WundergroundHistoryDevice including options for label and unit
New plugin [pimatic-wunderground]
version 0.2.0 released 2018-04-05
Looks really good!
History Weather Device is now called “Test Wetter”.
It feels like the values are not changing at all. The temperature should be much higher
Any ideas how to check the values?
Best regards,
André
@andre3000 said in New plugin [pimatic-wunderground]:
Any ideas how to check the values?
You can use pimatic-metar-weather as a second instance and compare the values. Note, however, the values can vary as they may originate from a different weather station or a different measurement time. The data for Ho Chi Minh airport is updated every 30 minutes. I am not sure whether or not Wunderground will give you that frequency of updates.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Thanks for your reply.
I had a lot of issues getting metar weather to run.
That´s why I tried wunderground. I will try again with metar and come back to you
@andre3000 said in New plugin [pimatic-wunderground]:
I had a lot of issues getting metar weather to run.
Anyting else other than “Response does not contain metar” which I explained to you?
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig said in New plugin [pimatic-wunderground]:
Anyting else other than “Response does not contain metar” which I explained to you?
well that was/is the biggest issue. I know that you guys are already working on it.
It would be interesting to know the frequency of updates in wunderground.
I´m a bit afraid that the metar weather station (hardware) in ha noi is not working that good and stable like wunderground weather measurement devices.
@andre3000 said in New plugin [pimatic-wunderground]:
It would be interesting to know the frequency of updates in wunderground.
According to what I found on the Wunderground site there is no fixed schedule and Wunderground does not provide information about the update frequency of a given site.
I´m a bit afraid that the metar weather station (hardware) in ha noi is not working that good and stable like wunderground weather measurement devices.
Well, I think it isn’t a problem with the measurement site, but more of a problem with the data service provider which is the NOAA in case of Metar. Note, depending on the station used for Wunderground it may be even the same measurement site and like the same data service provider they collect it from. The station used by Wunderground is given station_id
field of the data retrieved retrieved from wunderground. Maybe that’s logged somewhere, @SaxnPaule ? If it contains a four letter code it likely an airport site (e.g. Hanoi airport in case you selected that city).
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
The update interval for historical data differs from station to station. For Dresden the interval is 30 minutes. Other stations I tried only provide three or four measurements per day.
@Andre3000 could you please provide your historyWeather configuration? I’ll check the interval then.
"plugin": "wunderground",
"active": true
"apiKey": "xxxxx",
"city": "21.028511,105.804817",
"lang": "DL",
"interval": 30,
"timeOffset": -7,
"attributes": [
{
"name": "temperature",
"unit": "°C",
"label": "T"
},
{
"name": "humidity",
"unit": "%",
"label": "RH"
}
],
"xAttributeOptions": [
{
"name": "rain",
"displaySparkline": false,
"hidden": true
},
{
"name": "temperature",
"displaySparkline": false
},
{
"name": "humidity",
"displaySparkline": false
}
],
"id": "test-wetter",
"name": "Test Wetter",
"class": "WundergroundHistoryDevice"
}
The values didn’t change for more than 12h.
Its updated every 30 Minutes. Try this URL and have a look at the response:
http://api.wunderground.com/api/YOURKEYHERE/history_20180406/lang:DL/q/21.028511,105.804817.json
For lookup I use the utcdate property of each observation entry.
Then I check which entry has the smallest differnece to the selected timeOffset.
-7 hours means:
year: 2018
mon: 04
mday: 06
hour: 02
min: 55
"date": {
"pretty": "2:00 PM +07 on April 06, 2018",
"year": "2018",
"mon": "04",
"mday": "06",
"hour": "14",
"min": "00",
"tzname": "Asia/Ho_Chi_Minh"
},
"utcdate": {
"pretty": "7:00 AM GMT on April 06, 2018",
"year": "2018",
"mon": "04",
"mday": "06",
"hour": "07",
"min": "00",
"tzname": "UTC"
},
"tempm":"20.0", "tempi":"68.0","dewptm":"14.0", "dewpti":"57.2","hum":"68","wspdm":"25.9", "wspdi":"16.1","wgustm":"44.4", "wgusti":"27.6","wdird":"30","wdire":"NNE","vism":"-9999.0", "visi":"-9999.0","pressurem":"1017", "pressurei":"30.04","windchillm":"-999", "windchilli":"-999","heatindexm":"-9999", "heatindexi":"-9999","precipm":"-9999.00", "precipi":"-9999.00","conds":"Clear","icon":"clear","fog":"0","rain":"0","snow":"0","hail":"0","thunder":"0","tornado":"0","metar":"METAR VVNB 060700Z 03014G24KT CAVOK 20/14 Q1017 NOSIG" }
],
"dailysummary": [
{ "date": {
"pretty": "12:00 AM +07 on April 06, 2018",
"year": "2018",
"mon": "04",
"mday": "06",
"hour": "00",
"min": "00",
"tzname": "Asia/Ho_Chi_Minh"
I see that the values are changing every 30mins. Do you know why its not displayed correctly?
Have a look at the tempm value. It doesn’t change every 30 minutes.
But anyways. I’ll do some tests. I configured your case and monitor the temperature for some hours.
Ahh, I got it. In fact there is a bug in the calculation of the correct difference. I’ll test my fix and publish a new version today in the evening.
With the corrected calculation this would be the choosen entry:
{
pretty: '1:30 AM GMT on April 06, 2018',
year: '2018',
mon: '04',
mday: '06',
hour: '01',
min: '30',
tzname: 'UTC'
}
Do you know why your plugin is pulling so often?
Everytime you refresh your browser or every {interval} minutes.
Check your log, when nobody uses the frontend.
See: https://forum.pimatic.org/topic/4149/new-plugin-pimatic-wunderground/39
and https://forum.pimatic.org/topic/4149/new-plugin-pimatic-wunderground/45
I was definitely not using the Frontend before 7 a.m
I cannot answer this. But as you can see, there are totally different intervals used for refreshing the data. This can’t be a programmatical issue.
version 0.2.1 released 2018-04-06
My two cents: Pulling the data on browser refresh should be made optional. Otherwise, users with an API key on the free plan will quickly run out budget if they frequently use the Web UI.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
@mwittig Could you please have a look at the code?
The frontend part only subscribes to the weather variable and changes the HTML accordingly. There is no explicit refresh triggered.
The _reloadWeather method is only called dependent on the configured interval. I really don’t know why it’s called more often at some users installation. I cannot reproduce this.