Use with LILYGO T-Display-S3. Headless version see here.
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.
When you flash a new ESP32 or use “Erase device.” the ZapBox automatically starts in configuration mode and displays the following message: “CONF / SERIAL CONFIG MODE.”
→ The ZapBox is now ready to receive configuration data. ⚙️
If parameters have already been stored and need to be changed, you can also open CONF mode retrospectively:
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 NEXT button, touching the display, or pressing the external button.
How do I get the device string? Use Bitcoin Switch or ZapBox extension → Help
Note: The default is Bech32. LUD-17 is easier to scan, but is not yet supported by all types of wallets.
Note: The LED button YES function hides the texts HELP and NEXT on the display.
Function of the LED button - press:
• once => Change display / product
• once and hold => Help page
• several times => Report page
• once briefly and then hold at least 5 seconds => CONF page
ZapBox Mode: Activate up to 4 GPIO pins (12, 13, 10, 11) with unique QR codes. Product labels and LNURLs are automatically retrieved from your LNbits switch configuration. Use NEXT button, touch gestures (swipe ←→) or external button (if available) to navigate between products. Servo mode requires additional settings. See below.
Note: The Threshold function is only compatible with the default Compact - 1 channel mode.
-> To enable the servo configuration, please select the ZapBox Mode - Servo
Servo Configuration
Up to 4 channels can be controlled.
Pin 12: Relay (on/off, standard)
Pin 13: 180° servo motor (0–180-degree positioning)
Pin 10: 360° servo motor (360-degree multiturn)
Pin 11: Relay (on/off, also usable for ambient lighting)
The "One for All" function allows all channels to be triggered simultaneously. To do this, you only need to configure pin 12 and, if necessary, a servo. In addition, the channels can also be configured and activated individually. To do this, the pins must be configured in LNbits and the servos must be set up.
The servos are activated by setting a parameter value ≠ 0.
Note on One-for-All Mode: If only GPIO pin 12 is configured in LNbits, all other outputs will switch using the same timing. However, once a GPIO pin (13, 10, or 11) has its own configuration entry and therefore its own timing, this timing will be used for that pin independently of how pin 12 is switched.
Positioning 0°–180° or 180°–0°
0 = max speed / 1000 = 1 second for start/stop
Please note that the 180° servo always returns to its starting position after completing the switch function.
Continuous rotation 360° / 90 = stop / <90 = CCW / >90 = CW
0 = spin until action time ends
Servos become active when their values are non-zero. Special Mode (blink, pulse, etc.) works for relays (Pin 12/11) but not for servo pins (Pin 13/10).
NPN input on Pin 2 (light barrier / limit switch)
Pin 11 is always ON, except in screensaver mode.
Notes:
Stop the advance: A trigger from e.g. a light barrier (NPN) stops the action after 2 seconds at the earliest.
Monitoring product blockage: The (NPN) input (light barrier/limit switch) displays the message "PRODUCT IN THE EJECTOR - Remove the product" and no further payment is possible until the input is free again.
Level monitoring: The (NPN) input monitors the fill level of a magazine or container. As long as Pin 2 is pulled LOW (sensor active), everything is fine. As soon as Pin 2 is HIGH (sensor free), all payment options are blocked and the message "THE SUPPLY BIN IS EMPTY - Please restock it" is displayed. Payments are re-enabled automatically once the sensor is active again.
Note on "Ambient lighting switch": With pre-selection enabled, channel 4 is switched depending on the display backlight. Whenever the display is on, channel 4 is activated, thus, for example, the lighting for a vending machine. If the display backlight switches off because the screensaver mode is active, channel 4 is also deactivated.
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.
Control when Bitcoin price/block info is shown
E.g. USD, EUR, GBP, JPY, CHF, TRY, CAD, BRL, CUP, etc.
OFF: No ticker shown (Duo/Quattro: productSelectionScreen; Single: only QR code)
ON - always: Ticker overlays screen, navigate with NEXT/swipe to show products temporarily (returns after timeout)
ON - when selecting: Single: Ticker only visible for a short time after NEXT/swipe. Duo/Quattro: productSelectionScreen → products → ticker (at end of product cycle)
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.
1-120 minutes (default: 5)
1-120 minutes (default: 30)
Use Cases: Energy saving (screensaver ~80-90%, light sleep ~99%, freeze ~99.9%), reducing device heat, extending display lifespan in always-on scenarios.
⚡ Light sleep is recommended for devices with an external LED button. In freeze mode, only BOOT and HELP buttons can wake the device.
Note: T-Display-S3 with touch, only the screensaver mode can be used. The ESP32 cannot be reactivated via touch while in Deep Sleep mode.
NFC Bolt Cards work reliably and securely with all major Lightning wallets and PoS systems. This is the recommended default.
NFC card emulation (experimental): The ZapBox emulates an NFC tag so customers can pay by tapping their phone. Currently only supported by Phoenix Wallet, and even then, only with certain limitations. Other wallets may not even recognize the NFC tag. For best compatibility, use the QR code format "LNURL in LUD-17" instead.
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
The ZapBox features a hierarchical error detection system with automatic diagnostics. Errors are displayed on screen with abbreviations:
| Priority | Error Type | Abbreviation | Description |
|---|---|---|---|
| 1 (Highest) | NO WIFI | NW | WiFi network not connected → Wifi data correct? → WiFi signal too weak? |
| 2 | NO INTERNET | NI | Internet connectivity lost → Internet accessible? |
| 3 | NO SERVER | NS | LNbits server unreachable -> Server hardware down? -> Device string correct? |
| 4 (Lowest) | NO WEBSOCKET | NWS | WebSocket protocol/handshake failure -> LNbits down? -> Device string correct? |
Note: Higher priority errors override lower priority error displays. For example, if WiFi is down, all other checks are skipped and only "NO WIFI" is shown.
All errors with their occurrence counts (0-99) are logged on the Report page. To access the Report page:
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.
Relay does not switch, but payment was successful → Wrong GPIO pin configured in LNbits?
If you tap an NFC Bolt Card or NTAG21x tag and see "NFC not supported" on the display (shown for 5 seconds), 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.
{"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.
Some ESP32s must first be put into mode before flashing or transferring data. Otherwise, they will refuse to transfer. Try these:
Source: lilygo.cc
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
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