DEV Community

Jack Lin
Jack Lin

Posted on

Weather Dashboard with 5-Day Forecast and Wi-Fi Menu

Image description

Countless people have built weather display projects before, and just showing the current weather can get a little dull. So, I decided to take it up a notch. My weather panel displays the current weather and includes a bar chart showing the 5-day high and low temperatures. On top of that, there's a menu interface for switching Wi-Fi connections.

Hardware setup: Raspberry Pi Zero WH paired with a Nextion NX8048T050 HMI touchscreen display.

Features:

  • Weather data fetching from Open-Meteo API
  • Utilizes GI (PyGObject) and pycairo for network connection management
  • Utilizes Nextion GUI designing commands to draw 5-day weather bar chart
  • Automatic location detection via IPInfo.io API
  • Geocoder for location name resolution via Nominatim API

This project was implemented on Linux using Python. While Python made the development process straightforward, I felt that the approach lacked the feeling of IoT development. I plan to rewrite the code in C/C++. Another plan is to switch the controller to an ESP32 and maybe implement it on a lightweight RTOS.

Demo video: https://www.youtube.com/shorts/vR5DYhlheCI
GitHub: https://github.com/blueskyson/pi-zero-weather

Top comments (0)