Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chamilonster/Piumy/llms.txt
Use this file to discover all available pages before exploring further.
deploy/install.sh is a fully idempotent installer — safe to re-run on an existing install. It will upgrade the binary and migrate your env file (appending any new keys without touching the ones you already set), making it suitable for both fresh installs and in-place upgrades.
Prerequisites
Before running the installer, make sure you have:- A Raspberry Pi Zero 2 W (main target) or Raspberry Pi 3 A+ (portability test)
- Raspberry Pi OS Lite 64-bit flashed to the SD card (Bookworm / Debian trixie recommended)
- SSH access to the Pi (or a keyboard/monitor attached)
- An active internet connection on the Pi (for package installation)
- The
pimywabinary forlinux/arm64— either pre-built on your PC and copied over, or built directly on the Pi if a Go toolchain is present
Quick Install
Clone the repository
Clone the Piumy repository onto the Pi (or onto your PC if you plan to cross-compile first):
Build the binary
The installer expects a Cross-compile on your PC (recommended for faster iteration):
linux/arm64 binary at core/pimywa. You can build it directly on the Pi if Go is installed, or cross-compile on your PC and copy it over.Build on the Pi (requires Go):If neither a pre-built binary nor a Go toolchain is found, the installer exits with an error.
CGO_ENABLED=0 is required for cross-compilation and is set automatically when the installer builds on-device.Run the installer
Run the installer as root from the repository root on the Pi:The installer accepts the following flags:
Example — full install with automatic reboot and overlay root:After the installer finishes it prints the dashboard URL, REST and MCP addresses, and instructions for retrieving the generated MCP auth token.
| Flag | Effect |
|---|---|
--reboot | Automatically reboot at the end of installation |
--overlay | Enable the read-only overlay root filesystem (strongest power-loss protection) |
--no-display | Core only — skip e-paper display service |
--no-power | Skip the CW2015 battery service |
Check service status
Verify that all three systemd services are active:All three should show
active (running). If --no-display or --no-power was passed, only the installed services will appear.What the Installer Does
install.sh performs the following steps in order (all idempotent):
-
Package installation — installs
python3-pil,python3-spidev,python3-libgpiod(orpython3-gpiod),python3-qrcode,python3-smbus2,fonts-dejavu-core,avahi-daemon, andzram-toolsviaapt-get. Falls back topip3for packages that aren’t in the distro’s repository. -
SPI + I2C — appends
dtparam=spi=onanddtparam=i2c_arm=onto/boot/firmware/config.txt(or/boot/config.txton older images) if not already present. Also addsi2c-devto/etc/modules. -
Hardware watchdog — enables
dtparam=watchdog=onand setsRuntimeWatchdogSec=15in/etc/systemd/system.confso the Pi hard-reboots if the OS hangs. -
Journald cap — writes
/etc/systemd/journald.conf.d/pimywa.confto keep logs volatile (RAM) with a 50 MB cap, avoiding unnecessary SD card writes. -
zram swap — configures
/etc/default/zramswap(lz4, 50% RAM) and enableszramswap.serviceso swap never touches the SD card. -
tmpfs runtime dir — provisions
/run/pimywaviatmpfiles.dforstatus.json,battery.json, andface.json(all RAM, zero SD wear). -
File installation — copies the binary to
/opt/pimywa/pimywa, the display adapter to/opt/pimywa/display/, and the power adapter to/opt/pimywa/power/. -
Env file at
/opt/pimywa/pimywa.env— creates the file on a fresh install, or migrates it on upgrade by appending only the keys that are missing, never overwriting keys you have already set (yourPIMYWA_API_KEYandPIMYWA_MCP_KEYare always preserved). -
MCP auth token — runs
pimywa auth setup --env-file /opt/pimywa/pimywa.envto generate and save a bearer token if none exists yet. The token is printed once to stdout — save it to your MCP client config. -
systemd services — installs and enables
pimywa-core.service, and optionallypimywa-display.serviceandpimywa-power.service. All services load/opt/pimywa/pimywa.envviaEnvironmentFile=. -
avahi — enables
avahi-daemonso the Pi is reachable athttp://<hostname>.local/. -
Overlay root (optional) — if
--overlaywas passed, enables the read-only overlayfs viaraspi-config nonint enable_overlayfs. The data directory/opt/pimywa/datamust be on a writable mount when the overlay is active.
After Installation
Once the services are running, your next steps are:Connect WhatsApp
Set
PIMYWA_GATEWAY=whatsmeow in the env file, restart pimywa-core, and scan the QR code from the dashboard.Connect an AI Agent (MCP)
Paste the MCP bearer token into your MCP client config to give Claude or any MCP-capable agent access to the switchboard.