Skip to content

Display energy reading from Shelly EM on the Waveshare eInk display

Notifications You must be signed in to change notification settings

adrianh-za/py-shellyem-epd2in13-rpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Py-ShellyEM-EPD2in13-RPi

Display energy readings from Shelly EM on the Waveshare 2.13" Touch eInk display

eInk Display from Waveshare

2.13inch Touch e-Paper HAT for Raspberry Pi, 250×122, Black / White, SPI

  • 2.13" capacitive touch e-Paper display, 5-point touch, 250×122 pixels
  • Supports waken up by user-defined gesture
  • No backlight, keeps displaying last content for a long time even when power down
  • Ultra low power consumption, basically power is only required for refreshing
  • Standard Raspberry Pi 40PIN GPIO extension header, supports Raspberry Pi series boards
  • SPI interface, for connecting with controller boards like Arduino/STM32, etc.

eInk Display with case for Raspberry Pi Zero from Waveshare

  • Same display as above but with matching case for Raspberry Pi Zero / Zero W / Zero 2

2.13inch Touch e-Paper HAT for Raspberry Pi, 250×122, Black / White, SPI with case

Usage

Get the Pi ready

  1. sudo raspi-config (Enable I2C and SPI)
  2. sudo apt update (Update the OS)
  3. sudo apt install git (Install GIT to clone from github.com)
  4. sudo reboot -f (Reboot the RPi)

Once rebooted

  1. sudo apt install python3 python3-pip python3-smbus libopenjp2-tools (Install Python and support libraries)
  2. sudo pip3 install Pillow requests spidev (Install required imports of app)
  3. git clone https://github.com/adrianh-za/py-shellyem-epd2in13-rpi (Download this module)
  4. cd py-shellyem-epd2in13-rpi (Browse to this module's location. Could be located elsewhere)
  5. run main.py and main-touch.py
  6. ctrl-c to quit

To run the script upon reboot

  1. sudo cronjob -e
  2. Add the following line at the bottom of the file. Note the location could be different on your RPi. Also note the & at the end which tells the RPi to run the script in the background. @reboot sleep 20; sudo python3 /home/pi/github.com/adrianh-za/py-shellyem-epd2in13-rpi/main.py &

Notes

  • The readings are refreshed every 10 seconds. This can be changed in config.py.

  • The Url/IP for your Shelly EM can be set in config.py.

  • The module does a full display refresh after every 100 partial refresh. Due to using partial refreshes, there are when some of the numbers are a little garbled. This is expected and will clear up after a few refreshes.

  • Both I2C and SPI need to be enabled on the RPi. Run sudo raspi-config and navgiate to Interface Options and enable both I2C and SPI.

  • You may need to change the I2C address in the module when running main-touch.py. To check which I2C address the eInk display is using on your RPi, install sudo apt install i2c-tools and then run i2cdetect -y 1 to check what address is being used. Then check the main-touch.py file and look for gt = gt1151.GT1151(0x14) and replace in input argument with your address.

Various Resources and Info

Waveshare 2.13inch Touch e-Paper HAT Manual

Waveshare e-Paper (Python code)

Touch_e-Paper_HAT (C and Python code)

ePaper-Spotify-Clock (Written in Python)

Raspberry-Pi-E-Ink-Dashboard (Written in Python)

About

Display energy reading from Shelly EM on the Waveshare eInk display

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages