ZAPBOX⚡️WEB INSTALLER (Headless)

Use with standard ESP32 dev boards (WROOM-32 based headless setups without display).

Other web installers:
T-Display-S3 | Touch 3.5" | ESP32-C3-21-1.

E-Layout ZapBox Headless

Example E-Layout

More e-layouts

1- Flash firmware

Your browser does not support installing things on ESP devices. Use Google Chrome or Microsoft Edge. Ah snap, you are not allowed to use this on HTTP!

Note: The configuration data can be deleted using "Erase device." Otherwise, it will be retained even with the new firmware. LOGS & CONSOLE is no needed.

Note on the headless version: The headless version does not support display. The terminal window can be used for status monitoring and error analysis. LEDs connected to GPIO 21 and GPIO 2 (onboard LED) provide visual status feedback.


2- Prepare connection

When you flash a new ESP32 or use “Erase device.” the ZapBox automatically starts in configuration mode and the ready LED will blink slow.”

→ The ZapBox is now ready to receive configuration data. ⚙️

If parameters have already been saved and need to be changed, you can also open CONF mode retrospectively by pressing and holding the BOOT button for at least 5 seconds.

Note: The connection will remain active for 3 minutes (180 seconds) before it is automatically disconnected. If data is already available. You can terminate the connection prematurely by pressing the BOOT button again.

Note: Once you establish a connection by clicking “Connect” below, some ESP32s with special communication chips (CP2102) will restart once, and you will need to reactivate configuration mode after connecting.


3- Load config values

How do I get the device string? Use Bitcoin Switch or ZapBox extension → Help

❌ Not connected
❌ No config mode
Export log files:
Save your settings:

Optional settings and functions


Select the configuration for GPIO pin 12 / Connector terminal 3


Choose pulsing/blinking mode for relay control

Note: Special modes control how the relay switches during the configured duration. "Standard" means simple on/off. Other modes create pulsing/blinking patterns with configurable frequency and duty cycle.


Special features for vending machines

The headless ZapBox supports two independent sensor inputs for vending machine operation. Each sensor can be configured separately with one of four operating modes. Sensors use INPUT_PULLUP (active LOW — connect sensor signal to GND when triggered).

When a sensor blocks payments: The onboard LED blinks very fast (10 Hz), the WebSocket connection to the LNbits server is disconnected so the server rejects any static QR code payments, and NFC Bolt Card taps are blocked. As soon as the sensor condition clears, the WebSocket reconnects automatically and normal operation resumes.

Function for GPIO pin 22 / Connector terminal 4

Function for GPIO pin 23 / Connector terminal 5

Operating modes explained:

Stop the advanceStops the relay action when the sensor detects a product (LOW signal). Minimum action time of 2 seconds before the sensor can trigger.
Monitoring product blockageAfter a payment, checks if the product exit is blocked (sensor LOW). Blocks further payments until the path is cleared.
Level monitoringContinuously monitors the supply bin fill level. When the sensor goes HIGH (no product detected), the bin is considered empty and payments are blocked until restocked.
Relay outputExternal relays can be connected to GPIO 22 and 23. They will always switch together with GPIO 12, regardless of whether Relay or Servo function is selected.

⚠ Important: When a sensor function is active on GPIO 22 or GPIO 23, those GPIOs are configured as INPUT_PULLUP and are no longer available as relay output channels (CH06/CH07). Make sure your LNbits switch configuration does not use these GPIOs when sensor features are active.


Multi-Channel Mode

The headless ZapBox supports up to 12 independent relay channels. Each channel maps to a GPIO output that can switch a relay, solenoid, or any other 3.3 V-driven load.

Available GPIO channels:

CH01GPIO 12(default)
CH02GPIO 13(always switches together with GPIO 12 – LED indicator)
CH03GPIO 14
CH04GPIO 16
CH05GPIO 19
CH06GPIO 22(reserved when Sensor 1 is active)
CH07GPIO 23(reserved when Sensor 2 is active)
CH08GPIO 25
CH09GPIO 26
CH10GPIO 27
CH11GPIO 32
CH12GPIO 33

Each channel is configured independently in your LNbits extension (zapbox / bitcoinswitch) – each switch gets its own QR code and amount. The device activates exactly the GPIO returned in the "paid" event – all channels are ready at boot. No additional configuration on the device is needed.

Note on GPIO 13: GPIO 13 always switches together with GPIO 12 and can be used as a status LED to visually signal each activation. GPIOs 22 and 23 are reserved as relay outputs as long as no sensor function is configured on them.


leave empty for normal mode (default)

placeholder

12 (default)

Note: As soon as something is entered in the "Wallet Invoice/Read Key" field, "THRESHOLD MODE" becomes active. "NORMAL MODE" then no longer works. The data specified in the bitcoinSwitch extension, such as amount, PIN, and time, is ignored. Only a payment to the wallet with the invoice key counts.

How can I use this? Either by receiving payment directly into the wallet or by using the "Pay Links" extension. There you can get a static LNURL and even a lightning address. Payments to these addresses then trigger the pin, provided the threshold value is reached or exceeded.


NFC-Module

The NFC Bolt Card functionality requires the LNbits extension "zapbox_extension". The ZapBox automatically detects which extension is installed on your server – no manual configuration required. If "zapbox_extension" is active, NFC Bolt Card payments are available out of the box. If only "bitcoinswitch_extension" (Bitcoin Switch) is installed, the ZapBox switches to that automatically.

Repositories from where the extensions can be downloaded:
https://installer.zapbox.space/extensions.json

PN532 NFC Module wiring NFC Tag 2 / NT3H2111 wiring

Bolt Cards & NTAG 21x (PN532, I²C 0x24, IRQ → GPIO 4) — Active NFC reader: the PN532 generates its own magnetic field and reads cards placed on it. Supports pre-programmed Bolt Cards for contactless Lightning payment. Also reads passive NFC tags of type NTAG 213, 215 and 216 — e.g. for LNURL-based payment tags. Works with all major Lightning wallets and PoS systems. No configuration required — the module is auto-detected on the I²C bus at startup.

Mobile Phones (NFC Tag 2 / NT3H2111, I²C 0x55, FD → GPIO 34) — Passive NFC tag: unlike the PN532, the NT3H2111 generates no field of its own. It is a true NTAG chip that delivers the LNURL autonomously as soon as the active field of an approaching mobile phone is detected. The ZapBox writes the current LNURL to the chip via I²C — the ESP32 is not involved during the tap. The FD (Field Detection) pin of the NT3H2111 is permanently wired to GPIO 34 and used to pause the PN532 RF field while a phone is near. GPIO 34 is input-only (no internal pull-up) — an external pull-up resistor (10 kΩ to 3.3 V) is required for the open-drain FD signal. Compatible with Android NFC Tools and wallets that support LNURL via NFC (e.g. Phoenix). No configuration required — auto-detected at startup.

Both modules operate independently and in parallel. If a module is not connected, it is simply skipped — normal operation is not affected.

Error Detection & Report

The ZapBox features a hierarchical error detection system with automatic diagnostics. Error states show distinct blink patterns on GPIO 21 and GPIO 2 (onboard LED):

Priority Error Type LED Pattern Description
1 (Highest) NO WIFI 1 blink WiFi network not connected
→ Wifi data correct?
→ WiFi signal too weak?
2 NO INTERNET 2 blinks Internet connectivity lost
→ Internet accessible?
3 NO SERVER 3 blinks LNbits server unreachable
-> Server hardware down?
-> Device string correct?
4 (Lowest) NO WEBSOCKET 4 blinks WebSocket protocol/handshake failure
-> LNbits down?
-> Device string correct?

Note: Higher priority errors override lower priority error displays. Each error pattern has a 2 second pause between sequences. Use the serial terminal to monitor detailed error messages.

LED Status Indicators

Note: The headless version (ESP32 Dev Module without display) does not have a visual Report page. Use the serial terminal to monitor all errors and status messages.

Common Wallet Error

If a wallet scanning the QR code shows an error message, here's what it means:

"bitcoinswitch ... is disabled" → The Bitcoin Switch was actively disabled in LNbits

"No active bitcoinswitch connections" → The handshake between the wallet and ZapBox failed. -> Wait or restart the ZapBox to re-establish the connection.

Other Errors

Relay does not switch, but payment was successful → Wrong GPIO pin configured in LNbits?

NFC Extension Mismatch

If you tap an NFC Bolt Card or NTAG21x tag and the serial log shows:

[WARN][NFC] Bolt Card tap detected – NFC is not supported by the active extension (bitcoinswitch).
[WARN][NFC] To use NFC / Bolt Cards, switch to zapbox_extension (apiPath = "zapbox").

This means the device is configured with the bitcoinswitch_extension, which does not have an NFC endpoint (/api/v1/nfc/). NFC payments are only supported by the zapbox_extension.

Solution:

This is not a hardware problem – the NFC reader works fine. It’s purely a server-side configuration issue.

Typical NFC Error Messages

{"detail":"LNURLW callback error: Payment failed - "}
The sending wallet and the receiving wallet in LNbits are the same. The Bolt Card wallet and the receiving wallet must be different wallets in LNbits.

Troubleshoot

Connection problems:

Further note:

Some ESP32s must first be put into mode before flashing or transferring data. Otherwise, they will refuse to transfer. Try these:

Pinout:

Source: esp32.implrust.com

Helpful links

Main page: https://zapbox.space
Web installer – T-Display-S3: https://installer.zapbox.space
Web installer – Headless (esp32dev): https://installer.zapbox.space/headless/
Further documentation: https://ereignishorizont.xyz/en/zapbox-en/
GitHub – ZapBox: https://github.com/AxelHamburch/ZapBox
GitHub – zapbox_extension: https://github.com/AxelHamburch/zapbox_extension
Extension manifest source: https://installer.zapbox.space/extensions.json
Web Installer Backups: https://ereignishorizont.xyz/zapbox-backup/


LNbits: https://lnbits.com/
GitHub – bitcoinswitch_extension: https://github.com/lnbits/bitcoinswitch_extension
bitcoinSwitch web installer: https://bitcoinswitch.lnbits.com/
MakerBits Telegram Gruppe: https://t.me/makerbits