LoveBootCaptain / WeatherPi_TFT

a weather display for a raspberry pi and a TFT display written in python3 and pygame
Other
78 stars 24 forks source link

What if Weatherbit doesn't support my city? #44

Closed phanxen closed 3 years ago

phanxen commented 3 years ago

Hello Everyone,

I got the kit for building the AZ Touch PI-Zero weather station. All the installation procedures went fine.

However, what if Weatherbit doesn't support the city where I am? I live in Novi Sad, Serbia, and I can't get weather info from Weatherbit. To be honest, I couldn't fid PIN codes for Serbia.

If I use the default configuration (Berlin, Germany) everything runs smooth. For instance, at the moment, I see on the display the information for Berlin. Actually, I'm writing this paragraph just to keep it clear that it's not a problem with configuration, Weatherbit API, hardware, and so on.

After saying this, my question is, is there support to other weather backend service?

Thanks!

phanxen commented 3 years ago

Actually, Weatherbit does support my city (Novi Sad, Serbia). However, in this case, I can't use PIN.

Thus, I can't get weather info using, for instance, city ID.

The Weatherbit docs include a few JSON and CSV files with cities' data (ID, location, etc). All them can be used, and a small patch to WeatherPITFT.py allowed me to use the city ID.

Greetings.