Skip to content

Using Github Actions to build an Image for my Pimoroni Inky wHAT Display.

License

Notifications You must be signed in to change notification settings

stephenyu/eink-dashboard

Repository files navigation

E-ink Dashboard Build Display

React-based framework to create an eink dashboard for my Pimoroni Inky wHAT.

Demos

Image Artifact Generated

Build Display

Actual EInk Dashboard

Actual Eink Dashboard

How does it work?

Design and implement the HTML version of your dashboard using React, Typescript and StyledComponents.

Uses ReactDOMServer.renderToString to statically generate the HTML which is then passed into Puppeteer so it can take a screenshot of the HTML at the same width and height as the Pimoroni Inky wHAT.

Set up Github Action to run hourly, about 20 mins to the hour i.e. 1340, 1440, 1540. This action will generate the image from the previous set and commits it into the repository.

Set up the Raspberry Pi to run on the hour to:

  1. git pull the checked-out repository (thus download the image artifact from the Github Action Commit).
  2. Load the image on the display using the python script /pi/display_image.py.

Usage

yarn dev

To run the create-image process using the Puppeteer's Chrome.

yarn dev-web

To run the React SSR process within a web-server. Useful when developing the React Interface and CSS Debugging.

yarn start

To run the production create-image process. This won't work locally unless you are running the same Docker Image as the Github Action.

About

Using Github Actions to build an Image for my Pimoroni Inky wHAT Display.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published