GithubHelp home page GithubHelp logo

Comments (4)

elewin avatar elewin commented on August 22, 2024

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.

elewin avatar elewin commented on August 22, 2024

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.

morphias2004 avatar morphias2004 commented on August 22, 2024

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. :)

image

image

Thanks in advance...

from pi-weather-station.

elewin avatar elewin commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.