• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

openweather vs open-meteo

Q&A Forum › Category: ESP32 › openweather vs open-meteo
0 Vote Up Vote Down
Davy asked 10 months ago

Hi,
While following the course for micropython I was having issues with openweather.
Finally it seems you have to wait for ages before the api-key is activated at their side.
In the meanwhile I converted the exercise to open-meteo.com (you can use their api without registering.)
Personally I think this would be better for the book ๐Ÿ™‚
with the following code I could remake the exercise without any acount (I only implemented temperature and humidity)
 
open_weather_map_url = ‘https://api.open-meteo.com/v1/forecast?latitude=51.1939&longitude=4.0965&current=temperature_2m,relative_humidity_2m,weather_code,surface_pressure,wind_speed_10m,wind_direction_10m&timezone=Europe%2FBerlin’
weather_data = requests.get(open_weather_map_url)
print(weather_data.json())

temperature = weather_data.json().get(‘current’).get(‘temperature_2m’)
temperature_unit = weather_data.json().get(‘current_units’).get(‘temperature_2m’)
print(f”Temperature: {temperature}{temperature_unit}”)
humidity = weather_data.json().get(‘current’).get(‘relative_humidity_2m’)
humidity_unit = weather_data.json().get(‘current_units’).get(‘relative_humidity_2m’)
print(f”humidity: {humidity}{humidity_unit}\n\n”)

Question Tags: MicroPython
5 Answers
0 Vote Up Vote Down
Davy answered 10 months ago

On this page you can even construct the query for the API, so you only receive the data you want ๐Ÿ˜‰
https://open-meteo.com/en/docs

0 Vote Up Vote Down
Sara Santos Staff answered 10 months ago

That’s great.
Thanks for sharing.
Seems better than the one we’re currently using.
Regards,
Sara

0 Vote Up Vote Down
Sara Santos Staff answered 10 months ago

We’ll probably change to use that API or this one: https://www.weatherapi.com/

0 Vote Up Vote Down
Davy answered 9 months ago

Thank you!
Great courses btw ๐Ÿ™‚

0 Vote Up Vote Down
Sara Santos Staff answered 9 months ago

Thanks.
I’ll close this issue now.
If you need further help, or have more suggestions, you just need to open a new issue in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login ยป

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright ยฉ 2013-2025 ยท RandomNerdTutorials.com ยท All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.