Skip to content

Repository files navigation

Zapshutter

A simple point of sale devices leveraging LNbits' Bitcoin Switch extension.

Prerequisites:

This guide and the code are optimized for Rasperry Pi OS (Bookworm) running on a Pi Zero W.

sudo apt install git

sudo apt install python3.11-dev

Enable the SPI interface:

sudo raspi-config

Then select Interfacing Options -> SPI -> Yes to enable the SPI interface

Installation:

git clone https://github.com/Liongrass/zapshutter.git

cd zapshutter

python -m venv env

source env/bin/activate

pip install -r requirements.txt

Run Zapshutter:

To run the machine, first copy the example configuration file.

cp .env.example .env

Most importantly, a valid websockets URL and LNURL need to be defined. These can be obtained from the Bitcoin Switch extension on your LNbits instance. Variables pre-fixed with a # sign have defaults and do not need to be set.

nano .env

Run the machine:

python main.py

Deploying as a service

To make the code run on startup and restart after a crash, we are using the PM2 utility.

Install PM2

Prerequisites:

sudo apt install npm

sudo npm install -g pm2

Persist Zapshutter

pm2 start /home/user/zapshutter/main.py --interpreter /home/user/zapshutter/env/bin/python --name zapshutter --exp-backoff-restart-delay=100

pm2 startup

This will give you a short command. Execute it to make Zapshutter run on startup.

Useful commands:

pm2 logs zapshutter
pm2 list
pm2 monit
pm2 restart zapshutter

Further documentation

E-ink display user manual

E-ink display circuit schema

Display Guide

Pin Inventory

About

A simple Lightning point of sale device for LNbits with an e-ink display

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages