goeh / weather-collector

This Java program read data from a weather station (Davis Vantage Pro2) and store it in a SQL database
5 stars 3 forks source link

Get data every minute instead of every 5 #21

Open saveriogzz opened 3 years ago

saveriogzz commented 3 years ago

Simply to have the measurements as accurate as possible! When using WeatherLink application on Windows, I noticed that the bar measurements had one decimal point, and they were logged every minute instead of 5.
I was hoping we could have the option choose that, but it's not urgent at the moment. I'll dig into it! Originally posted by @saveriogzz in https://github.com/goeh/weather-collector/issues/13#issuecomment-939934274

goeh commented 3 years ago

You can run the downloader as often as you want, but your WeatherLink will only sample data at the rate specified by the SETPER <minutes> command. If you look at https://github.com/goeh/weather-collector/blob/master/src/main/java/se/technipelago/weather/vantagepro/AbstractDavisController.java#L218 you will se that the last time I configured my WeatherLink I used 10 minutes. That's what I have currently in my setup. The configure() call is commented out because SETPER clears the memory every time you run it. So we should have a command-line option to run configure / set sample period.

goeh commented 3 years ago

It would be nice to use https://picocli.info/ for parsing command line options

saveriogzz commented 3 years ago

It would be nice to use https://picocli.info/ for parsing command line options

Nice! I think it's the Java sister of Python's click