Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Dioscorides committed Oct 8, 2023
1 parent 4eb49b3 commit 602d5ae
Show file tree
Hide file tree
Showing 20 changed files with 2,077 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
URL=http://192.168.1.65:7799/
FILENAME=image.png
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
URL=http://192.168.1.69:3000
FILENAME=image.png
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug] "
labels: bug, enhancement
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information if applicable):**

- OS: [e.g. iOS]
- Browser [e.g. Chrome, Safari]
- Version [e.g. 22]

**Smartphone (please complete the following information if applicable):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature request] "
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

Ex. I'm always frustrated when [...]; it would be great if [...]

**Describe the solution you'd like**
A clear and concise description of what you would like to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Todo
about: Describe a task that should be completed, but is neither a bug nor a feature
request
title: "[TODO] "
labels: Todo - High priority, Todo - Low priority, Todo - Normal priority, Todo -
Urgent priority
assignees: ''

---

## Description

A clear and concise description of what the task is.

## Technical details

Any technical information (files to be edited, specific documentation pages to be updated, etc.) that might aid in completing this task.

### Sub-tasks

Describe any necessary sub-tasks required to complete this todo item:

- [ ] Sub-task 1
- [ ] Sub-task 2
- [ ] Sub-task 3
- [ ] ...

## Screenshots

Any screenshot useful to describe or complete the task.
44 changes: 44 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Pull request description

Please include relevant motivation and context for this pull request.
Include a summary of the change and which issue is fixed.
List any dependencies that are required for this change.

Fixes #(number) - Link the issue that this pull request should fix, if applicable.

## Type of change

Please delete options that are not relevant.

- [] Bug fix (non-breaking change which fixes an issue)
- [] New feature (non-breaking change which adds functionality)
- [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [] This change requires a documentation update

## How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [] Test A
- [] Test B

**Test configuration**:

Provide an overview of the environment in which you tested your own code

- Browser:
- OS:
- Network:
- PHP version:
- etc.

## Checklist

- [] My code follows the style guidelines of this project
- [] I have performed a self-review of my own code
- [] I have commented my code, particularly in hard-to-understand areas
- [] I have made corresponding changes to the documentation
- [] My changes generate no new warnings
- [] I have added tests that prove my fix is effective or that my feature works
- [] New and existing unit tests pass locally with my changes
- [] Any dependent changes have been merged and published in downstream modules
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
# e-inkunabula
# e-Inkunabula

<p align="center">
<a href="https://github.com/Dioscorides/e-inkunabula" target="_blank">
<img width="70%" src="img/../docs/img/e-inkunabula-logo.svg" alt="e-Inkunabula logo">
</a>
</p>

<br/>
<p align="center">
<a href="LICENSE" target="_blank">
<img src="https://img.shields.io/github/license/Dioscorides/e-Inkunabula.svg" alt="GitHub license">
</a>
<a href="https://github.com/Dioscorides/e-Inkunabula/releases" target="_blank">
<img src="https://img.shields.io/github/tag/Dioscorides/e-Inkunabula.svg" alt="GitHub tag (latest SemVer)">
</a>
</a>
<a href="https://github.com/Dioscorides/e-Inkunabula/commits" target="_blank">
<img src="https://img.shields.io/github/commit-activity/y/Dioscorides/e-Inkunabula.svg" alt="GitHub commit activity">
</a>
<a href="https://github.com/Dioscorides/e-Inkunabula/graphs/contributors" target="_blank">
<img src="https://img.shields.io/github/contributors-anon/Dioscorides/e-Inkunabula.svg" alt="GitHub contributors">
</a>
</p>

[e-Inkunabula](https://github.com/Dioscorides/e-inkunabula) is a project that aims to help you display information coming from [Home Assistant](https://www.home-assistant.io/) on an e-ink display using a Raspberry Pi.

**This repository contains a step-by-step guide on how to setup your Raspberry Pi, modified files from [Inkycal v.2.0.2](https://github.com/aceinnolab/Inkycal/releases/tag/v2.0.2), and WaveShare 9.7" e-ink display.**

## 🚀&nbsp; Installation and Documentation

Ready? Check the **[e-Inkunabula documentation](<https://dioscorides.github.io/e-inkunabula>)** to get started!

---

## 🤝&nbsp; Found a bug? Missing a specific feature?

e-Inkunabula is not perfect! We welcome your contributions to make it better. If you find an issue, please file it in [our GitHub issue tracker](https://github.com/Dioscorides/e-Inkunabula/issues). Make sure to include as much information as you can in your bug report by following the [bug report template](https://github.com/Dioscorides/e-inkunabula/issues/new/choose). If you already found a solution to your problem, **we would love to review your [pull request](https://github.com/Dioscorides/e-inkunabula/pulls)!**

## &nbsp; Requirements

You may use any Raspberry Pi or WaveShare e-ink display and apply the logic described in our documentation, but to follow this guide exactly you will need the following:

### 🖥️&nbsp; Hardware

* Raspberry Pi 3 v1.2
* 16GB microSD card
* WaveShare 9.7" e-ink display
* WaveShare e-ink display driver board (IT8951)
* 5V 2A power supply
* Synology DS218+ NAS (or any Synology NAS that supports Docker)

### 📝&nbsp; Software

* Python 3.7
* BCM2835 library
* WaveShare IT8951 library
* Docker (running on Synology DS218+)
* [Home Assistant](https://www.home-assistant.io/) (via Docker, running on Synology DS218+)
* [Home Assistant Lovelace Kindle Screensaver](https://github.com/sibbl/hass-lovelace-kindle-screensaver) (via Docker, running on Synology DS218+)
* [Inkycal v.2.0.2](https://github.com/aceinnolab/Inkycal/releases/tag/v2.0.2)
* [Portainer](https://www.portainer.io/) (Optional - via Docker, running on Synology DS218+. You can create a stack using the Synology interface directly.)

## 📘&nbsp; License

The e-Inkunabula is released under the under terms of the [GNU GENERAL PUBLIC LICENSE](LICENSE).
29 changes: 29 additions & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: "3.8"

services:
app:
image: sibbl/hass-lovelace-kindle-screensaver:latest
environment:
- HA_BASE_URL=http://192.168.1.65:8123
- HA_SCREENSHOT_URL=/dashboard-kiosk/default_view?kiosk
- HA_ACCESS_TOKEN=
- CRON_JOB=*/1 * * * *
- RENDERING_TIMEOUT=30000
- RENDERING_DELAY=0
- RENDERING_SCREEN_HEIGHT=805
- RENDERING_SCREEN_WIDTH=1150
- COLOR_MODE=TrueColor
- GRAYSCALE_DEPTH=16
- OUTPUT_PATH=/output/image.png
- LANGUAGE=en
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 5
window: 120s

ports:
- 7799:5000
volumes:
- /volume1/docker/screenshotter/output:/output:rw
1 change: 1 addition & 0 deletions docs/img/e-inkunabula-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Welcome to e-Inkunabula

!!! INFO
**This project's aim is to create a guide that will help you through the process of setting up your own e-ink display using a Raspberry Pi, a WaveShare 9.7" e-ink display, and Home Assistant.**

``` mermaid
sequenceDiagram
NAS->>NAS: Generates a screenshot<br/>of the Home Assistant view
Raspberry Pi-->>NAS: Screenshot requested<br/>by the Raspberry Pi
NAS->>Raspberry Pi: Screenshot imported<br/> by the Raspberry Pi
InkyCal-->>Raspberry Pi: Image requested<br/>by InkyCal
Raspberry Pi->>InkyCal: Screenshot imported<br/> to InkyCal
InkyCal->>InkyCal: Screenshot converted<br/>to a displayable image by InkyCal
InkyCal-)WaveShare 9.7" E-Ink Display: Image sent<br/>to the e-ink display
```

Want to skip the preamble?
[Let's get started with the installation! :rocket:](installation.md){ .md-button .md-button--primary}
---

---

## Concept

E-ink displays are a great way to display information: they are easy on the eyes, and they only use power when the display is updated. This makes them perfect for displaying information that does not change often, such as the weather forecast, the current time, or the current date, or any other information that you would like to display coming from Home Assistant.

Yet, buying an e-ink screen, connecting it to a Raspberry Pi, and displaying information from Home Assistant on it is not as easy as it sounds: There are many different e-ink screens available, and they all have their own quirks. Some e-ink displays are touchscreens, some are not; some e-ink displays are connected to the Raspberry Pi using the 40-pin GPIO header, some are connected using the SPI interface; some e-ink displays are compatible with the WaveShare ESP32 driver board, some are not, and the list goes on.

**This projects aims to help you through the process of setting up your own e-ink display using a Raspberry Pi, a WaveShare 9.7" e-ink display, and Home Assistant in the simplest way we could find.**

!!! Warning
**This project is meant for e-ink displays that can display HD images at 16bit Grayscale**, such as the WaveShare 9.7" e-ink display. If you are using a e-ink display that can only display images at 8bit grayscale or less, such as the WaveShare 7.5" e-ink display, you should follow the guide offered by [InkyCal](https://github.com/aceinnolab/Inkycal) instead.

## Logic

e-Inkunabula's logic is the following:

1. [Home Assistant Lovelace Kindle Screensaver](https://github.com/sibbl/hass-lovelace-kindle-screensaver) will take a screenshot of "kiosked" Home Assistant view.
2. A python script on the Raspberry Pi will fetch the latest screenshot from the Synology NAS.
3. [InkyCal](https://github.com/aceinnolab/Inkycal) will process and send the image to the e-ink display.

This documentation will help you through the process in detail and guide you through the process of setting up your own e-ink display!

## Project's name

This project's name - *e-Inkunabula* - is a play on the words "e-ink" and "incunabula": *Incunabula* are books printed using metal type from before 1501, and *e-ink* is the technology used for the display used in this project.
Loading

0 comments on commit 602d5ae

Please sign in to comment.