Did you add your API key to the config?
Nevertheless, I added some lines of code to avoid pimatic from crashing if the key is missing.
New plugin [pimatic-wunderground]
Did you add your API key to the config?
Nevertheless, I added some lines of code to avoid pimatic from crashing if the key is missing.
version 0.0.5 released 2018-02-16
If you want to use geo coordinates instead of countries/cities, leave the country and state property empty and only use the city property in following format:
45.123456,15.654321
I updated to version 0.0.5 but the pimatic GUI still states that version 0.0.4 is installed. The log now gives me this:
[pimatic] error: Invalid config of pimatic-wunderground: Property “apiKey” is not a valid property, Property “city” is not a valid property
I double checked the apiKey, it is the correct one. This is my config:
{
"apiKey": "xxxxxxxxxxxxxxxx",
"plugin": "wunderground",
"active": true,
"city": "52.43,13.58",
"debug": true
}
Furthermore, the only thing i now can change via the GUI in the settings is switching ‘debug’ on and off.
Yes, please remove all properties from the plugin config except debug.
{
"plugin": "wunderground",
"debug": true
}
These properties need to be part of the device config.
If you still have 0.0.4 installed remove the pimatic-wunderground folder from node_modules and run a
sudo npm install pimatic-wunderground@0.0.5
from pimatic-app folder
Success! And it looks very nice, thank you! I’ll keep you posted if I see anything weird
Just got an automated email from wunderground, stating that my API key ‘exceeded its allotted usage today by making 502 calls in a day but the limit is 500’.
Is there a way to reduce the number of calls?
How many devices did you configure? For normal that shouldn’t happen. I don’t know exactly, but I think there are only two requests every 10 minutes.
Just one, with three days forecast.
I checked the code. Two request every five minutes or on page reload.
One request for actual weather and one for the forecast.
That means round about 300 requests per day.
@saxnpaule said in New plugin [pimatic-wunderground]:
Two request every five minutes or on page reload.
One request per 5 minutes already makes 480 requests a day. I think you need to increase the interval to something more decent, say 15 minutes as this appears to be the shortest update cycle for wundergound anyway. “We’d rather update 15 minutes for the often updating stations and 1-3 hours for the national ones if we’re not going to get any new data. That would substantially help us keep costs down.” - https://apicommunity.wunderground.com/weatherapi/topics/how_often_is_the_api_updated
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
I’ll update the code tomorrow and publish a new version.
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