version 0.0.6 released 2018-02-19
- Added interval config parameter
New plugin [pimatic-wunderground]
version 0.0.6 released 2018-02-19
No more complaints from wunderground. Today i got this:
error [pimatic]: An uncaught exception occurred: TypeError: Cannot read property 'simpleforecast' of undefined
at Request._callback (/home/pi/pimatic-app/node_modules/pimatic-wunderground/wunderground.coffee:357:39)
at Request.self.callback (/home/pi/pimatic-app/node_modules/pimatic-wunderground/node_modules/request/request.js:186:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-wunderground/node_modules/request/request.js:1163:10)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-wunderground/node_modules/request/request.js:1085:12)
at IncomingMessage.g (events.js:260:16)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:923:12)
at nextTickCallbackWith2Args (node.js:458:9)
at process._tickDomainCallback (node.js:413:17)
This is most probably a bug in pimatic or in a module, please report it!
@fregger said in New plugin [pimatic-wunderground]:
error [pimatic]: An uncaught exception occurred: TypeError: Cannot read property ‘simpleforecast’ of undefined
Did you get another error message like “SyntaxError” preceding the error message you posted?
Otherwise, the data does not seem to a “forecast” object. The code should be “exception safe” to avoid the unexpected exception bailouts.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Yes, me too. I’ll have a look at the problem later.
@mwittig no, just this:
12:20:08.372 [pimatic-wunderground] info: Reloading weather data…
followed by the error message
version 0.0.7 released 2018-02-22
version 0.0.8 released 2018-02-25
Is there a way to show wind direction and speed? Also, it would be nice if the plugin would show a moon instead of a sun after sunset on a clear night like this May be even a lunar phase…
I could provide wind speed and direction as variables, but I won’t touch the frontend.
The symbols are given by the wunderground API.
version 0.0.9 released 2018-03-01
The wind speed was already available as a variable (currentWind)
@saxnpaule Is it also possible to provide access to weather history data? Ideally this should be a feature to allow for querying the temperature at a given date/time for given location, e.g. through an action provider.
https://www.wunderground.com/weather/api/d/docs?d=data/history
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Yes, that should be possible. Could you please provide an usecase and a possible rule or action request?
What is the expected response? Do you need a specific frontend representation?
The wunderground API returns hourly or more detailed data. Is this level of detail required or is the daily summary enough?
One of the hourly measurepoints:
{
"date": {
"pretty": "6:50 PM CET on March 18, 2018",
"year": "2018",
"mon": "03",
"mday": "18",
"hour": "18",
"min": "50",
"tzname": "Europe/Berlin"
},
"utcdate": {
"pretty": "5:50 PM GMT on March 18, 2018",
"year": "2018",
"mon": "03",
"mday": "18",
"hour": "17",
"min": "50",
"tzname": "UTC"
},
"tempm": "-4.0",
"tempi": "24.8",
"dewptm": "-13.0",
"dewpti": "8.6",
"hum": "50",
"wspdm": "29.6",
"wspdi": "18.4",
"wgustm": "-9999.0",
"wgusti": "-9999.0",
"wdird": "80",
"wdire": "East",
"vism": "-9999.0",
"visi": "-9999.0",
"pressurem": "1013",
"pressurei": "29.92",
"windchillm": "-11.6",
"windchilli": "11.1",
"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 EDDC 181750Z 08016KT CAVOK M04/M13 Q1013 R04/91//95 TEMPO 08015G25KT"
}
Daily summary:
{
"dailysummary": [{
"date": {
"pretty": "12:20 AM CET on March 18, 2018",
"year": "2018",
"mon": "03",
"mday": "18",
"hour": "00",
"min": "20",
"tzname": "Europe/Berlin"
},
"fog": "0",
"rain": "0",
"snow": "1",
"snowfallm": "",
"snowfalli": "",
"monthtodatesnowfallm": "",
"monthtodatesnowfalli": "",
"since1julsnowfallm": "",
"since1julsnowfalli": "",
"snowdepthm": "",
"snowdepthi": "",
"hail": "0",
"thunder": "0",
"tornado": "0",
"meantempm": "-6",
"meantempi": "22",
"meandewptm": "-13",
"meandewpti": "8",
"meanpressurem": "1011.90",
"meanpressurei": "29.89",
"meanwindspdm": "35",
"meanwindspdi": "22",
"meanwdire": "East",
"meanwdird": "81",
"meanvism": "10.0",
"meanvisi": "6.2",
"humidity": "55",
"maxtempm": "-3",
"maxtempi": "26",
"mintempm": "-8",
"mintempi": "17",
"maxhumidity": "68",
"minhumidity": "43",
"maxdewptm": "-11",
"maxdewpti": "12",
"mindewptm": "-14",
"mindewpti": "7",
"maxpressurem": "1014",
"maxpressurei": "29.95",
"minpressurem": "1010",
"minpressurei": "29.83",
"maxwspdm": "48",
"maxwspdi": "30",
"minwspdm": "20",
"minwspdi": "13",
"maxvism": "10.0",
"maxvisi": "6.2",
"minvism": "10.0",
"minvisi": "6.2",
"gdegreedays": "0",
"heatingdegreedays": "44",
"coolingdegreedays": "0",
"precipm": "0.0",
"precipi": "0.00",
"precipsource": "3Or6HourObs",
"heatingdegreedaysnormal": "",
"monthtodateheatingdegreedays": "",
"monthtodateheatingdegreedaysnormal": "",
"since1sepheatingdegreedays": "",
"since1sepheatingdegreedaysnormal": "",
"since1julheatingdegreedays": "",
"since1julheatingdegreedaysnormal": "",
"coolingdegreedaysnormal": "",
"monthtodatecoolingdegreedays": "",
"monthtodatecoolingdegreedaysnormal": "",
"since1sepcoolingdegreedays": "",
"since1sepcoolingdegreedaysnormal": "",
"since1jancoolingdegreedays": "",
"since1jancoolingdegreedaysnormal": ""
}]
}
Thanks for the sample snippets.
@saxnpaule said in New plugin [pimatic-wunderground]:
Could you please provide an usecase and a possible rule or action request?
The use case is a terrarium control system which simulates the habitat of a reptile with respect to daylight, temperature, and humidity. The idea is to take the actual temperature of the natural habitat (Vietnam) into account rather than using climate tables with average temperatures. As Vietnam is 7 hours behind UTC, it is required to access the history data as the daylight cycle for is shifted to our local time.
An action to fetch the temperature/humidity at a given time or date where the given time is matched to the closest available history data) would suffice.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
Unfortunately this is not possible by the API. The API returns the whole past day with at least 12 or more datasets.
I think there needs to be a WeatherHistoryDevice that takes:
At local time 12 o’clock
Day Offset = 0 and Time Offset -7 would be today 5 o’clock at the configured location.
Time Offset = -13 would be yesterday 11 PM at given location
There is a lot of calculation needed and in case of summer/winter time in Germany there will be additional testing required.
I can give it a try with finding the nearest possible datetime in the response.
The device will provide variables for temperature, humidity and rain in a first version.
@mwittig I’m at the implementation of the device but I’m totally weird in the head now.
Everything should be calculated with the UTC date for don’t caring about daylight saving time.
If the user configures an offset of -7 hours, what should be used? 7 hours before CET or 7 hours before MEZ?
The wunderground API profides all measurepoints also in UTC, so it would be easy to find a corresponding point.
Hi @SaxnPaule
thank you for the very nice plugin. Everything is working fine except that I’m getting a lot of logging data. It seems that the plugin is polling very often. Is that normal?
I have set an upadte interval of 30 minutes in the config.
I think you misconfigured something. Do you have the latest version?
This is how my log looks like:
18:03:20.022 [pimatic-wunderground] info: Reloading weather data...
18:33:20.044 [pimatic-wunderground] info: Reloading weather data...
19:03:20.051 [pimatic-wunderground] info: Reloading weather data...
19:33:20.058 [pimatic-wunderground] info: Reloading weather data...
20:03:20.072 [pimatic-wunderground] info: Reloading weather data...
20:33:20.094 [pimatic-wunderground] info: Reloading weather data...
21:03:20.166 [pimatic-wunderground] info: Reloading weather data...
21:33:20.242 [pimatic-wunderground] info: Reloading weather data...
22:03:20.255 [pimatic-wunderground] info: Reloading weather data...