-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a demo pannel and statistics for local weather data #377
Conversation
cool, i will try.temp gauge/statistic from owm I have already. |
Added "weather.conf" in "/ect/rpimonitor/template" using my API key, checked that every 5 min the file "/tmp/weather.dat" was written. Data in weather.dat are correct (checked using nano). But no data appears in RPI web interface, only a new tab called "weather" both in "status" and in "statistics". What can be the problem? weather.dat |
Can you check in the log file of RPIMonitor (should be /var/log/rpimonitor.log ). Is there any error related to access to weather.dat ? |
Thanks for the suggestion... anyway I think no error related to weather.dat /var/log/rpimonitor.log [2022/05/18-16:26:29] RPi-Monitor has been started |
Maybe you missed the copy/paste of the weather.dat, but this element is invalid : |
Thansk a lot. There is a mistake in my previous copy/paste. This is my correct "weather.dat". {"coord":{"lon":9.7891,"lat":42.8264},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"base":"stations","main":{"temp":26.34,"feels_like":26.34,"temp_min":26.34,"temp_max":26.92,"pressure":1022,"humidity":70,"sea_level":1022,"grnd_level":1005},"visibility":10000,"wind":{"speed":5.98,"deg":92,"gust":9.68},"clouds":{"all":11},"dt":1652892179,"sys":{"type":1,"id":6744,"country":"IT","sunrise":1652845717,"sunset":1652899468},"timezone":7200,"id":3168627,"name":"Rome","cod":200} |
I cant reproduce the problem you had with your coordinates ("lon":9.7891,"lat":42.8264) and I got the correct graph in "statistics" and correct info on "Status" section of RPIMonitor.
|
Attributes for /tmp/weather.dat are -rw-rw-rw- and the file is updated every about 5 minutes. [2022/05/31-12:02:41] RPi-Monitor has been started [2022/05/31-12:02:42] Change loglevel to 1 |
My current version is 2.12 r0, launching "sudo /etc/init.d/rpimonitor update" no update occurs. However the lastest version should be 2.13 |
Thanks for this. I just saw this branch and tried it out. At first I had the same problems, it just wouldn't show up. When I tried to get the weather tab, it showed I then modified the weather.conf by commenting out the two lines at the top after "Add new pages", and changed the 3 to 1 in the web.status.X below to have it all on the same page. Really neat! And you can copy this PNG to |
This conf file add a panel with weather data provided by OpenWeatherMap. You will find :
Statistics are also collected for some metrics :
This config file use the OpenWeatherMap API, for which you have to subscribe (for free) to have an AppId. Set the AppId in the weather.conf file, or you will have "undefined" error on the report. You can find some AppId on the wild by using your favorite search engine.
Your RPi will make regular https connection to the api, please allow connection to api.openweathermap.org on your firewall. The connection frequency is about 1 call every 5 minutes (may be changed in the weather.conf).
The report will display icon of weather (sun, cloud...) which are hosted on openweathermap.org . For privacy concern, be warned that your RPi-monitor instance may be exposed by the "referer" http header to the internet.