E-Paper-Calendar/README.md

105 lines
8.8 KiB
Markdown
Raw Permalink Normal View History

2019-03-17 11:02:44 +01:00
# E-Paper Calendar
2018-10-16 19:22:34 +02:00
2019-03-17 11:02:44 +01:00
This is a software written in python3 that allows you to transform an E-Paper display (like the kindle) into an information display. It fetches live data from Openweathermap (a weather info provider), rss-feeds and your Online Calendar (Google/Yahoo Calendar/...) and displays them on a large, beautiful and ultra-low power E-Paper display. It's ideal for staying organised and keeping track of important details without having to check them up online.
2018-10-02 17:58:17 +02:00
This software fully supports the 3-Colour **and** 2-Colour version of the 7.5" E-Paper display from waveshare/gooddisplay and works with Raspberry Pi 2, 3 and 0 (Zero, Zero W, Zero WH).
**To get started, follow the instructions below.**
2018-08-27 00:15:18 +02:00
## News:
2019-03-17 11:07:10 +01:00
* **Specified README for this fork, added new design and many options** (Mid March 2019)
* **Version 1.5 released with a new layout, displayed events and many back-end improvements** (Early February 2019)
2019-02-07 09:22:29 +01:00
* **Added Support for the 2-Colour E-Paper Display as well!** (Late September 2018)
* **Added Support for Raspbian Stretch lite.** (Late September 2018)
2018-10-14 22:00:24 +02:00
2019-04-09 12:53:55 +02:00
<img src="https://github.com/mgfcf/E-Paper-Calendar/blob/master/Gallery/day-list_example.png" width="270"><img src="https://github.com/mgfcf/E-Paper-Calendar/blob/master/Gallery/month-overview_example.png" width="270"><img src="https://github.com/mgfcf/E-Paper-Calendar/blob/master/Gallery/agenda-list_example.png" width="270"><img src="https://github.com/mgfcf/E-Paper-Calendar/blob/master/Gallery/day-view_example.png" width="270">
2019-02-07 09:22:29 +01:00
2019-04-07 12:47:01 +02:00
1.: Day-List Panel
2.: Month-Overview Panel
2019-04-09 12:53:55 +02:00
3.: Agenda-List Panel
4.: Day-View Panel
2018-08-27 00:15:18 +02:00
## Main features
2019-04-09 10:16:46 +02:00
* Display a calendar with one of multiple designes
2019-03-17 11:02:44 +01:00
* Optionally get RSS-Feed fetched and shown
2019-04-09 10:16:46 +02:00
* Syncronise events from any online calendar (like google, yahoo, etc.)
2018-08-27 00:43:22 +02:00
* Get live weather data (including temperature, humidity, etc.) using openweathermap api
2018-08-27 00:15:18 +02:00
## Hardware required
* 7.5" 3-Colour E-Paper Display (Black, White, Red/Yellow) with driver hat from [waveshare](https://www.waveshare.com/product/7.5inch-e-paper-hat-b.htm)
**or**
* 7.5" 2-Colour E-Paper Display (Black, White) with driver hat from [waveshare](https://www.waveshare.com/product/7.5inch-e-paper-hat.htm)
* Raspberry Pi Zero WH (with headers) (no soldering iron required)
* Or: Raspberry Pi Zero W. In this case, you'll need to solder 2x20 pin GPIO headers yourself
2018-08-27 00:41:35 +02:00
* MicroSD card (min. 4GB)
* MicroUSB cable (for power)
* Something to be used as a case (e.g. a (RIBBA) picture frame or a 3D-printed case)
2018-08-27 00:15:18 +02:00
2018-08-29 00:28:25 +02:00
# Setup
2018-08-27 00:36:07 +02:00
2018-08-29 00:22:30 +02:00
## Getting the Raspberry Pi Zero W ready
2018-09-08 23:39:32 +02:00
1. After [flashing Raspbian Stretch (Lite or Desktop)](https://www.raspberrypi.org/downloads/raspbian/), set up Wifi on the Raspberry Pi Zero W by copying the file **wpa_supplicant.conf** (from above) to the /boot directory and adding your Wifi details in that file.
2018-08-27 16:47:33 +02:00
2. Create a simple text document named **ssh** in the boot directory to enable ssh.
3. Expand the filesystem in the Terminal with **`sudo raspi-config --expand-rootfs`**
4. Enable SPI by entering **`sudo sed -i s/#dtparam=spi=on/dtparam=spi=on/ /boot/config.txt`** in the Terminal
5. Set the correct timezone with **`sudo dpkg-reconfigure tzdata`**, selecting the correct continent and then the capital of your country.
6. Reboot to apply changes
2018-10-02 21:42:12 +02:00
7. Optional: If you want to disable the on-board leds of the Raspberry, follow these instructions:
**[Disable on-board-led](https://www.jeffgeerling.com/blogs/jeff-geerling/controlling-pwr-act-leds-raspberry-pi)**
2018-08-27 16:03:47 +02:00
2018-08-29 00:22:30 +02:00
## Installing required packages for python 3.5
2018-08-28 12:52:05 +02:00
Execute the following command in the Terminal to install all required packages. This will work on both, Raspbian Stretch with Desktop and Raspbian Stretch lite.
2018-09-09 19:57:13 +02:00
2019-03-17 11:13:14 +01:00
**`bash -c "$(curl -sL https://raw.githubusercontent.com/mgfcf/E-Paper-Calendar/master/Installer-with-debug.sh)"`**
If the Installer should fail for any reason, kindly open an issue and paste the error. Thanks.
2018-09-23 23:26:55 +02:00
This is how the installer will run:
2019-03-17 11:13:14 +01:00
<img src="https://github.com/mgfcf/E-Paper-Calendar/blob/master/Gallery/Installer-v1.2-screenshot.png" width="700">
2018-09-23 23:26:55 +02:00
## Adding details to the programm
Once the packages are installed, navigate to the home directory, open 'E-Paper-Master' and open the file 'settings.py' inside the Calendar folder. Adjust the values as needed. You can use the table below as a reference.
2019-03-17 12:38:34 +01:00
### General
| Parameter | Description |
| --- | --- |
2019-03-17 11:02:44 +01:00
| ical_urls | Your iCalendar URL/s. To add more than one URL, seperate each with a comma. |
| highlighted_ical_urls | Your iCalendar URL/s that should be higlighted in comparison the ical_urls. To add more than one URL, seperate each with a comma. |
| rss_feeds | All the sources for your rss-feed. To add more than one URL, seperate each with a comma. |
| api_key | Your __personal__ openweathermap API-key which you can generate and find in your Account info. |
2019-04-08 15:54:06 +02:00
| owm_paid_subscription | If you have a paid owm subscription you can set it to `True` and in some panels receive forecast information. |
2019-03-17 11:02:44 +01:00
| location | Location refers to the closest weather station from your place. It isn't necessarily the place you live in. To find this location, type your city name in the search box on [openweathermap](https://openweathermap.org/). The output should be in the following format: City Name, Country ISO-Code. Not sure what your ISO code is? Check here: [(find iso-code)](https://countrycode.org/). |
| week_starts_on | When does the work start on your Region? Possible options are `"Monday"` or `"Sunday"`. |
| display_colours | This should normally be set by the installer when you choose the type of your display. Options include `"bw"` if you're using the black and white E-Paper or `"bwr"` when you're using the black-white-red or black-white-yellow E-Paper.|
| language | Choosing the language allows changing the language of the month and week-icons. Possible options are `"en"` for english and `"de"` for german.|
|units| Selecting units allows switching units from km/h (kilometer per hour) and °C (degree Celcius) to mph (miles per hour) and °F (degree Fahrenheit). Possible options are `"metric"` or `"imperial"`. |
|hours | Which time format do you prefer? This will change the sunrise and sunset times from 24-hours format to 12-hours format. Possible options are `"24"` for 24-hours and `"12"` for 12-hours.|
2019-03-17 11:02:44 +01:00
|update_interval | The update delay between two updates in minutes. By default there is always an update on a full hour.|
2019-03-17 12:38:34 +01:00
### Design
| Parameter | Description |
| --- | --- |
2019-04-17 17:35:24 +02:00
| font_size | Varies the size of the font. Can be any number >0. In some cases the size of the font is fixed by the design. Default value is `14`. |
| font_boldness | Varies the boldness of the font. Can be one of `extralight`, `light`, `regular`, `semibold`, `bold` or `extrabold`. In some cases the boldness of the font is fixed by the design. Default value is `regular`. |
2019-03-17 12:38:34 +01:00
| choosen_design | Sets the desired panel design. Can be one of `month-overview` or `day-list`. |
| general_settings | A dictionary containing options that some designs use to optimize there design. Possible options are as follows: |
| `"info-area"` | Defines the content type of an additionaly info area on the design. Can be one of `"rss"`, `"events"` or empty, to remove this area or keep it clean. |
2019-04-08 15:54:06 +02:00
| `"highlight-event-days"` | If set to `True`, days with events are highlighted in contrast to days without events. |
| `"weather-info"` | If set to `False`, weather info areas disappear and make room for events/rss/etc. (depends on the design). |
2019-03-17 12:38:34 +01:00
### Debug
| Parameter | Description |
| --- | --- |
2019-04-08 15:54:06 +02:00
| render_to_display | Set to `True` it adds the e-paper display to the outputs. |
| render_to_file | Set to `True` it adds a image-file export to the outputs. The exported image can be found in `"/Calendar/design_exported.png"`. |
2019-03-17 12:39:38 +01:00
| calibrate_hours | A list containing all the hours in which the outputs get calibrated. That should prevent ghosting on e-paper displays. Takes a little while to execute. |
2019-04-08 15:54:06 +02:00
| print_technical_data | Set to `True` it writes start and stop time of the current update cyle and the duration on top of the panel. |
2019-03-17 12:38:34 +01:00
## Updating
2019-02-06 22:23:58 +01:00
If you want to update to the latest version, run the Installer from above again and select the 'update' option.
Before updating, the Installer checks if the settings file (/home/pi/E-Paper-Master/Calendar/settings.py) exists. This is done to test if a previous version was installed correctly. If the settings file exists, it is copied to the home directory and renamed as 'settings.py.old'. The old software folder 'E-Paper-Master' is renamed to 'E-Paper-Master-old'. Lastly, the latest version of the software is copied to the Raspberry as 'E-Paper-Master'.
After updating, copy the contents from your old settings file to the new one. There are usally more options in the new settings.py file so a 'template' is prepared with each update. This template can be found in /home/pi/E-Paper-Master/Calendar/settings.py.sample.