rszimm / sprinklers_pi

Sprinkling System Control Program for the Raspberry Pi
GNU General Public License v2.0
310 stars 100 forks source link

Change unit temperature #110

Closed rafek00 closed 6 years ago

rafek00 commented 6 years ago

Hello, first of all, this project is that what I need to replace my Hunter controller :) - great work I try to find way to change temperature and speed of wind unit - fahrenheit to celsius and mph to kmh - (from wunderground api), where to look for that ?

rafek

nhorvath commented 6 years ago

I'm sorry but right now everything uses imperial units and as this is just a side project for myself it's not likely to be added any time soon. I welcome a pull request that adds full metric support from anyone with spare time. Regardless of what displays, Wunderground provides both so this shouldn't be a problem for the calculations. Are you having problems with Wunderground providing the imperial data for us?

On Sun, Mar 4, 2018 at 3:10 PM, rafek00 notifications@github.com wrote:

Hello, first of all, this project is that what I need to replace my Hunter controller :) - great work I try to find way to change temperature and speed of wind unit - fahrenheit to celsius and mph to kmh - (from wunderground api), where to look for that ?

rafek

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rszimm/sprinklers_pi/issues/110, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKE3ITDvcJ4zamQ0cD91PC8oNeRJ4qIks5tbEoygaJpZM4SbemO .

rafek00 commented 6 years ago

Exactly, wunderground provides both units. I try to find in code where is units "temp_c" and "wind_kph"(maybe i'm wrong).

nhorvath commented 6 years ago

Oh so your question is really about wunderground api?

we use meanwindspeedi and meantempi. the metric values would be meanwindspeedm and meantempm.

FYI here's the api docs for wunderground: https://www.wunderground.com/weather/api/d/docs We use the yesterday call: https://www.wunderground.com/weather/api/d/docs?d=data/yesterday To get the daily summary which contains our data:

http://api.wunderground.com/api/API_KEY_GOES_HERE/yesterday/q/NY/New_York.json

    "response": {
        "version": "0.1",
        "termsofService": "http://www.wunderground.com/weather/api/d/terms.html",
        "features": {
            "yesterday": 1
        }
    },
    "history": {
        ...
        "dailysummary": [
            {
                "date": {
                    "pretty": "12:00 PM EST on March 04, 2018",
                    "year": "2018",
                    "mon": "03",
                    "mday": "04",
                    "hour": "12",
                    "min": "00",
                    "tzname": "America/New_York"
                },
                "fog": "0",
                "rain": "0",
                "snow": "0",
                "snowfallm": "0.00",
                "snowfalli": "0.00",
                "monthtodatesnowfallm": "T",
                "monthtodatesnowfalli": "T",
                "since1julsnowfallm": "60.45",
                "since1julsnowfalli": "23.80",
                "snowdepthm": "0.00",
                "snowdepthi": "0.00",
                "hail": "0",
                "thunder": "0",
                "tornado": "0",
                "meantempm": "4",
                "meantempi": "39",
                "meandewptm": "-5",
                "meandewpti": "23",
                "meanpressurem": "1019",
                "meanpressurei": "30.10",
                "meanwindspdm": "15",
                "meanwindspdi": "10",
                "meanwdire": "",
                "meanwdird": "355",
                "meanvism": "16",
                "meanvisi": "10",
                "humidity": "",
                "maxtempm": "7",
                "maxtempi": "44",
                "mintempm": "1",
                "mintempi": "34",
                "maxhumidity": "64",
                "minhumidity": "34",
                "maxdewptm": "-2",
                "maxdewpti": "29",
                "mindewptm": "-9",
                "mindewpti": "15",
                "maxpressurem": "1020",
                "maxpressurei": "30.13",
                "minpressurem": "1018",
                "minpressurei": "30.06",
                "maxwspdm": "35",
                "maxwspdi": "22",
                "minwspdm": "6",
                "minwspdi": "4",
                "maxvism": "16",
                "maxvisi": "10",
                "minvism": "16",
                "minvisi": "10",
                "gdegreedays": "0",
                "heatingdegreedays": "26",
                "coolingdegreedays": "0",
                "precipm": "0.00",
                "precipi": "0.00",
                "precipsource": "",
                "heatingdegreedaysnormal": "26",
                "monthtodateheatingdegreedays": "87",
                "monthtodateheatingdegreedaysnormal": "106",
                "since1sepheatingdegreedays": "",
                "since1sepheatingdegreedaysnormal": "",
                "since1julheatingdegreedays": "3333",
                "since1julheatingdegreedaysnormal": "3628",
                "coolingdegreedaysnormal": "0",
                "monthtodatecoolingdegreedays": "0",
                "monthtodatecoolingdegreedaysnormal": "0",
                "since1sepcoolingdegreedays": "",
                "since1sepcoolingdegreedaysnormal": "",
                "since1jancoolingdegreedays": "2",
                "since1jancoolingdegreedaysnormal": "0"
            }
        ]
    }
}
rafek00 commented 6 years ago

Yes, this is it :) thank you for explanation