pimoroni / scroll-phat-hd

Python library for Scroll pHAT HD
https://shop.pimoroni.com/products/scroll-phat-hd
MIT License
159 stars 64 forks source link

wunderground-temp-display.py Not working #61

Open vwillcox opened 5 years ago

vwillcox commented 5 years ago

wunderground-temp-display.py no longer working as Weather Underground do not provide API keeys.

Gadgetoid commented 5 years ago

Oof- nothing like continuously moving goalposts, eh!

I think we have some other code somewhere that works although it looks like a combo of OpenWeatherMap and https://github.com/csparpa/pyowm would be the best approach.

sandyjmacdonald commented 5 years ago

@Gadgetoid https://github.com/pimoroni/inky/blob/master/examples/phat/weather-phat.py

Gadgetoid commented 5 years ago

Downside of the darksky approach is it being an extremely fragile not-API based web scrape (of a service that explcitly sells API based access) that will probably succumb to the same fate as wunderground :(

Granted, they're so focussed on their API service that they make no claims that scraping their website is not allowed. 🤔

Note: I just set up an OpenWeatherMap API key, fired up pyowm and found that even the most basic examples failed for me with "Your API subscription level does not allow to perform this operation." so it's clear that road is a dead end too.

Edit: And lo, OWM suddenly works.

sandyjmacdonald commented 5 years ago

The drawback of openweathermap is that the API requires signing up to get an API key for access. The reason wunderground was so good was that there wasn’t any of that shenanigans involved.

Gadgetoid commented 4 years ago

We probably need to port this to the darksky.net approach as seen here: https://github.com/pimoroni/inky/blob/master/examples/phat/weather-phat.py

Broadly I think we're on a wild goose chase with weather APIs and need to move to a better approach which is why I want to investigate Pirate Weather-as-an-app: https://github.com/pimoroni/piwe/projects

wild4gadgets commented 4 years ago

I just noticed the wunderground API problem; it seems that the agromonitoring API might be the way to go; they have a free version. I haven't played with it much yet but will do so when I get a few cycles. https://agromonitoring.com

Gadgetoid commented 3 years ago

I think openweathermap.org and pyowm might be the answer for weather in general - https://github.com/csparpa/pyowm

willdolezal commented 2 years ago

I've updated @wild4gadgets original script to use the OpenWeather API and made a pull request.

lghustle commented 2 years ago

REMOVE ME FROM THIS THREAD!!!!!

L.G.

On Dec 11, 2021, at 7:51 PM, Will Dolezal @.***> wrote:

 I've updated @wild4gadgets original script to use the OpenWeather API and made a pull request.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.