This Raspberry Pi powered eInk display aims to give you a quick way to time your home energy usage to help balance the grid, reduce carbon emissions, and if you're an agile tariff user, save money.
The project takes the same approach as shouldibake.com and the Baking Forecast GB to give you quick visual aid when making that decision, showing you when renewable generation is above or below 33%.
Data is provided by the National Grid's carbon intensity api and Octopus Energy's Agile tariff pricing API.
Following the steps in this repository requires minimal input - all the required Inky libraries & code to display the screens is downloaded and setup on your pi when you run the install commands. You will need an SSH client in order to connect to the pi, but all of the SSH commands you need are listed on this page.
- time required: ~30mins
- cost of the components: ~£70
- Raspberry Pi Zero soldered (~£14) (piehut | pimoroni)
- Micro SD card (~£7) (piehut | pimoroni)
- Inky wHAT (ePaper/eInk/EPD) - Black/White (£45) (piehut | pimoroni)
- Power supply - micro USB connection (piehut | pimoroni - or use an existing cable)
- Case (see notes below)
I use a "headless" Raspberry Pi setup to install all the dependencies; we configure the wifi settings prior to powering on the Pi & enable SSH by default, this mean we avoid having to connect a display or a keyboard.
- Use Raspberry Pi Imager
- Select SD card
- Choose "Raspberry Pi OS (other)" > "Raspberry Pi OS Lite (32-bit)" (we dont require a GUI desktop)
- Select write & wait for the OS to be written to the SD card.
- Once the Rapsberry Pi OS image has been saved to the SD card, open a file window so that you can view the contents of the SD card's 'boot' folder
- Create a new file
wpa_supplicant.conf
in the root of the boot folder & add the following, replacing the relevant sections with the SSID and password of your wifi network
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="YOUR_SSID"
psk="YOUR_WIFI_PASSWORD"
key_mgmt=WPA-PSK
}
Example file: conf/wpa_supplicant.conf
- Finally create an empty file called 'ssh' (without a file extension) in the boot directory, this will enable SSH by default when you first power on the pi
- Insert the SD card into the Raspberry Pi
- Install the Raspberry Pi into the back of the Inky display - align the Pi, with the 40 GPIO pins pointing down, to the top right hand corner of the back of the Inky display and gently push the the GPIO pins into the black connector. See an image of the reverse of display.
- Power on the Pi & wait for ~2 minutes whilst the operating system boots up.
- At this point you'll need to create an SSH connection to the Pi from your laptop/desktop. You can read more about SSH (Secure Shell) & find a client for your machine here
- If this is the only Raspberry Pi on your network you'll be able to access the Pi using the device's hostname with following SSH command
ssh pi@raspberrypi.local
# password is 'raspberry'
otherwise, you will need to find the IP of your Pi via your local network router then start a SSH session using
ssh pi@[IP ADDRESS]
# password is 'raspberry'
- Once your ssh connetion has been established the first thing you should do is update the password - the Pi OS ships with a default password, and it's always best to change this before going any further. To change your password run:
passwd
Then enter and confirm your new password
- In your SSH terminal, ensure you're first in the pi user's home directory by running
cd ~/
- Install the dependencies for both the Inky display & the api/drawing libraries by running the following command
curl https://raw.githubusercontent.com/openbook/shouldi-eink-display/main/setup/install.sh | bash
Note this command runs the install file found within this repository, so you can check exactly what's being installed if you need to.
- When prompted enter Y to install the required inky libraries
- When prompted 'Do you wish to perform a full install?' enter N
- Once the install script has finished, the Pi will be rebooted to ensure all the libraries are correctly loaded now that the inky display is connected.
- Once the pi has rebooted, if everything has been installed correctly, the Inky screen should update to display the default 'combined' screen.
- First SSH back into the pi
- By default the 'combined' forecast and current generation mix is displayed. Full info on each of the screens is available here. You can update the display by changing the values found within the 'config.ini' that was downloaded as part of the setup:
- Using a text editor update the contents of the file found at
/home/pi/shouldi-eink-display/config.ini
- Update the
display = combined
line choosing one of the following options:- combined - renewable forecast plus current generation mix
- forecast - the full "should i bake" forecast
- agile - agile tariff hourly prices for the current day
- generation - current renable generation mix for a local area
- If selecting "agile" then the postcode and placename should be changed from the current values in the same file. Note postcodes should be added using the first half only (e.g. for SW1A 0AA use SW1A)
- see '#displays' for notes on each display screen
You can also setup and run a simple web form which will allow you to switch the current screen display using a browser.
- still using the SSH session, make sure you are in the project root folder
cd ~/shouldi-eink-display
- run
./setup/install-web.sh
this will setup an nginx webserver and serve a simple flask based webapp that will allow you to update the config.ini file. - Once the install script has finished, it should confirm the IP address of your Pi - you can then open that IP address in a browser to access the web interface shown above
Hopefully everything should be setup and working ok.
Your display is set to update automatically at 5 & 35 minutes past each hour.
Screen | Config.ini name | Description |
---|---|---|
combined | Combined current generation mix + renewable forecast Now how much of the current electricity supply, coming from the National Grid, is being generated from renewable sources (wind, hydro & solar) Forecast for the next (up to) 4 days, which slots (morning, afternoon, evening or night) are forecasted to have renewable generation higher than 33% - where there's a tick, generation is forecasted to be greater than 33% - where there's a cross, generation is forecasted to be lower than 33%, avoid doing any activities at home which consume a lot of electricity during these times if you can - where the tick or cross is underlined - this shows the period during the day which is forecasted to have the highest renewable generation. Try to plan your high demand activities for these time. |
|
agile | (Octopus) Agile Tariff pricing Displays the cost p/kWh (pence per kilowatt hour) for each hour over the current day. See the full documentation here for more information Note: the data retrieved from the Octopus API is for the London 'C' region by default. To change region, first find the alphabetical region (GSP Group) Id then update the region value in the config.ini file (excluding any underscores) |
|
forecast | Baking forecast shouldibake.com @baking4cast Right now, Bake!/Can baking wait? tells you whether the current renewable generation level is higher than 33% Forecast for the next (up to) 4 days, which slots (morning, afternoon, evening or night) are forecasted to have renewable generation higher than 33% - where there's a tick, generation is forecasted to be greater than 33% - where there's a cross, generation is forecasted to be lower than 33%, avoid doing any activities at home which consume a lot of electricity during these times if you can - where the tick or cross is underlined - this shows the period during the day which is forecasted to have the highest renewable generation. Try to plan your high demand activities for these time. |
|
generation | Local generation for your region Using a postcode supplied in the config.ini file, this display shows the current generation mix specific to your region. |
I created a simple frame using some pine stripwood (6x25mm), which was then treated with danish oil. This works well and with a small cut out for the USB power cable sits flush against a wall when fixed with a nail.
Modeled and 3d printed LargeCover enclosure by Printminion
This is a great professional looking case that's ready to buy and simple to install.
Note, unless you are going to solder the pi to the inky manually then you'll need the 'enclosure' + 'large cover'.
- Add a physical button to switch between displays
- Add error handling for all outgoing requests
- Image uploader for custom screen of when generation is high and low
- Move carbonintensitylib to pandas for consistency and to improve code qualityŒ
- Add more in depth view for agile pricing - show current, min and max prices
- Add a battery pack & power management