rszimm / sprinklers_pi

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

Wunderground API works for providers #141

Open Skispcs opened 5 years ago

Skispcs commented 5 years ago

I didn't want to create a new ticket but the others were closed. If you have a personal weather station and are providing data to wunderground you can use the new API for free. API Docs

Above link provides details on how it works. I have tried it and it works for me.

I saw mention of making the weather providers pluggable. Is there a good link on some docs on how to get started with that. I can try to make a plug in for the new API.

This call gets the recent history for a weather station. https://api.weather.com/v2/pws/dailysummary/7day?stationId=KMAHANOV10&format=json&units=e&apiKey=yourApiKey

Skispcs commented 5 years ago

Since the old Wunderground API module no longer works. Should I rewrite that one or create a new one with a new name? Name Suggestions?

nhorvath commented 5 years ago

You can replace the old one. There's no point in keeping it around anymore.

On Wed, May 15, 2019 at 11:18 PM Skispcs notifications@github.com wrote:

Since the old Wunderground API module no longer works. Should I rewrite that one or create a new one with a new name? Name Suggestions?

— 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/141?email_source=notifications&email_token=AABIJXAR64FPJFOWXLVWAMLPVTHB7A5CNFSM4HNIO6LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVQRFHI#issuecomment-492901021, or mute the thread https://github.com/notifications/unsubscribe-auth/AABIJXBNMNTFPHL2KKFC7JTPVTHB7ANCNFSM4HNIO6LA .

Csepp commented 5 years ago

Would be great if you could update the Wunderground functionallity. Currently the API Key in the WEB interface is only 16 char. The Wunderground API is 32 char. I tried but could not fix it.

nhorvath commented 5 years ago

@Csepp the new api is completely different from the old one, from what I understand. I don't have a PWS to contribute data with so I don't have access to the new API to do this.

Csepp commented 5 years ago

@nhorvath it looks like yes. Once you sign in on Wunderground you get automatically an API key independent from you own PWS. But if you need a api key I could share my key for testing. My favorite solution by the way would be a Netatmo interface as my PWS is Netatmo. But Wunderground is good as well. I think many other would might have same setup.

nhorvath commented 5 years ago

I already looked into Neatamo (here: https://github.com/rszimm/sprinklers_pi/issues/143) and there would need to be a separate data polling application to build up the data we need. Much larger scope.

If you email me some working wunderground credentials I'll look into it. nhorvath [at] gmail

Skispcs commented 4 years ago

I have the URL request to wunderground working but the api key is vexing me. The web page GUI only allows me to enter 16 characters and the new api key is 32. Where is the APIkey stored and where should i look to change the limit on the number of characters that can be entered?

nhorvath commented 4 years ago

You should switch to using API ID which allows 32 characters or API Secret which allows 64. the API Key is in the middle of the memory map and can't be expanded.

You would access it at settings.apiId or settings.apiSecret from inside the wunderground class

        char apiId[LEN_APIID+1]; // 32 character string
        char apiSecret[LEN_APISECRET+1]; // 64 character string

You would also need to change web.cpp to return one of those instead of apikey so it shows the right field in settings page.

interbiznw commented 4 years ago

Was there more progress on this @nhorvath @Skispcs ? I also have a PWS and push data to WU therefore have API access and would like to get this working again.

TIA