Comments (4)
There isn't an adjustment that you can easily make in the app itself, but if you don't mind messing with the code and rebuilding the app with webpack, the update intervals are defined here:
https://github.com/elewin/pi-weather-station/blob/master/client/src/components/WeatherInfo/index.js#L10
Currently it updates the current weather every 10 minutes, the hourly weather every hour, and the daily weather every 24 hours. In total that should be 156 calls / day. Changing the current weather call interval to 20 minutes should get you under 100.
Keep in mind though that this is if you keep the map location stationary, as every time you move the map to a new area it will make a new query for each one of those as it gets the data for the new coordinates you scrolled to.
from pi-weather-station.
I'll see about updating the app to make the current weather data interval adjustable from within the settings page to make it easier for people.
from pi-weather-station.
Hi @elewin ,
Love this project! 👍
Just wondering if you ever went any further with this?
I'm happy with the Info, Hourly and Daily updates, but would like to reduce the rain chart updates from 10mins to 5mins.
I found the index.js file in pi-weather-station\client\src\components\WeatherMap
and edited L10 from 10 minutes to 5 minute and then rebooted, but it made no difference.
const CURRENT_WEATHER_DATA_UPDATE_INTERVAL = 5 * 60 * 1000; //every 5 minutes
I'm not familiar with webpack.
I did successfully change the conversion, Settings button and displayed units for the wind speed from mph to knots by editing a few index.js
files and the bundle.min.js
file. :)
Thanks in advance...
from pi-weather-station.
If you run webpack from the command line, it will read the updates you made in the source files and generate a new bundle.min.js file for you, but it looks like you managed to manually do it. Looks great!
from pi-weather-station.
Related Issues (20)
- Client Build Production version and Deploy to Web Container.
- Error 403 for 7-day weather forecast HOT 23
- 7 Day forecast no longer working HOT 1
- Startup Screen flashes and disappears HOT 1
- Cannot see map HOT 3
- NOT AN ISSUE...Just a question about map colors HOT 3
- 5 Day Forecast on docker HOT 7
- Entering API keys on browser pop-up. HOT 1
- Font size
- Errors in Docker version HOT 2
- blinking clouds
- No temperature, wrong weather icon
- Map, weather, geolocation populates with keys, precipitation map cover shows, but no map layer underneath showing countries, cities, etc.
- 5 Day Forecast Error with Status Code 403
- openweathermap option?
- Adding localization option HOT 1
- Action Required: Migrate Your Tomorrow.io API Domain HOT 3
- Another map API? HOT 1
- code: 'MODULE_NOT_FOUND',
- Map not showing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pi-weather-station.