Welcome to Photonostics for solar panel efficiency monitoring, especially useful for DIY project users. My monitor makes sure external factors such as:
-
Dust Accumulation
-
Sudden shading
-
Overheating
don't cause sudden losses in the efficiency of your panel(s) while going unnoticed.
-
DS18B20 Waterproof: Temperature
-
KY-018 LDR: Light Intensity + part of baseline ratio
-
INA219: Measure Power produced + Voltage
-
ESP32: The Brain: Send data to website + Serial monitoring
-
Solar Panel: To measure power produced + voltage
-
Buck Converter (Optional): Connect INA219 VIN- and VIN+ to Buck Converter + which should also be connected to Solar Panel positive
-
Load: Either connected to Buck Converter or directly to solar panel
- if directly: same connection steps as buck converter except replace buck converter with load
- else: no need to think much about this
-
3.3V battery/5V battery connected directly to USB entry point of ESP32: Power ESP32
- For More Info: Click Here
-
INA219, ESP32: Close to Panel but inside enclosure
-
KY-018: On top of the Solar Panel angled exactly how Panel is angled
-
DS18B20 Probe Sensor: Stick outside ideally near panel to measure ambient air temperature
-
Wire.h: For I2C Communication
-
WiFi.h: To make sure WiFi status is OK before HTTP requests, etc
-
WiFiClientSecure.h: Manage required encryption for the HTTPS requests
-
Preferences.h: To store device id and device api key in non-voltatile memory of ESP32 (NVS)
-
WiFiManager.h: To allow users to connect to a network without hardcoding credentials
-
ArduinoJson.h: To send data to server via JSON
-
DallasTemperature.h: To get temp readings
-
OneWire.h: DS18B20 functions on OneWire protocol to initialize sensor
-
Adafruit_INA219.h: For INA219 functions
-
HTTPClient.h: For HTTP requests
-
Flask Backend on Render
-
HTML/CSS/JS/Jinja/Bootstrap - Frontend
-
PostgreSQL Database on Supabase
-
Uptimerobot
-
The Following APIs:
- VAPID: send push notifications
- Brevo: send reset password emails
-
The Following Libraries:
- flask: backend microframework
- flask_limiter: rate limit requests
- psycopg2: PostgreSQL database
- os: get env variables + serve robots.txt and service worker
- dotenv: load env variables to use
- contextlib: database cursor automation
- datetime: inject year to footer, expiry of auth tokens, time graphs + dynamic sitemap lastmod date
- secrets: generate auth tokens
- werkzeug: hash passwords and check them
- re: regex of device ids
- email: make body of password reset emails
- smtplib: send password reset emails
- pywebpush: send the push notifications themselves
- json: decode the notification payload
- logging: log warnings/errors in dashboard
- threading: make responses faster
- hashlib: hash API keys
- concurrent: have 4 thread workers ongoing to send notifications
- matplotlib: generate and plot the graphs used in the Analytics page
- base64: render graph as png into html template
- io: stores generated graph in internal RAM instead of creating a new image file for each graph
To check out the website: Click Here
The device itself is licensed under the MIT license - may be edited upon, improved, etc For further details: Click Here
The website is licensed under the GNU GPL V3 license - For further details: Click Here
Saif Kayyali