e-paper display with PaperTTY

See original GitHub issue

I would like to eventually manifest this as a pull request. However, it is still a hodgepodge of trial and error right now, so starting it off as an issue. Nevertheless, I managed to get a 2.7inch waveshare e-paper hat working on my pi4. All in all, it turned out to be relatively straight forward.

When logged into my Raspiblitz as user admin, I cloned https://github.com/joukos/PaperTTY and followed the install instructions (way down towards the bottom of the readme).

After install, I have been able to do things like (as admin user): echo "Hello World" | sudo papertty.py --driver epd2in7 stdin --nofold --size 14

or, to get a full blown terminal, I can:

  1. start a screen session and run sudo ~/.virtualenvs/papertty/bin/python3 ./papertty.py --driver epd2in7 terminal --vcsa /dev/vcsa2
  2. in another screen session run sudo openvt -fc 2 -- sudo -u admin screen followed by screen -x <name> to attach to the screen.

At that point, both the e-paper display and my ssh console are shown the raspiblitz menu. Just a plain terminal itself would probably be preferred, but I’m not sure how to proceed from where I am. This level of shell scripting and “ttys” is quite new to me.

If, for example, I wanted the e-paper display to simply show the bestblock hash and it’s height, I probably do not need a full terminal and something similar to the first command above would do. However, it seems that updating the display needs to be done by the admin user since sudo is required.

If there is a particular thing I need help with next, it is this: What is the easiest/recommended/idiomatic way in the context of a Raspiblitz for me to have a little script run by the admin user every time, for example, a new block arrives?

My original thought was to utilize the blocknotify=<your shell command> bitcoin.conf feature. However, since the Raspiblitz runs bitcoind as user bitcoin and that user does not have sudo privileges, then if the shell command passed in required sudo, it would fail. Additionally, it seems that ZMQ is probably the preferred method in bitcoin core these days.

So, this then leads me to think that a better method might be to:

  1. create a small service (probably written in python or something) which subscribes to any of bitcoind’s ZMQ messages it might need to update the display.
  2. then, since the service would be run by the admin user, it could execute the sudo papertty.py ... command(s) necessary to update the display.

Is this the general method that you would recommend? Thanks in advance for any pointers.

Misc Details: The particular model I tried is https://www.amazon.com/gp/product/B07PKSZ3XK, but the foregoing seems applicable to most any other model. A model that supports partial-refresh is probably preferred for most use-cases that require a more snappy response time.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
philbertw4commented, Aug 10, 2020

Started work here based off v1.6 branch: https://github.com/philbertw4/raspiblitz/tree/feature-blitzpaperui/home.admin/BlitzPaperUI Will open a pull request once I’m further along.

1reaction
rootzollcommented, Aug 10, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

PaperTTY - Python module to render a TTY or VNC on e-ink
PaperTTY is a simple Python module for using affordable SPI e-ink displays as a computer monitor, with a Raspberry Pi being the typical...
Read more >
PaperTTY on Raspberry Pi 400 and 6" HD e-ink (1448×1072)
Using VNC display running locally on the Pi. There's quite a bit of things than can be improved still and it could be...
Read more >
Paper Pi Is a Raspberry Pi-Powered Handheld with an E Ink ...
Paper Pi Is a Raspberry Pi-Powered Handheld with an E Ink Display ... To get around this, Norris used the PaperTTY module, which...
Read more >
Can I use ePaper as a normal display for raspberry pi?
The PaperTTY project uses a python script I believe to mirror the Raspberry Pi's current virtual console's text to the ePaper, talking to...
Read more >
PaperTTY vs Inkycal - compare differences and reviews?
PaperTTY - Python module to render a TTY or VNC on e-ink (by joukos) ... Inykcal is a software written in python for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found