The Octopus Energy Rate Display project is an Arduino-based application that fetches and displays electricity unit rates from the Octopus Energy API. It utilizes an LCD screen to present the current rate, a bar chart of rates, and the next six rates in a user-friendly format.
- Connects to Wi-Fi to fetch electricity rates.
- Displays the current rate on an LCD screen.
- Shows a bar chart representing the unit rates for the current day.
- Lists the next 12 rates with their valid time ranges.
- After 16:00 it will fetch toorrows rates and display barchart for them
- Microcontroller: ESP32 (or compatible)
- LCD Display: WROVER_KIT_LCD
- Wi-Fi Module: Integrated in ESP32
- Power Supply: USB or battery
- Arduino IDE
- Libraries:
WiFi.hHTTPClient.htime.hWROVER_KIT_LCD(from CoalUnicorn/WROVER_KIT_LCD)ArduinoJson.h
- Go to the WROVER_KIT_LCD GitHub repository.
- Click on the green "Code" button and select "Download ZIP".
- Unzip the downloaded folder and rename it to
WROVER_KIT_LCD. - Place the
WROVER_KIT_LCDfolder in your Arduino libraries folder (usually located at~/Arduino/libraries/). - Restart the Arduino IDE to recognize the new library.
- Clone the repository or download the source code.
- Open the project in the Arduino IDE.
- Install the required libraries via the Library Manager.
- Update the Wi-Fi credentials and Octopus Energy API key in the
arduino_secrets.h. - Upload the code to your ESP32 microcontroller.
Create arduino_secrets.h
#define SECRET_SSID "SSID";
#define SECRET_PASS "PASSWORD";
// Octopus Energy API configuration
#define API_KEY "sk_live_"; // Replace the placeholder with your actual Octopus Energy API key.
#define ACCOUNT_NUMBER ""; // Enter your Octopus Energy account number.
#define MPAN ""; // Your Meter Point Administration Number.
#define METER_SERIAL ""; // Your meter's serial number.- Ensure that the ESP32 is connected to a stable Wi-Fi network.
- Check the API key and account details for correctness.
- Monitor the Serial output for any error messages during execution.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Thanks to the Octopus Energy API for providing the data. Use this link to sign up to Octopus and save on your energy bill.
- Special thanks to the Arduino community for their support and resources.

