Giter Site home page Giter Site logo

epd_display's Introduction

epd_display/PaperPi

NOTE: Project Archived

This project has been migrated to PaperPi and is no longer maintained. PaperPi offers all of the same functionality, but a cleaner install process, a more open and flexible plugin structure and removes the need for a frozen binary.

This repository is maintained only for hitorical purposes. Check the new version for updates!

Splash Screen Splash Screen PaperPi PaperPi Weather Plugin

PaperPi is an e-Paper display with multiple rotating display plugins that contain dynamic content.

PaperPi is a quiet and clean portal to the internet. No loud colors, no busy animations, just a lovely selection of the information you want without buzz and distraction. PaperPi rotates through your choice of plugin screens at the pace you choose.

PaperPi is written to work with almost all of the WaveShare SPI displays out of the box. PaperPi will work with the tiny 2" displays all the way up to the 10" HD displays with minimal configuration. Check the complete list of supported screens

For information on building a frame, case and custom cable, see these instructions.

To get started, jump to the Setup Instructions

Plugins

PaperPi supports many different plugins and layouts for each plugin.

librespot pluginLibreSpot (spotify) Plugin word clock pluginWord Clock lms client pluginLogitech Media Server Plugin
decimal binary clockMoon Phase met_no pluginMet.no Weather Crypto Currency TickerCrypto Currency
reddit/r/quotesReddit Quotes XKCD ComicXKCD Comic Basic ClockBasic Clock

Changes

See the Change Log for a complete list of updates

Requirements

Required Hardware

  • Raspberry Pi (Pi 4, Pi 3, and Pi Zero)
  • Raspberry Pi OS Buster or later (64-bit supported)
  • WaveShare EPD Screen with PiHat
    • see the full list of currently supported screens
    • Note: HDMI screens are not supported

Optional Hardware

  • HiFiBerry hat (optional)
    • The HiFiBerry DAC+ PRO and similar boards add high-quality audio output to the Pi so it can act as a display and also work as a LMS client player using squeezelite
    • GPIO 2x20 headers must be added to the HiFiBerry HAT to provide an interface for the WaveShare HAT.
    • HiFiBerry's DAC+ Bundle with the following configuraiton is a good choice:
      • DAC+ Pro
      • Acrylic Case for (RCA) AND DIGI+
      • Raspberry Pi 4B 2GB (1GB should be sufficient as well)
      • 16GB SD Card
      • PowerSupply (USB C 5.1V/3A)
      • 2x20 Pin Male Header (required for WaveShare HAT)

Optional Software

PaperPi plugins work with a variety of other software such as Logitech Media Server and Spotify. Check the Plugin documentation for further instructions

Setup

PaperPi requires only small amount of setup.

Hardware/OS Setup

All Waveshare Screens

The WaveShare displays require the SPI interface. SPI can be enabled through the raspi-config command.

  1. Enable SPI (see images below)
    • $ sudo raspi-config > Interface Options > SPI > Yes
  2. Reboot
    • $ sudo shutdown -r now
librespot plugin
librespot plugin
librespot plugin

Userland Setup

PaperPi can be run directly on-demand from a user account such as the default "pi" user. Any other user will work as well, but the user must be a member of the spi group.

  1. Download the tarball
    • $ wget https://github.com/txoof/epd_display/raw/master/paperpi_latest.tgz
  2. Decompress the archive: tar xvzf paperpi.tgz
  3. Launch PaperPi: $ ./paperpi/dist/paperpi
    • On the first run PaperPi will create a configuration file in ~/.config/com.txoof.paperpi/paperpi.ini and then exit
  4. Edit the configuration file to match your needs. The default configuration will provide a reasonable starting point
    • $ nano ~/.config/com.txoof.paperpi/paperpi.ini
      • At minimum you must specify the display_type
      • If you are using an HD IT8951 display, you must also set the vcom value which can be found on the ribon cable.
      # choose the display type that matches your e-paper pannel 
      display_type = epd2in7
      # vcom value for HDIT8951 displays
      vcom = 0.0
      
  5. Launch PaperPi again -- you should immediately see a splash screen followed shortly by the first active plugin.
  6. Press ctrl+c to shutdown paperpi cleanly
    • Waveshare recommends clearing pannels to a blank state prior to long-term storage

Daemon Setup

PaperPi is designed to run as an unattended daemon process that starts at system boot.

  1. Download the tarball
    • $ wget https://github.com/txoof/epd_display/raw/master/paperpi_latest.tgz
  2. Decompress the archive: tar xvzf paperpi.tgz
  3. Install PaperPi as a service, run the install script: $ sudo ./install.sh
    • This will:
      • add the necessary service users and groups
      • add a configuration file to /etc/defaults/paperpi.ini
      • install PaperPi as a systemd service
  4. Edit /etc/defaults/paperpi.ini to configure a display_type and enable any plugins
    • $ sudo nano /etc/defaults/paperpi.ini
    • At minimum you must specify the display_type
    • See the list of supported screens for more information
  5. Start PaperPi: $ sudo systemctl restart paperpi
    • PaperPi will now start and restart at boot as a systemd service
    • PaperPi may fail to clear the screen when the daemon is stopped. This a known issue.

Developing PaperPi

If you would like to develop plugins for PaperPi, you will likely need a working build environment.

Requirements:

  • python 3.7+
  • pipenv

Create a Build Environment

  1. Clone the repo: https://github.com/txoof/epd_display.git
  2. Run $ create_devel_venv.sh to create a build environment
    • This will check for all necessary libraries and python modules
  3. The build script will then attempt to build a binary of PaperPi using pyintsaller
    • executables are stored in ./dist/

Build Paperpi

  1. Create a build environment (see above)
  2. Run $ build.sh to create a pyinstaller one-file distributable
  3. If you've updated documentation in any plugins, be sure to rebuild the documentation with $ pipenv run python3 create_docs.py
  4. Submit a PR if you'd like your changes included in the official distribution

Contributing

PaperPi's core is written and maintained in Jupyter Notebook. If you'd like to contribute, please make pull requests in the Jupyter notebooks. Making PRs to the .py files means manually moving the changes into the Jupyter Notebook and adds considerable work to the build/test process.

Plugins can be pure python, but should follow the guide provided.

See this gist for a quick guide for setting up a jupyter environment on a Raspberry Pi.

Supported Screens

Most NON-IT8951 screens are only supported in 1 bit (black and white) mode. Color output is not supported at this time. Some waveshare drivers do not provide 'standard' display and Clear methods; these displays are not supported at this time.

All IT8951 Screens now support 8 bit grayscale output.

Some WaveShare screens that support color output will also work with with the non-colored driver. Using the 1 bit driver can yield significantly better update speeds. For example: the epd2in7b screen takes around 15 seconds to update even when refreshing a 1 bit image, but can be run using the epd2in7 module in 1-bit mode which takes less than 2 seconds to update.

WaveShare Screen

NN. Board Supported:


  1. epd1in02 supported: False
  • AttributeError: module does not support EPD.display()
  1. epd1in54 supported: True
  2. epd1in54_V2 supported: True
  3. epd1in54b supported: True
  4. epd1in54b_V2 supported: True
  5. epd1in54c supported: True
  6. epd2in13 supported: True
  7. epd2in13_V2 supported: True
  8. epd2in13b_V3 supported: True
  9. epd2in13bc supported: True
  10. epd2in13d supported: True
  11. epd2in66 supported: True
  12. epd2in66b supported: True
  13. epd2in7 supported: True
  14. epd2in7b supported: True
  15. epd2in7b_V2 supported: True
  16. epd2in9 supported: True
  17. epd2in9_V2 supported: True
  18. epd2in9b_V3 supported: True
  19. epd2in9bc supported: True
  20. epd2in9d supported: True
  21. epd3in7 supported: False
  • unsupported EPD.Clear() function
  • AttributeError: module does not support EPD.display()
  1. epd4in01f supported: True
  2. epd4in2 supported: True
  3. epd4in2b_V2 supported: True
  4. epd4in2bc supported: True
  5. epd5in65f supported: True
  6. epd5in83 supported: True
  7. epd5in83_V2 supported: True
  8. epd5in83b_V2 supported: True
  9. epd5in83bc supported: True
  10. epd7in5 supported: True
  11. epd7in5_HD supported: True
  12. epd7in5_V2 supported: True
  13. epd7in5b_HD supported: True
  14. epd7in5b_V2 supported: True
  15. epd7in5bc supported: True
  16. All IT8951 Based Panels

Isuses

Please open tickets at GitHub.

epd_display's People

Contributors

aaronr8684 avatar logge avatar txoof avatar valanm22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epd_display's Issues

Update_loop appears to ignore max_refresh value in config file

See issue here from @jhaake2308

As it seems, the config parameter max_refresh (which is set to 30 in my case in paperpi.conf) is ignored. Every four changes there is a hard refresh. See this, the last refresh is done right before the video starts:

edit: video doesnt work, see gif at: https://imgur.com/a/6eoObdo
thank god its 2021, you can pause the gif, move forward, etc.

I am using a daemonized setup, defining max_refresh in /etc/default/paperpi.ini

# CONFIG_VERSION=1
[main]
# waveshare display type use HD for IT8951 displays
display_type = HD
# required vcom value for IT8951 screens
vcom = -2.13
# maximum refresh between total screen clear for HD displays
max_refresh = 30```

is this intentional or did I do this wrong?

add better error handling on new_epdlib branch when epd library cannot be loaded

crashes on unknown epd -- offer better feedback to user

Traceback (most recent call last):
  File "paperpi/paperpi.py", line 658, in <module>
  File "paperpi/paperpi.py", line 620, in main
  File "paperpi/paperpi.py", line 346, in setup_display
  File "epdlib/Screen.py", line 195, in __init__
  File "epdlib/Screen.py", line 38, in new_f
  File "epdlib/Screen.py", line 264, in epd
  File "epdlib/Screen.py", line 467, in _epd_non_hd
epdlib.Screen.ScreenError: invalid waveshare module: epd2in

add better handling when IT8951 driver cannot be reached at init and possibly during run time

When the driver board cannot be reached:

Traceback (most recent call last):
  File "paperpi/paperpi.py", line 658, in <module>
  File "paperpi/paperpi.py", line 620, in main
  File "paperpi/paperpi.py", line 346, in setup_display
  File "epdlib/Screen.py", line 195, in __init__
  File "epdlib/Screen.py", line 38, in new_f
  File "epdlib/Screen.py", line 259, in epd
  File "epdlib/Screen.py", line 417, in _epd_hd
  File "IT8951/display.py", line 219, in __init__
  File "IT8951/interface.py", line 33, in __init__
  File "IT8951/interface.py", line 103, in update_system_info

related to Issue #3

executing ./dist/paperpi results in "No such file or directory"

~/Desktop/paperpi/dist/paperpi exists, is attributed executable, and -rwxrwxrwx 1 pi pi 41389340 Feb 27 21:48 paperpi.

attempted to execute via terminal from ~, ~/Desktop, ~/Desktop/paperpi, and ~/Desktop/paperpi/dist

Raspberry pi 3b, Waveshare 10.3+ w/ Raspberry hat - confirmed display functional via windows, confirmed interface correct using https://github.com/GregDMeyer/IT8951

Running Raspbian 11, /proc/version says Linux version 5.10.92-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022

Looking for specific advice for locating logs for daemon instance of paperpi, as well as any advice as to what's not doing the thing.

tar file corupt

pi@raspberrypi:~ $ tar xvzf paperpi_latest.tgz
paperpi/./dist/paperpi

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
cloned from your site due to tar not workintg. cant launch paperpi. not working.

AttributeError: 'EPD' object has no attribute 'display'

Raspberry Pi 3 Model B Rev 1.2
Buster
Waveshare 3in7

I am able to run the waveshare demo

I have disabled all plugins so the only thing changed is the display_type

[main]

waveshare display type

display_type = epd3in7

And yet, when I run the executable . . . failure:

$ ./paperpi
Traceback (most recent call last):
File "paperpi/paperpi.py", line 584, in
File "paperpi/paperpi.py", line 546, in main
File "paperpi/paperpi.py", line 293, in setup_display
File "epdlib/Screen.py", line 251, in epd
AttributeError: 'EPD' object has no attribute 'display'
[2366] Failed to execute script paperpi

[It's probably me. Sorry.]

Paperpi freezing

Hi; I have downloaded paperpi on a raspberry pi 3 using the current outlook rendition. I am operating a waveshare 4.2 screen. Download was fine and set up on Damon. I am running the word clock and phases of the moon. Problem is that the system starts, and works fine for about 12 hours. It then simply freezes; and does not function. I thought it might be a bad download; so I performed a new download with a new SD card. Same problem. I then changed to a different Raspberry Pi 3b that I had sitting around. Same problem. As it starts and functions for 12 hours; I doubt it has anything to do with the wiring. Any ideas? Looks great when operating; however, having to restart it every 12 hours is a non player. Please let me know if there is something else I can do. Thanks.

Support for epd3in7

I have a 3.7 HAT screen and would love to add support. Would you prefer a modified version of the standard Waveshare py file (modify the actual functions) or an inline interface file that can handle the function calls between the two?

In short, I would love to get this working with my 3.7 screen and am willing to do the work to make that happen. I'm just looking for a preferred direction (if you have one).

Documentation error

In a number of places across documentation for this project (Plugins.md, step_by_step_instructions.md) the location of the configuration file is (incorrectly) referred to as /etc/defaults/paperpi.ini instead of /etc/default/paperpi.ini. Presume this is a typo?

Add 64-bit OS support

Trying to run the program on the new 64-bit Raspbian OS causes the error bash: ./paperpi: No such file or directory as it's looking for the non-existent ld-linux-armhf.so.3 interpreter.
[Requesting program interpreter: /lib/ld-linux-armhf.so.3]

After some troubleshooting, I was able to get it running using the following commands:
sudo dpkg --add-architecture armhf

Which resulted in this error:
./paperpi: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

That was resolved with this command:
sudo apt-get install zlib1g:armhf

Which resulted in this error:

  File "paperpi/paperpi.py", line 29, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "epdlib/__init__.py", line 6, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "epdlib/Block.py", line 14, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "PIL/Image.py", line 89, in <module>
ImportError: libxcb.so.1: cannot open shared object file: No such file or directory
[2447] Failed to execute script 'paperpi' due to unhandled exception!

That was resolved with this command:
sudo apt-get install libxcb1:armhf libxcb1-dev:armhf

This appears to allow the 32-bit compiled version to work as intended with the same results as my locally compiled 64-bit version. I'm not sure if these three commands can just be added to a shell script for running if the compiled version doesn't work or maybe just added to the README.md on here.

xkcd plugin crashes when backend is not available

looks like wrapping json decode in a try/except will resolve this

19:01:34 paperpi:update_plugins:454:INFO - __________Plugin: XKCD Comic Plugin__________
19:01:34 xkcd_comic:update_function:107:DEBUG - XKCD CONFIG: {'plugin': 'xkcd_comic', 'max_x': 800, 'max_y': 600, 'resize': 1, 'max_retries': 10}
19:01:41 xkcd_comic:get_comic_json:45:ERROR - failed to decode JSON result possibly due to previous errors: [Errno Expecting value]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>503 Backend unavailable, connection timeout</title>
  </head>
  <body>
    <h1>Error 503 Backend unavailable, connection timeout</h1>
    <p>Backend unavailable, connection timeout</p>
    <h3>Guru Mediation:</h3>
    <p>Details: cache-ams12725-AMS 1642010501 2485529884</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>
: 1
Traceback (most recent call last):
  File "paperpi/paperpi.py", line 729, in <module>
  File "paperpi/paperpi.py", line 686, in main
  File "paperpi/paperpi.py", line 506, in update_loop
  File "paperpi/paperpi.py", line 459, in update_plugins
  File "/tmp/_MEIqImArp/library/Plugin.py", line 254, in update
    is_updated, data, priority = self.update_function(*args, **kwargs)
  File "/tmp/_MEIqImArp/plugins/xkcd_comic/xkcd_comic.py", line 143, in update_function
    filename = comic_json['img'].split('/')[-1]

move plugins out of pyinstaller frozen blob

The pyinstaller frozen blob is getting rather large for a one-file distribution. Consider moving the modules out into a system path and then using sys.path.append('/mypath/scriptlib') to add the modules to the system path.

This would likely only require changing the path in the constants file

crash when lms_client cannot reach network

unhandled exception when network is unreachable in lms_client plugin

Sep 14 20:20:01 paperpi paperpi[6936]: 20:20:01 QueryLMS:scan_lms:233:INFO - searching for LMS servers for 5 seconds
Sep 14 20:20:01 paperpi paperpi[6936]: [6937] Failed to execute script 'paperpi' due to unhandled exception!
Sep 14 20:20:01 paperpi paperpi[6936]: Traceback (most recent call last):
Sep 14 20:20:01 paperpi paperpi[6936]:   File "paperpi/paperpi.py", line 859, in <module>
Sep 14 20:20:01 paperpi paperpi[6936]:   File "paperpi/paperpi.py", line 838, in main
Sep 14 20:20:01 paperpi paperpi[6936]:   File "paperpi/paperpi.py", line 409, in build_plugin_list
Sep 14 20:20:01 paperpi paperpi[6936]:   File "/tmp/_MEI0NoqYT/library/Plugin.py", line 254, in update
Sep 14 20:20:01 paperpi paperpi[6936]:     is_updated, data, priority = self.update_function(*args, **kwargs)
Sep 14 20:20:01 paperpi paperpi[6936]:   File "/tmp/_MEI0NoqYT/plugins/lms_client/lms_client.py", line 133, in update_function
Sep 14 20:20:01 paperpi paperpi[6936]:     build_lms()
Sep 14 20:20:01 paperpi paperpi[6936]:   File "/tmp/_MEI0NoqYT/plugins/lms_client/lms_client.py", line 102, in build_lms
Sep 14 20:20:01 paperpi paperpi[6936]:     self.my_lms = QueryLMS.QueryLMS(player_name=player_name, handle_requests_exceptions=True)
Sep 14 20:20:01 paperpi paperpi[6936]:   File "QueryLMS/QueryLMS.py", line 80, in __init__
Sep 14 20:20:01 paperpi paperpi[6936]:   File "QueryLMS/QueryLMS.py", line 173, in set_server
Sep 14 20:20:01 paperpi paperpi[6936]:   File "QueryLMS/QueryLMS.py", line 235, in scan_lms
Sep 14 20:20:01 paperpi paperpi[6936]: OSError: [Errno 101] Network is unreachable```

Change distribution method from Frozen PyInstaller glob

Currently PaperPi is distributed as a single Frozen glob using PyInstaller. This is brittle, large and generally a pain to maintain. It is also not possible to add, test, or adjust plugins without rebuilding the entire project and redistributing it. This isn't ideal.

Finding a new distribution method would be much better.

reddit quote crash

19:34:13 reddit_quote:update_function:149:DEBUG - checking mtime of cached json file: /tmp/PaperPi_ird7eumt/reddit_quote.json
19:34:13 reddit_quote:update_function:174:DEBUG - cached data expired, fetching fresh data
19:34:13 reddit_quote:update_function:179:DEBUG - downloading fresh data from reddit
19:34:13 reddit_quote:_fetch_quotes:46:DEBUG - fetching data from reddit
19:34:13 reddit_quote:_process_quotes:78:DEBUG - processing 25 quotes
Traceback (most recent call last):
  File "paperpi/paperpi.py", line 729, in <module>
  File "paperpi/paperpi.py", line 682, in main
  File "paperpi/paperpi.py", line 431, in build_plugin_list
  File "/tmp/_MEIW9UIsg/library/Plugin.py", line 254, in update
    is_updated, data, priority = self.update_function(*args, **kwargs)
  File "/tmp/_MEIW9UIsg/plugins/reddit_quote/reddit_quote.py", line 181, in update_function
    json_data = _process_quotes(raw_quotes)
  File "/tmp/_MEIW9UIsg/plugins/reddit_quote/reddit_quote.py", line 103, in _process_quotes
    processed_quotes.append({'len': len(q), 'text': text, 'attribution': attribution})
UnboundLocalError: local variable 'text' referenced before assignment
[3194] Failed to execute script 'paperpi' due to unhandled exception!

When starting as a daemon from systemd, no images are shown until first plugin timesout

When starting from systemd at boot, PaperPi may fail to show the splash screen and the first module. This is due to a NoneType object being passed to the epdWrite() function.

This has been exceptionally difficult to debug because it only happens at boot time from systemd. When started from the command line, this problem does not manifest.

Logging shows the image is generated, but fails to pass to the epdWrite() function.

Any help in solving this would be greatly appreciated.

crash on unknown plugin layout

when an unknown layout is found, PaperPi crashes -- instead consider raising a WARNING and skip the loading of the module:

09:40:56 paperpi:build_plugin_list:382:INFO - [[ Plugin: LMS MacPlay ]]
Traceback (most recent call last):
  File "paperpi.py", line 658, in <module>
    exit_code = main()
  File "paperpi.py", line 639, in main
    plugins = build_plugin_list(config, screen.resolution, cache)
  File "paperpi.py", line 402, in build_plugin_list
    my_config['layout'] = getattr(module.layout, values['layout'])
AttributeError: module 'plugins.lms_client.layout' has no attribute 'twoColumn'```

new yorker plugin crash

17:48:10 Block:_calc_maxchar:923:DEBUG - maximum characters per line: 148
17:48:10 Block:_text_formatter:939:DEBUG - formatting string: NONE
17:48:10 Block:_text2image:983:DEBUG - text size: (16, 11)
17:48:10 Block:_text2image:1030:DEBUG - paste coordinates: (5, 5)
Traceback (most recent call last):
  File "paperpi/paperpi.py", line 729, in <module>
  File "paperpi/paperpi.py", line 682, in main
  File "paperpi/paperpi.py", line 431, in build_plugin_list
  File "/tmp/_MEISqIwwY/library/Plugin.py", line 254, in update
    is_updated, data, priority = self.update_function(*args, **kwargs)
  File "/tmp/_MEISqIwwY/plugins/newyorker/newyorker.py", line 134, in update_function
    success, my_data, day_range = fetch_comic(day_range)
  File "/tmp/_MEISqIwwY/plugins/newyorker/newyorker.py", line 95, in fetch_comic
    if day_range > len(feed.entries):
TypeError: '>' not supported between instances of 'str' and 'int'
[8750] Failed to execute script 'paperpi' due to unhandled exception!

Paperpi doesn't find Numpy though module is installed

Getting the below when trying to run Paperpi. Numpy was installed using apt install python3-numpy. I have also tried pip3 install numpy. Same outcome. Anyone have any ideas?

pi@raspberrypi:~ $ ./paperpi/dist/paperpi
09:22:53 paperpi:setup_display:325:CRITICAL - Error loading epd from configuration
09:22:53 paperpi:main:654:ERROR - config files used: [PosixPath('/tmp/_MEIh8nd8Z/config/paperpi.ini'), PosixPath('/home/pi/.config/com.txoof.paperpi/paperpi.ini')]
09:22:53 paperpi:do_exit:51:ERROR - failure caused exit: could not load epd module: epd2in13_V2 -- error: failed to load epd2in13_V2 with error: No module named 'numpy'

######################################################################
could not load epd module: epd2in13_V2 -- error: failed to load epd2in13_V2 with error: No module named 'numpy'
######################################################################

Exiting

spotify plugin causes crash when local librespot client is not responding

This appears to be due to a variable assignment issue in the spotify plugin that can be easily resoloved:

Oct  2 21:34:03 paperpi paperpi[599]: [623] Failed to execute script 'paperpi' due to unhandled exception!
Oct  2 21:34:03 paperpi paperpi[599]: Traceback (most recent call last):
Oct  2 21:34:03 paperpi paperpi[599]:   File "paperpi/paperpi.py", line 859, in <module>
Oct  2 21:34:03 paperpi paperpi[599]:   File "paperpi/paperpi.py", line 842, in main
Oct  2 21:34:03 paperpi paperpi[599]:   File "paperpi/paperpi.py", line 505, in update_loop
Oct  2 21:34:03 paperpi paperpi[599]:   File "paperpi/paperpi.py", line 460, in update_plugins
Oct  2 21:34:03 paperpi paperpi[599]:   File "/tmp/_MEI1jUQDk/library/Plugin.py", line 254, in update
Oct  2 21:34:03 paperpi paperpi[599]:     is_updated, data, priority = self.update_function(*args, **kwargs)
Oct  2 21:34:03 paperpi paperpi[599]:   File "/tmp/_MEI1jUQDk/plugins/librespot_client/librespot_client.py", line 132, in update_function
Oct  2 21:34:03 paperpi paperpi[599]:     if player_status.status_code == 200:
Oct  2 21:34:03 paperpi paperpi[599]: UnboundLocalError: local variable 'player_status' referenced before assignment
Oct  2 21:34:03 paperpi systemd[1]: paperpi-daemon.service: Main process exited, code=exited, status=1/FAILURE
Oct  2 21:34:03 paperpi systemd[1]: paperpi-daemon.service: Failed with result 'exit-code'.

Crash when BCM driver is not installed

21:27:38 paperpi:main:643:INFO - ********** PaperPi 0.2.14.3 Starting **********
21:27:38 paperpi:main:645:DEBUG - configuration:
{'main': {'display_type': 'HD', 'vcom': -1.9, 'max_refresh': 4, 'log_level': 'DEBUG', 'splash': 1, 'rotation': 0, 'daemon': False}, 'xPlugin: decimal binary clock': {'layout': 'layout', 'plugin': 'dec_bin_clock', 'refresh_rate': 30, 'min_display_time': 50, 'max_priority': 2}, 'xPlugin: Weather Adis Ababa': {'layout': 'layout', 'plugin': 'met_no', 'refresh_rate': 300, 'min_display_time': 40, 'max_priority': 2, 'location_name': 'Adis Ababa', 'lat': 9.0, 'lon': 38.75, 'email': '[email protected]'}, 'xPlugin: Moon Phase': {'layout': 'layout', 'plugin': 'moon_phase', 'min_display_time': 30, 'max_priority': 2, 'email': '[email protected]', 'location_name': 'Europe/Amsterdam', 'lat': 52.3, 'lon': 4.9}, 'xPlugin: A Demo Plugin': {'layout': 'layout', 'plugin': 'demo_plugin', 'min_display_time': 30, 'max_priority': 1, 'your_name': 'Slartybartfast', 'your_color': 'chartreuse'}, 'xPlugin: Basic Clock': {'layout': 'layout', 'plugin': 'basic_clock', 'refresh_rate': 30, 'min_display_time': 50, 'max_priority': 2}, 'xPlugin: XKCD Comic Plugin': {'layout': 'layout', 'plugin': 'xkcd_comic', 'refresh_rate': 1200, 'min_display_time': 120, 'max_x': 800, 'max_y': 600, 'resize': 0, 'max_retries': 10, 'max_priority': 2}, 'xPlugin: New Yorker Comic': {'layout': 'layout', 'plugin': 'newyorker', 'day_range': '5 # number of past days to choose from', 'refresh_rate': 120, 'min_display_time': 60, 'max_priority': 2}, 'xPlugin: Librespot': {'layout': 'layout', 'plugin': 'librespot_client', 'refresh_rate': 10, 'max_priority': 0, 'min_display_time': 15, 'player_name': 'SpoCon-Spotify', 'idle_timeout': 10}, 'xPlugin: Reddit Quotes': {'layout': 'layout', 'plugin': 'reddit_quote', 'refresh_rate': 100, 'min_display_time': 50, 'max_priority': 2, 'max_length': 144}, 'xPlugin: LMS - Your Player Name': {'layout': 'layout', 'plugin': 'lms_client', 'player_name': 'Your Player Name', 'refresh_rate': 5, 'min_display_time': 30, 'max_priority': 0, 'idle_timeout': 15}, 'xPlugin: Word Clock': {'layout': 'layout', 'plugin': 'word_clock', 'refresh_rate': 125, 'min_display_time': 255, 'max_priority': 2}, 'Plugin: XKCD Comic Plugin': {'layout': 'layout', 'plugin': 'xkcd_comic', 'refresh_rate': 1200, 'min_display_time': 120, 'max_x': 800, 'max_y': 600, 'resize': 0, 'max_retries': 10, 'max_priority': 2}, 'Plugin: Reddit Quotes': {'layout': 'layout', 'plugin': 'reddit_quote', 'refresh_rate': 100, 'min_display_time': 50, 'max_priority': 2, 'max_length': 144}, '__cmd_line': {'list_plugins': False}}
21:27:38 Screen:_load_hd:399:DEBUG - configuring IT8951 epd
Traceback (most recent call last):
  File "paperpi/paperpi.py", line 729, in <module>
  File "paperpi/paperpi.py", line 648, in main
  File "paperpi/paperpi.py", line 322, in setup_display
  File "epdlib/Screen.py", line 226, in __init__
  File "epdlib/Screen.py", line 38, in new_f
  File "epdlib/Screen.py", line 316, in epd
  File "epdlib/Screen.py", line 406, in _load_hd
  File "IT8951/display.py", line 215, in __init__
RuntimeError: Problem importing EPD interface. Did you build the backend with "pip install ./" or "python setup.py build_ext --inplace"?
[4255] Failed to execute script 'paperpi' due to unhandled exception!

Plugin Ideas

  • Pull quotes similar to Audry
  • Pull images from google image, imgr, etc. and display in rotation
  • Add stock quotes plugin -- build similar to weather plugin allowing multiple stocks to be tracked on individual screens
  • NYT Headlines
  • NPR Headlines

Unable to display plugin.

The time can be displayed, but the plug-in cannot be displayed, and a prompt message appears:
Noplugins are active,check the logs!
raspberry zero 2wh+waveshare b/w 7.5inch(600X384)

C to F

Looking in the config files; cannot find where to convert the Met No from Celsius to Fahrenheit? Can you point me in the right direction? Thanks.

garbage collection for cached files

Plugins should be able to clean up their private cache on demand.

add a method to Plugin() class that does garbage collection on cache

write into display loop garbage collection every N refreshes or Y days or something similar.

Create_devel_venv.sh failed

See the output below. Issue was fixed by manually running sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev and then running the shell script again. I believe this should be a quick fix in the "cd_apt_packages" file, but, I'm not sure. If it is just a simple add to the CORE var, I'm happy to make the change and submit the PR.

  ๐Ÿ   โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰ 22/22 โ€” 00:02:22
Installing initially failed dependencies...
[pipenv.exceptions.InstallError]: Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
[pipenv.exceptions.InstallError]: Collecting pycairo
[pipenv.exceptions.InstallError]:   Using cached pycairo-1.20.1.tar.gz (344 kB)
[pipenv.exceptions.InstallError]:   Preparing metadata (setup.py): started
[pipenv.exceptions.InstallError]:   Preparing metadata (setup.py): finished with status 'done'
[pipenv.exceptions.InstallError]: Building wheels for collected packages: pycairo
[pipenv.exceptions.InstallError]:   Building wheel for pycairo (setup.py): started
[pipenv.exceptions.InstallError]:   Building wheel for pycairo (setup.py): finished with status 'error'
[pipenv.exceptions.InstallError]:   Running setup.py clean for pycairo
[pipenv.exceptions.InstallError]: Failed to build pycairo
[pipenv.exceptions.InstallError]: Installing collected packages: pycairo
[pipenv.exceptions.InstallError]:     Running setup.py install for pycairo: started
[pipenv.exceptions.InstallError]:     Running setup.py install for pycairo: finished with status 'error'
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1:
[pipenv.exceptions.InstallError]:    command: /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-adj3i4qg
[pipenv.exceptions.InstallError]:        cwd: /tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/
[pipenv.exceptions.InstallError]:   Complete output (17 lines):
[pipenv.exceptions.InstallError]:   running bdist_wheel
[pipenv.exceptions.InstallError]:   running build
[pipenv.exceptions.InstallError]:   running build_py
[pipenv.exceptions.InstallError]:   creating build
[pipenv.exceptions.InstallError]:   creating build/lib.linux-aarch64-3.9
[pipenv.exceptions.InstallError]:   creating build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:   copying cairo/__init__.py -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:   copying cairo/__init__.pyi -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:   copying cairo/py.typed -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:   warning: build_py: byte-compiling is disabled, skipping.
[pipenv.exceptions.InstallError]:   
[pipenv.exceptions.InstallError]:   running build_ext
[pipenv.exceptions.InstallError]:   Package cairo was not found in the pkg-config search path.
[pipenv.exceptions.InstallError]:   Perhaps you should add the directory containing `cairo.pc'
[pipenv.exceptions.InstallError]:   to the PKG_CONFIG_PATH environment variable
[pipenv.exceptions.InstallError]:   No package 'cairo' found
[pipenv.exceptions.InstallError]:   Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
[pipenv.exceptions.InstallError]:   ----------------------------------------
[pipenv.exceptions.InstallError]:   ERROR: Failed building wheel for pycairo
[pipenv.exceptions.InstallError]:     ERROR: Command errored out with exit status 1:
[pipenv.exceptions.InstallError]:      command: /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qc0zxiqm/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/include/site/python3.9/pycairo
[pipenv.exceptions.InstallError]:          cwd: /tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/
[pipenv.exceptions.InstallError]:     Complete output (19 lines):
[pipenv.exceptions.InstallError]:     running install
[pipenv.exceptions.InstallError]:     /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
[pipenv.exceptions.InstallError]:       warnings.warn(
[pipenv.exceptions.InstallError]:     running build
[pipenv.exceptions.InstallError]:     running build_py
[pipenv.exceptions.InstallError]:     creating build
[pipenv.exceptions.InstallError]:     creating build/lib.linux-aarch64-3.9
[pipenv.exceptions.InstallError]:     creating build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:     copying cairo/__init__.py -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:     copying cairo/__init__.pyi -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:     copying cairo/py.typed -> build/lib.linux-aarch64-3.9/cairo
[pipenv.exceptions.InstallError]:     warning: build_py: byte-compiling is disabled, skipping.
[pipenv.exceptions.InstallError]:     
[pipenv.exceptions.InstallError]:     running build_ext
[pipenv.exceptions.InstallError]:     Package cairo was not found in the pkg-config search path.
[pipenv.exceptions.InstallError]:     Perhaps you should add the directory containing `cairo.pc'
[pipenv.exceptions.InstallError]:     to the PKG_CONFIG_PATH environment variable
[pipenv.exceptions.InstallError]:     No package 'cairo' found
[pipenv.exceptions.InstallError]:     Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
[pipenv.exceptions.InstallError]:     ----------------------------------------
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1: /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h9ewg1fo/pycairo_6e9b912de55f42a5b3452cd78a143e61/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qc0zxiqm/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/.local/share/virtualenvs/epd_display-TrMBV6hi/include/site/python3.9/pycairo Check the logs for full command output.
ERROR: Couldn't install package: pycairo
 Package installation failed...
  โ˜ค  โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰โ–‰ 0/1 โ€” 00:00:10
exiting script ./create_devel_venv.sh
reason: failed to install modules

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.