josecastroleon / pimatic-openweather Goto Github PK
View Code? Open in Web Editor NEWPimatic Plugin that retrieves the forecast on several devices
License: GNU General Public License v2.0
Pimatic Plugin that retrieves the forecast on several devices
License: GNU General Public License v2.0
The OpenWeather team provides Api keys for Opensource Software
For FOSS developers: we welcome free and open source software and are willing to help you. If you want to use OWM data in your free software application please register an API key and file a ticket describing your application and API key registered. OWM will review your request lift access limits for your key if used in open source application.
Since yesterday I'm not having weather information updates in Amsterdam.
I'm using the same source pimatic-openweather uses also for another device causing the same problems. So it's not the pimatic-openweather plugin having the problem, it's the source. This issue message is for explanation.
error [pimatic-openweather]: Error: Not found city (404)
This is following a issue report from @Ruba5913: pimatic/pimatic#712
@sweetpi Can u please publish the new version? I don't have the access rights to publish it.
See https://forum.pimatic.org/topic/4299/openweather-forecast-invalid-api-key
Note, free accounts which had been enrolled a long time ago still work.
I think the windspeed unit should be m/s, source, when you choose metric units.
When I use it now it says km/h. Hope this helps.
Secondary question, is there a way to show less information when I add the device to a page? (snow for instance is not really relevant in the Netherlands)
Hello!
error [pimatic]: A uncaught exception occured: Error: socket hang up at createHangUpError (http.js:1472:15) at Socket.socketCloseListener (http.js:1522:23) at Socket.EventEmitter.emit (events.js:117:20) at TCP.close (net.js:466:12) This is most probably a bug in pimatic or in a module, please report it!
error [pimatic]: A uncaught exception occured: Error: connect ETIMEDOUT at errnoException (net.js:901:11) at Object.afterConnect as oncomplete This is most probably a bug in pimatic or in a module, please report it!
That is what i get a hundred times a day.
The values are read are always null
See http://forum.pimatic.org/topic/396/pimatic-openweather-variable-problem-with-pimatic-pushover/2
Hi! I have recently started seeing a trend that the values don't always correspond on Pimatic, when compared to actual openweathermap.org site.
Device:
{
"id": "weather",
"class": "OpenWeatherDevice",
"name": "Helsinki tänään",
"location": "Helsinki, FI",
"units": "metric",
"lang": "fi",
"timeout": 300000
},
EDIT: Seems like sometimes the API itself isn't reliable, I have gotten both 6,9Celsius and 4Celsius (which is correct) during this hour, multiple times.
Since a few days i'm getting errors when starting pimatic with the open weather plugin:
21:26:57.776 [pimatic-openweather] error: Object.keys called on non-object
21:26:58.801 [pimatic-openweather] debug: TypeError: Object.keys called on non-object
21:26:58.801 [pimatic-openweather] debug:> at Function.keys (native)
21:26:58.801 [pimatic-openweather] debug:> at PromiseRetryer.run.then._ref (/home/pi/pimatic-app/node_modules/pimatic-openweather/openweather.coffee:129:61)
21:26:58.801 [pimatic-openweather] debug:> at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:26:23)
21:26:58.801 [pimatic-openweather] debug:> at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:507:31)
21:26:58.801 [pimatic-openweather] debug:> at Promise._settlePromiseAt (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:581:18)
21:26:58.801 [pimatic-openweather] debug:> at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/promise.js:697:14)
21:26:58.801 [pimatic-openweather] debug:> at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:123:16)
21:26:58.801 [pimatic-openweather] debug:> at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:133:10)
21:26:58.801 [pimatic-openweather] debug:> at Async.drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/async.js:15:14)
21:26:58.801 [pimatic-openweather] debug:> at process._tickCallback (node.js:415:13)
The line in open weather.coffee tries to extract the values for snow. I've looked at the openweather api and it seems the api doesn't have any values for snow (anymore?), at least for my location (which is Oldenburg, Germany).
This is my config:
{
"id": "wetter",
"name": "Wetter",
"class": "OpenWeatherDevice",
"location": "Oldenburg, Germany",
"units": "metric",
"lang": "de",
"timeout": 300000
}
14:39:44.772 [pimatic] error:>...0, "lang": "en" "xAttributeOptions":
14:39:44.772 [pimatic] error:>---------------------^
14:39:44.772 [pimatic] error:>Expecting 'EOF', '}', ':', ',', ']', got 'STRING'
14:39:44.772 [pimatic] error:> at Object.parseError (/home/pi/pimatic-app/node_modules/pimatic/node_modules/jsonlint/lib/jsonlint.js:150:15)
14:39:44.772 [pimatic] error:> at Object.parse (/home/pi/pimatic-app/node_modules/pimatic/node_modules/jsonlint/lib/jsonlint.js:215:22)
14:39:44.772 [pimatic] error:> at Object.exports.parse (/home/pi/pimatic-app/node_modules/pimatic/node_modules/jsonlint/lib/jsonlint.js:665:51)
14:39:44.772 [pimatic] error:> at Framework._loadConfig (/home/pi/pimatic-app/node_modules/pimatic/lib/framework.coffee:98:27)
14:39:44.772 [pimatic] error:> at new Framework (/home/pi/pimatic-app/node_modules/pimatic/lib/framework.coffee:56:8)
14:39:44.772 [pimatic] error:> at /home/pi/pimatic-app/node_modules/pimatic/startup.coffee:51:21
14:39:44.772 [pimatic] error:> at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/util.js:26:23)
14:39:44.772 [pimatic] error:> at Function.Promise.attempt.Promise.try (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/main/method.js:31:24)
14:39:44.772 [pimatic] error:> at Object.module.exports.startup (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:50:10)
14:39:44.772 [pimatic] error:> at run (/home/pi/pimatic-app/node_modules/pimatic/pimatic.js:15:24)
14:39:44.772 [pimatic] error:> at /home/pi/pimatic-app/node_modules/pimatic/lib/daemon.coffee:87:9
14:39:44.772 [pimatic] error:> at Object.oncomplete (fs.js:107:15)
14:39:44.776 [pimatic] info: exiting...
this is what I get if I use the example from your manual... any tips?
@sweetpi Regarding temperature units I omitted the degree sign for Kelvin on purpose - see http://en.wikipedia.org/wiki/Kelvin
I think one can also write degrees Kelvin, but the common convention is to just use Kelvin.
set timeout= 1 hour. and no update.
Add please update on start
Hi,
is it possible to add the openweather plugin into the pimatic rule set?
I tried it with the web-frontend GUI but it did not work as I want it to work ;-)
Is it possible to add a check like "if temperatur < 20°" then "turn light on" ?
If yes, how can a do that? I only gut the event changing, but a comparison to a value is not possible.
Whould be great if someone can help me out
Thanks nears
Started having this issue about month ago. Otherwise I'm loving this plugin :)
My pimatic seems to be crashing infrequently, it might be connected to this, but not sure. Just something to keep in mind.
error [pimatic]: An uncaught exception occurred: TypeError: Cannot read property 'icon' of undefined at /home/pi/pimatic-app/node_modules/pimatic-openweather/node_modules/openweathermap/openweather.js:99:67 at IncomingMessage.<anonymous> (/home/pi/pimatic-app/node_modules/pimatic-openweather/node_modules/openweathermap/openweather.js:155: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._tickCallback (node.js:372:17) This is most probably a bug in pimatic or in a module, please report it!
It would be really cool, if you created a new device attribute for the id of the weather status and maybe also the 'main' category as provided by the openweathermap-api:
"weather": [ { "id": 500, "main": "Rain", "description": "light rain", "icon": "10n" }
Especially the id is probably not an eye-catcher for the GUI, but it would help really much to use the weather-status for rules etc.
Thanks a lot!
The values are read are always null
See http://forum.pimatic.org/topic/396/pimatic-openweather-variable-problem-with-pimatic-pushover/2
Currently you can use the forecast for N days ahead, but it would be usefull to have the forecast during the day (5 mins later or N hours later). One usecase is that it would be handy to raise the sun screen when it's going to rain in 5 mins.
In my case the the result only contain a single foreceast record for today! See also forum thread http://forum.pimatic.org/topic/679/pimatic-openweather-openweatherforecastdevice-receives-wrong-data
Some locations don't provide some values, like wind speed for example. When it happens, the error "Cannot call method 'toFixed' of undefined" is fired. You can check it with town Munebrega, Spain.
Thanks in advance.
I don't need information about humidy and air pressure. It would be nice to make the visibility configurable like:
{
"id": "currentWeather",
"class": "OpenWeatherDevice",
"name": "Today",
"location": "Location, XX",
"units": "metric",
"timeout": 900000,
"lang": "en"
"shownValues": {
"desc": true,
"temp": true,
"humidity": false,
"airPressure": false,
"rain": true,
"snow": true,
"wind": true,
"min": true,
"max": true
}
}
Hello.
I want to configure my Pi as a smart garden pump device so if it has rained yesterday or today that the pumps won't open. I'm controlling the pumps via the GPIO pins on the Pi.
Could you make it possible to tell if it rained yesterday?
In my opinion the sparklines does not have a (important) significance due to long update intervals. It would be great if sparklines could be disabled for all elements in the widget (or each separately).
Unfortunatly i am not familiar with coffee script, so i can't submit a pull request right now.
Sometimes i get an error location not found. I was wondering how this is possible and if the current location name is responsible for this? Could an extra locationId field or replacing the current location with a locationId give help to solve the errors?
Location=Amsterdam, NL
LocationId=2759794
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.