With the second version of my RPi thermometer built with Raspberry Pi I wanted to:
- learn more about API requests and pull data from an external service;
- get familiar with the principles of modular programming.
For the first, I decided to go with the OpenWeatherMap API and the free tier for Current weather data (up to 60 calls per minute). From all the data provided by the service, I was going to need only the current temperature for Sofia, Bulgaria.
As my program got more complex, I split the code in modules — one for each function of the program:
- one to read the data from the RPi sensor;
- one for the OpenWeatherMap data;
- one for the database management;
- one to bundle them together.
The next version of the TemPY program will focus on:
- analysis of the correlation between internal, external temperature and gas consumption, possibly allowing me to improve energy efficiency;
- turning the program into a package.
The second version of TemPY is in its own Git repository.