This model, which has been in preview for a few months, is now finally available to users on a Plus subscription. Additionally, there is a new $200-per-month tier that offers unlimited requests, as well as access to GPT o1 Pro.
Integrating Tilt & Azimuth
December 02, 2024
Integrated the Tilt and Azimuth sliders into both the table and graph components of the React frontend, ensuring that user adjustments dynamically influence the displayed data. By updating and verifying each component, the application now provides a comprehensive and interactive user experience, allowing for analysis of solar irradiance and power output based on panel orientation and scaling factors.
Flask Caching and HTTPAuth
December 01, 2024
I have integrated a caching mechanism into my Flask application using the Flask-Caching extension. By configuring SimpleCache with a five-minute timeout, my /api/irradiance endpoint now efficiently stores and retrieves irradiance data based on unique query parameters. This enhancement significantly reduces redundant requests to the NASA POWER API, improving response times and optimizing resource usage. The caching implementation ensures that repeated requests with identical parameters within the cache duration are served swiftly from the cache, thereby enhancing the overall performance and scalability of my application.
Additionally, I fortified the security of my Flask API by implementing Basic Authentication with the help of the Flask-HTTPAuth extension. By defining a secure user store with hashed passwords, I restricted access to the /api/irradiance endpoint, ensuring that only authorized users can retrieve sensitive irradiance data. This authentication layer prevents unauthorized access and protects my API from potential misuse. The testing of both authenticated and unauthorized access attempts confirms that my API is now both performant and secure, laying a strong foundation for further development and deployment of my solar energy project.
React Components
December 01, 2024
On the frontend, React components have been updated to interact dynamically with the backend. The App.js file was modified to include the slider values (multiplier, tilt, and azimuth) in API requests, ensuring that user adjustments directly influence the data retrieved. The SolarForecastTable.js and SolarForecastGraph.js components were corrected to reference the appropriate data properties returned by the backend, eliminating runtime errors and enabling accurate data visualization.
As a result, all three sliders now effectively impact both the table and the graph, providing a responsive and interactive user experience. The application now displays adjusted irradiance data, laying a foundation for further enhancements and deployment.
New Month
December 01, 2024
The first day of the month has brought an unexpected and unwelcome change: I’ve switched the api to NASA. Solcast presented too many issues, primarily the strict api call limits and over-reliance on a redis server. Additionally, Solcast frequently returned JSON data with empty or null values, which caused significant problems with the slider interactions. This additional workload at such a late stage was entirely unnecessary. I had hoped to start migrating to AWS by now, but that hasn’t happened. Hopefully, I can recover the lost time later.