OpenSprinkler / OpenSprinkler-Weather

OpenSprinkler weather service used to calculate watering scale for the OpenSprinkler Unified Firmware.
https://opensprinkler.com
63 stars 38 forks source link

What directory for Baseline_ETo_Data.bin #79

Closed rmloeb closed 5 years ago

rmloeb commented 5 years ago

Where does the Baseline_ETo_Data.bin file go (what directory and where in the directory hierarchy)?

PeteBa commented 5 years ago

You currently need to build it yourself. See README.md in baselineEToData directory.

rmloeb commented 5 years ago

I downloaded the file, but don't know where to place it. The error message from weather server says the path is ../weather/js/routes/../../baselineETOData/Baseline_ETo_Data.bin, but the two intermediate directories aren't defined. ../js/routes/adjustmentMethods exists. Do I create a baselineETOData directory there?

PeteBa commented 5 years ago

Go to the root directory of your github clone. If you are up-to-date then you should see a directory called baselineETOData. You place the .bin file there.

Side note: where did you download the Baseline_ETo_Data.bin file from ? I believe currently you need to build the file using the docker instructions in the README.md. But I may be a bit out of date of on this one.

rmloeb commented 5 years ago

File can be downloaded from http://www.mediafire.com/file/n7z32dbdvgyupk3/Baseline_ETo_Data.zip/file. 67 megs.

Put it in the right place, thank you. Did not get an error when I restarted weather server. However, OS is giving me the same baseline ETO as it was when the file wasn't present, which makes me a little suspicious.

Meanwhile, OS is reporting 14mm of precip today. There hasn't been one drop. The last response to OS from weather server was "rainin":"0.00"

rayshobby commented 5 years ago

This file is used in a different endpoint to obtain baseline ETo data. When you call the weather API you still have to provide the baseline ETo, through the wto= parameter. The reason it's done this way is so that the user can customize baseline ETo value, instead of being forced to use the default one from the .bin file.

PeteBa commented 5 years ago

@rmloeb , to put a bit more color on Ray's comment, App calls an endpoint on the weather service located at weather.opensprinkler.com to initialise the baseline NOT your local weather service. So adding the .bin file to your local server will get rid of the loading error message but have no impact on day-to-day operation.

rmloeb commented 5 years ago

OK. Got it. Thank you and Ray for the clarification. And I can modify the baseline ETo in OS Weather Adjustment Options, although I have no idea how I'd establish a different number.

rmloeb commented 5 years ago

Interesting. OS was reporting precip today of 14mm. It's now 13mm, but the server is returning 0.

rayshobby commented 5 years ago

ET always uses yesterday's data, it does not consider the current observation of today.

rmloeb commented 5 years ago

OK. But I just rebooted the weather server, so there should be no value for yesterday's rain. (Both rainin and dailyrainin are reporting 0.) I also rebooted OS. And we had zero precip yesterday. Not sure where the 13mm is coming from.

rayshobby commented 5 years ago

depends on where you see the 0mm. At the moment the app makes a different weather call than what the firmware uses, so the data you see in the app (under Weather Diagnostics) is likely different from what the firmware gets. It's an inconsistency issue that we need to address next.

rayshobby commented 5 years ago

You can always use the: weather.opensprinkler.com/weather1.py?loc=your_location_or_gps_coord to check the data that's used to calculate the watering percentage. You should see the rawData appended at the end of the result.

rmloeb commented 5 years ago

Ray, thank you very much for the clarification! I had forgotten that the System Diagnostics data was suspect. The water level calculation seems about right.

I'm running my own weather server to feed the data from a Davis PWM, but now I'm curious as to what is reported by weather.opensprinkler.com. Interestingly, it's the same as being reported from my copy of weather server, which is highly suspicious. Only thing different is the eip in the response. Not sure how to interpret that...

rayshobby commented 5 years ago

eip is the external IP address (the four bytes combined into one integer). It has nothing to do with weather data so you can ignore that.

rmloeb commented 5 years ago

What that old me is that the water level data isn't coming from my weather server and is coming from yours. I reviewed my configuration and the .env file was wrong. Changed WEATHER_PROVIDER to "local" from DarkSky. Now I'm not getting any data from the weather server to OS. I can query the server and get a response, but OS has blank for last successful weather call and continues to say it is powered by DarkSky. Something else is wrong. Switched the Weather Adjustment Method to Zimmerman and got a successful call to my weather server.

PeteBa commented 5 years ago

Local doesn't yet support ETo.

rmloeb commented 5 years ago

Yup. I just noticed that the first code in EToAdjustmentMethod.ts is if ( pws ) { throw "ETo adjustment method does not support personal weather stations through WUnderground.";

Is there a reason for this? Is different data required?

PeteBa commented 5 years ago

Need to sort out some design issues. Should be "coming soon".

Looks like we have strayed from the .bin issue. Are you good to close this ?