the public repo for the e-paper bulletin board. It's a bulletin board that syncs over scuttlebutt :)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
trav c91faee975 removed pyc 8 months ago
etc ugh im bad at git 8 months ago
install f git 8 months ago
.gitignore removed pyc 8 months ago
LICENSE alpha code 9 months ago
README.md textual version display on boot 8 months ago
addtoDB.py textual version display on boot 8 months ago
carousel.py fixed db refresh 8 months ago
config.txt f git 8 months ago
epd4in2.py alpha code 9 months ago
epdconfig.py alpha code 9 months ago
iterparse.py alpha code 9 months ago
refreshdb.py fixed db refresh 8 months ago
run-ssb.sh f git 8 months ago
ssbpost.sh alpha code 9 months ago
weather.py textual version display on boot 8 months ago

README.md

EBB

a photo of the device, made out of multi-colored legos, hanging on a wall

EBB is an e-paper bulletin board that syncs over Scuttlebutt (SSB). EBB is a Slow Web device. As such it is not intended to be fast. Thus users must exercise great patience while operating EBB.

Usage

Check out the operators manual (pdf)


Building one

This program is in alpha so proceed at your own risk :)

hardware

recommended hardware components:

part cost link
4.2 inch epaper screen $21 waveshare or aliexpress
epaper hat $10 waveshare or aliexpress
raspberry pi zero w with headers $14 adafruit (can only buy 1 at a time) or pihut (can buy more than 1)
micro-sd card variable, $5.8 on amazon
buttons $7 https://www.adafruit.com/product/3582
camera $7 aliexpres (confirmed works) or alt-aliexpress
total: $65 plus shipping and tax, ~$75 total

you'll also need a micro-usb cable, usb power supply and materials to build a case from.

assembly

  1. There may be a better way to do this but for now I've been soldering the button shim directly to the Pi using this pinout. It can be challenging to solder but not impossible.

  2. Then you just gotta plug in the camera and pop the e-paper hat on top of the headers.

  3. build a case out of lego or something. Have fun with it. I've found it handy to mount the camera to some articulating lego to more easily take pictures of more things.

software

  1. download raspbian lite (or whatever basic raspbian image)
  2. write the image to your SD card
  3. Put in wifi credentials into the WPA_supplicant.conf file.
  4. enable SSH on the device
  5. put the card in the pi and boot it up
  6. ssh-in (or connect to monitor if you didn't do step 3, connect to monitor/keyboard...)
  7. use sudo raspi-config (howto) to adjust:
  • set a new hostname
  • enable ssh (if you haven't already)
  • change user password
  • enable SPI (for e-paper screen)
  • enable I2C (for button shim)
  • enable camera.
  • timezone config
  1. run all this stuff: (this should all be scripted but for now we're setting all these parts up manually...)
sudo apt update -y && sudo apt upgrade -y
sudo apt install  unattended-upgrades python-dev python-pip python-buttonshim libjpeg-dev zlib1g-dev git -y
pip install spidev tinydb pillow --no-cache-dir

(third line can take a while...)

Now need to install an ARMv6 compatible NPM. This should work:

curl -o node.tar.gz https://unofficial-builds.nodejs.org/download/release/v13.8.0/node-v13.8.0-linux-armv6l.tar.gz
tar -xzf node.tar.gz
sudo cp -r node-v13.8.0-linux-armv6l/* /usr/local

If that doesn't work you can read more about installing node on arm v6 architecture. Also the builds are here.


#### clone the repo ideally right in your home directory.

git clone https://git.laboratoryb.org/trav/ebb.git

setup SSB

I can't remember how I got ssb-server to work, sudo npm install -g ssb-server throws illegal instruction. Something to do with a woknky version of Node. So my extremely hacky workaround is to unzip ssb-server.zip from the install directory into /usr/local/lib/node_modules/. This is v bad and needs to be fixed asap. SSB-server is made available via the MIT licese.

As long as the EBB repo is at /home/pi/ebb the following service files should be configured fine. Otherwise you gotta edit ssb.service and ebb-carousel.service and update the WorkingDirectory field.

Assuming that's good, from inside the repo run sudo cp install/ssb.service /etc/systemd/system/ssb.service and then sudo systemctl enable ssb.service to get SSB running (and now it will run at boot). Then run ssb-server whoami. This should give you an output like @b4zcVEqkDe8whateverYntH9d/Qd7jUzpEQ044=.ed25519. Copy that line (it's your SSB key), we'll need it for the next step...

configure config.txt

unless you want to store your images and db in an alternate location, run from inside the repo: mkdir ~/images cp install/images/starter.bmp ../images/starter.bmp cp install/configDEFAULT.txt config.txt cp install/posts.json ../posts.json

replace the values after = with:

  • imagesPath = the absolute filepath of where you want to store your images. Ok to leave this as is.
  • dbPath = the absolute filepath of where you want to store the database. Ok to leave this as is.
  • ssbme = Replace with the key copied in the last step.

Now we gotta install the service file for the carousel program.

sudo cp install/ebb-carousel.service /etc/systemd/system/ebb-carousel.service

sudo systemctl enable ebb-carousel.service

(this page describes what we're doing here.)

ssb follows

This part needs a lot of work. To actually sync with another device you're going to need to either run your own pub (I do) or get an invite to a pub. I worry the puny Pi 0 wouldn't be able to handle syncing a ton of people's posts so it seems ideal to run a pub just for syncing EBBs.

Anyway, to connect to other devices you need to run these commands on the command line:

To follow another device: ssb-server publish --type contact --contact {@b4zcVEqkDe8-replace-with-your-friend's-key-YntH9d/Qd7jUzpEQ044=.ed25519} --following

to redeem a pub invite: ssb-server invite.accept @b4zcVEqkDe8-replace-with-the-invite-code-YntH9d/Qd7jUzpEQ044=.ed25519

IN THE FUTURE what I'd like to do is have a button that opens a menu with an option to display a QR code of the SSB key of the device. You could take a picture of it, txt it to a friend, and then they could show the QR code to their device and start following you. This is on the roadmap...

Technically it would probably be very easy to tweak this program to be a general-purpose SSB client but for the time-being I like that it only shows photos from other devices. In the future I may enable it to read and write other kinds of posts (text) to/from SSB.

if you managed to get through all that

it should now it be running! If it works well and you're happy and you want to support the development my $ details are on my website. Or if it's not working feel free to send me an email or get in touch on Scuttlebutt, contact details are at that same link. Or you could register an account on git.laboratoryb.org and open an issue?!