Python information display framework aimed at e-ink devices

Related tags

Hardware infodisplay
Overview

My display, using a Raspberry Pi Zero W and Waveshare 6" e-paper hat

infodisplay

Modular information display framework aimed at e-ink devices.

Built using Python 3.7 and pillow. Works out of the box with IT8951-powered e-paper displays.

Setting up

  • When using an e-paper display with IT8951 controller, install GregDMeyer's IT8951 library following the instructions there.
  • Clone this repository and cd to its folder
  • Install the basic required packages using pip:
pip3 install -r requirements.txt
  • (If you plan to use the google calendar integration) install the optional packages:
pip3 install -r optional-requirements.txt
  • Copy the example config file:
cp config.ini.example config.ini
  • Make your changes to config.ini using your favourite editor.

You should now be able to run the info display using something like python3 run.py.

FontAwesome icons

The class in fontawesome.py lets you use FontAwesome icons. These are used in the Calendar widget by default.

To see the icons, download a set of FontAwesome svg's (e.g. from here) and unzip the regular, solid, and brands folders into the fa/ folder:

wget https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-desktop.zip
unzip fontawesome-free-5.15.4-desktop.zip
mv fontawesome-free-5.15.4-desktop/svgs/* fa/

Running as a service

A sample systemd unit file is provided in infodisplay.service. This is set up so the service only starts after an NTP time sync is established. Raspberry Pi's don't have a hardware RTC, so system time can be wildly inaccurate until they get the network time.

  • Edit infodisplay.service to reflect where you cloned the repository to, and what user it should run as. (default: /home/pi/infodisplay and pi)
  • Enable the systemd time-sync.target:
sudo systemctl enable systemd-time-wait-sync
  • Copy your unit file:
sudo cp infodisplay.service /etc/systemd/system/
  • Reload systemd:
sudo systemctl daemon-reload
  • Enable autostart of the service:
sudo systemctl enable infodisplay.service
  • Finally, start the service:
sudo systemctl start infodisplay.service

Google Calendar integration

To get events from your Google Calendar you need a Google Cloud Platform project, OAuth credentials and finally a token. Follow the 'Prerequisites' section of this tutorial and you should have a credentials.json file at the end.

The following needs to be done on your desktop computer, as a dialog will pop up for authorization:

  • Clone this repo.
  • Install the optional requirements using pip3 install -r optional-requirements.txt.
  • Copy your credentials.json to the util folder.
  • cd to the util folder.
  • Run python3 get-google-calendars.py.

This script should give you the ID's of the calendars synced to your account. Pick the ones you want and add them to the config.ini. There should now also be a token.json file in the directory, copy this to your main infodisplay folder.

Structure

Have a look through the example config file. This has one main section with global configuration parameters, all other sections are specific to widgets.

The display is divided into a grid, where each widget is given a canvas spanning one or more grid cells. The scheduler calls each widget to update their canvas, pastes updated widgets onto the global canvas, and triggers a display update at the right time.

The most basic example of a widget is given in Dummy.py. Widgets are automatically loaded if their name exists as a section in your config.ini. These sections should have names matching files in the widgets/ folder with corresponding widget classes that go by the same name (e.g. there is a 'Dummy' section in config.ini and widgets/Dummy.py has a class named Dummy).

Looking to add support for your own type of (e-ink) display? You should only have to modify display.py. Keep in mind that the default canvas is of image mode L, or 8-bit greyscale. You will have to modify this to suit your display.

Notes

In due time this information should be moved to the wiki section and expanded.

You might also like...
Pylorawan is a Micropython wrapper for lorawan devices from RAK Wireless.
Pylorawan is a Micropython wrapper for lorawan devices from RAK Wireless.

pylorawan Pylorawan is a Micropython wrapper for lorawan devices from RAK Wireless. Tested on a Raspberry PI Pico with a RAK4200(H) Evaluation Board (

DNP3 Stalker is a project to analyze and interact with DNP3 devices

DNP3 Stalker Purpose DNP3 Stalker is a project to analyze and interact with DNP3

Create a low powered, renewable generation forecast  display with a Raspberry Pi Zero & Inky wHAT.
Create a low powered, renewable generation forecast display with a Raspberry Pi Zero & Inky wHAT.

GB Renewable Forecast Display This Raspberry Pi powered eInk display aims to give you a quick way to time your home energy usage to help balance the g

DIY split-flap display
DIY split-flap display

The goal is to make a low-cost display that's easy to fabricate at home in small/single quantities (e.g. custom materials can be ordered from Ponoko or similar, and other hardware is generally available).

♟️ QR Code display for P4wnP1 (SSH, VNC, any text / URL)
♟️ QR Code display for P4wnP1 (SSH, VNC, any text / URL)

♟️ Display QR Codes on P4wnP1 (p4wnsolo-qr) 🟢 QR Code display for P4wnP1 w/OLED (SSH, VNC, P4wnP1 WebGUI, any text / URL / exfiltrated data) Note: Th

Pi-hole with Inky pHAT ePaper display
Pi-hole with Inky pHAT ePaper display

Pi-hole with Inky pHAT ePaper display This is my Pi-hole with an ePaper display.

Create (templateable) cameras that display qr codes in homeassistant
Create (templateable) cameras that display qr codes in homeassistant

QRCam This custom component creates cameras displaying qrcodes. The QRCodes can be static or generated from templates. If you use a template as conten

Robot Framework keyword library wrapper for atlassian-python-api

Robot Framework keyword library wrapper for atlassian-python-api

FERM: A Framework for Efficient Robotic Manipulation

Framework for Efficient Robotic Manipulation FERM is a framework that enables robots to learn tasks within an hour of real time training.

Comments
  • khal support

    khal support

    hi, do you know khal? I hope you're interested in providing a gui for it to be prettier on e-paper.

    It's also written in python3. I found the section icalendar-peculiarities interesting.

    opened by sharethewisdom 1
Owner
Niek Blankers
Niek Blankers
Pihole-eink-display - A simple Python script to display PiHole statistics on an eInk Display

Pihole-eink-display - A simple Python script to display PiHole statistics on an eInk Display

Mark McIntyre 64 Oct 11, 2022
E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

null 2.8k Dec 30, 2022
An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and display it on a FeatherS2 in an OLED display.

CircuitPython IoT Trivia ESP32-S2 OLED Version An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and

Kevin Thomas 1 Nov 27, 2021
A dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc. written in Python

Weather Clock for Raspberry PI This project is a dashboard for Raspberry Pi to display environmental weather data, rain radar, weather forecast, etc.

Markus Geiger 1 May 1, 2022
A ch341dll Wrap is for using in Python 32bits windows to access I2C SPI and MDIO (by GPIO), and Demo with display PC sreen on OLED by i2c or SPI .

ch341dll_wrap_typcal_app A ch341dll Wrap is for using in Python 32bits windows to access I2C SPI and MDIO (by GPIO). In addition, I provided 3 Demo. I

null 13 Jan 2, 2023
Python application, displaying currently played track from Spotify on OLED display connected via I2C

RaspberryPi Spotify OLED Display This application will display currently played track on SSD1306 OLED display connected to RaspberryPi. Displayed stuf

Wojciech Olech 2 Dec 30, 2021
Better support for Nuki devices to the Home Assistant

Another attempt to add a better support for Nuki devices to the Home Assistant Features: Lock interface implementation Uses local webhook from bridge

Konstantin 105 Jan 7, 2023
Testing additional addon devices, and their working scripts

ESP32-addon-devices-potpurri Testing additional addon devices, and their micropython working scripts ?? List of device addons tested so far Ethernet P

f-caro 0 Nov 26, 2022
MPY tool - manage files on devices running MicroPython

mpytool MPY tool - manage files on devices running MicroPython It is an alternative to ampy Target of this project is to make more clean code, faster,

Pavel Revak 5 Aug 17, 2022
Smart Tech Automation Remote via Kinematics Gesture control for IoT devices

STARK Smart Tech Automation Remote via Kinematics Gesture control for IoT devices View Demo · Report Bug · Request Feature Table of Contents About The

Juseong (Joe) Kim 1 Jan 29, 2022