Flashing
Use the method for your board. The ESP8266 and the SmallTV Pro install over the air from their stock web UI. The ESP32-C2 and the NM-TV-154 install over the USB cable with esptool. On any board, back up the stock image first so you can go back.
Get the firmware image from the Actions tab (latest build run) or the Releases page, or build it yourself.
SmallTV (ESP8266)
Section titled “SmallTV (ESP8266)”Over the air, from the stock web UI
Section titled “Over the air, from the stock web UI”The stock GeekMagic firmware has an OTA updater at /update that accepts any valid ESP8266 image, so you can install without opening the device.
- Find the device IP. It is shown on screen or in the stock Settings app
- Browse to
http://<device-ip>/update - Upload
smalltv-mod-firmware.bin. The device reboots into this firmware
Or upload smalltv-mod-firmware-lean.bin, the build without Home Assistant screens, the usage meter and theme clocks, which leaves more heap for the radar and the cash.ch tickers. Both files install the same way, and you can switch between them later. See Which release file to download.
Back up the stock firmware first if you want the option to return to it. The stock image is not published here, so read it from your own device over the UART header before you overwrite it.
UART header, for recovery or a direct install
Section titled “UART header, for recovery or a direct install”The serial header always works. Use it if OTA is not available, if the device will not boot, or if you prefer to flash directly.
Open the case first: remove the two screws on the underside and lift out the inner tray that holds the PCB. The board has six labelled pads:
| Pad | Wire it to |
|---|---|
3V3 |
3.3 V on the adapter |
GND |
GND on the adapter |
TXD0 |
the adapter’s RX |
RXD0 |
the adapter’s TX |
GPIO0 |
GND, to enter flash mode (only during power-on) |
RST |
optional, tie to GND briefly to reset |
Use a 3.3 V USB-UART adapter. Hold GPIO0 to GND while powering on to enter flash mode, then release it. The pad map is from ViToni/esphome-geekmagic-smalltv.
Back up the stock image first if you might want it back:
esptool.py --port COM5 read_flash 0x0 0x400000 stock-backup.binThen flash. On a SmallTV-ultra, erase first so the stock partition layout is removed too. On a plain SmallTV the erase is optional and harmless:
# clear the old layout (partition + data), then write the firmwareesptool.py --port COM5 erase_flashesptool.py --port COM5 write_flash 0x0 smalltv-mod-firmware.binThat single image has everything the ESP8266 needs, so there is no separate partition file to flash. On first boot it recreates its own filesystem and opens the SmallTV-Setup portal.
SmallTV-ultra (stock updater says “Not Enough Space”)
Section titled “SmallTV-ultra (stock updater says “Not Enough Space”)”The SmallTV-ultra is the same ESP-12F (ESP8266) as the original SmallTV, with the same 4 MB flash, 1.54” 240×240 ST7789 panel and pin map. Only its stock firmware differs. The “Ultra” firmware (for example Ultra-V9.0.50) reserves most of the flash for image and GIF storage, which leaves its OTA updater a small app slot. Uploading smalltv-mod-firmware.bin at /update fails with Update error: ERROR[4]: Not Enough Space, although the flash has plenty of free user space, because the full image does not fit that slot.
The fix is a two-step install through a small loader, without soldering. The loader is an image of about 316 KB that fits the stock slot. Once running, it uses this firmware’s own 4m1m flash layout, whose app region is large, so the full image fits on the second step.
- Get
smalltv-mod-loader.binfrom the Releases page - Browse to
http://<device-ip>/updateand uploadsmalltv-mod-loader.bin. It fits the stock slot, and the device reboots into the loader - The loader starts an open WiFi access point named
SmallTV-Loader. Join it and browse tohttp://192.168.4.1/update - Upload
smalltv-mod-firmware.binthere. It fits because the loader uses this firmware’s flash layout, which gives the sketch 1,044,464 bytes for an image of 948,000 bytes (v3.14.0). The device reboots into the full smalltv-mod - It comes up in the usual
SmallTV-Setupcaptive portal for WiFi. From here it is a normal ESP8266 smalltv-mod device
If the browser shows ERR_CONNECTION_RESET during the upload and the loader page comes back a few minutes later, the upload was cut off before it reached the device. Stay joined to SmallTV-Loader for the whole upload (it has no internet, and phones tend to leave such networks), and try another browser: in #151 the upload failed in Opera and worked in Edge. curl -F "firmware=@smalltv-mod-firmware.bin" http://192.168.4.1/update shows the loader’s own answer.
After this first install, normal OTA works from the System tab, because this firmware’s layout has room for two sketch copies. You need the loader only once.
The loader path does not erase the flash, so the ESP8266’s RF settings stored by the stock firmware remain. If the device then never joins your WiFi and the router log shows router refused (203), check that it runs v3.4.0 or later, which resets those settings before every join. If it still fails, erase the flash over the serial header (esptool.py --port COM5 erase_flash) and write the image as in the UART recovery steps.
If the loader does not come back up, flash over the serial header instead. The board is a plain ESP-12F, so the UART recovery steps above apply: esptool.py --port COM5 write_flash 0x0 smalltv-mod-firmware.bin.
SDPro Smart Weather Clock
Section titled “SDPro Smart Weather Clock”A community tester confirmed it works on a unit (issue #76). The SDPro is an unbranded SmallTV-ultra clone with SDPro_V1.x firmware. A teardown shows the same ESP-12 (ESP8266), 4 MB flash, ST7789 panel and pin map as the SmallTV, so it runs smalltv-mod-firmware.bin.
Two things in the stock firmware shape the install:
- The update page refuses a file whose name does not start with
SDP. The check runs only in the browser, so renaming the file is enough - The stock flash layout keeps a 3 MB filesystem, which limits an upload to about 550 KB.
smalltv-mod-firmware.bin(948,000 bytes on v3.14.0) andsmalltv-mod-firmware-lean.bin(779,072 bytes) do not fit, andsmalltv-mod-loader.bin(315,920 bytes) does
So the install is the SmallTV-ultra’s two steps with a renamed loader:
- Rename
smalltv-mod-loader.bintoSDP_loader.binand upload it through the stock update page - Join the open
SmallTV-Loaderaccess point and browse tohttp://192.168.4.1/update. The screen stays dark while the loader runs, because the loader has no display code - Upload
smalltv-mod-firmware.binthere. On first boot the firmware formats its filesystem, since that area still holds part of the stock volume, and opens the usualSmallTV-Setupportal
The USB-C port is power only and the unit has no button, so the only recovery from a failed flash is over the ESP-12’s UART pads (TX, RX, GPIO0, GND, 3V3, EN; GPIO0 to GND for flash mode). Before step 1, find them and back up the stock image (esptool.py --port COM5 read_flash 0x0 0x400000 stock-backup.bin). The UART recovery steps then apply as for any ESP-12.
SmallTV (ESP32-C2 / ESP8684)
Section titled “SmallTV (ESP32-C2 / ESP8684)”The stock firmware on the ESP32-C2 has no OTA path, so the first install goes over the USB-C cable. The onboard CH340C handles auto-reset, so you do not need a button. You need a system Python with esptool (pip install esptool).
Back up the stock image first
Section titled “Back up the stock image first”python -m esptool --chip esp32c2 --port COM3 read_flash 0x0 0x400000 stock-backup.binKeep stock-backup.bin somewhere safe. Writing it back with write_flash 0x0 stock-backup.bin returns the device to factory state at any time.
Write this firmware
Section titled “Write this firmware”Download smalltv-mod-firmware-c2.factory.bin from the Releases page. It is a single merged image with the bootloader, partition table and app (a local build produces the same file as firmware.factory.bin). Write it at offset 0:
python -m esptool --chip esp32c2 --port COM3 --baud 921600 write_flash 0x0 smalltv-mod-firmware-c2.factory.binWith a source checkout, pio run -e smalltv_c2 -t upload does the same.
NM-TV-154 (classic ESP32)
Section titled “NM-TV-154 (classic ESP32)”The procedure is the same as for the ESP32-C2, with --chip esp32 and smalltv-mod-firmware-esp32.factory.bin from the Releases page (or build it with pio run -e smalltv_esp32).
This board has two images. The plain one above has no WireGuard client, and smalltv-mod-firmware-esp32-wg.factory.bin has one, for reaching the device from outside your LAN. They share a partition table, so you can flash either one here and switch later with an ordinary over-the-air upload in the System tab. Which release file to download explains the switch and its flash cost.
Back up the stock image first
Section titled “Back up the stock image first”The NMMiner stock firmware is not published anywhere official, so this backup is your only way back:
python -m esptool --chip esp32 --port COM3 read_flash 0x0 0x400000 stock-backup.binIf esptool flash_id reports more than 4 MB of flash, adjust the read length to match.
Write this firmware
Section titled “Write this firmware”python -m esptool --chip esp32 --port COM3 --baud 921600 write_flash 0x0 smalltv-mod-firmware-esp32.factory.binSwap in smalltv-mod-firmware-esp32-wg.factory.bin for the image with the WireGuard client.
With a source checkout, pio run -e smalltv_esp32 -t upload does the same, or pio run -e smalltv_esp32_wg -t upload for the WireGuard image.
SmallTV Pro (classic ESP32, 8 MB)
Section titled “SmallTV Pro (classic ESP32, 8 MB)”The SmallTV Pro has no USB-serial chip, and its USB-C port is power only. You can install over the air from the stock web UI (no tools, no soldering), or over an internal UART header (you open the case and need a 3.3 V USB-UART adapter).
Over the air, from the stock web UI
Section titled “Over the air, from the stock web UI”The stock firmware has an OTA updater, like the ESP8266 SmallTV. This firmware’s 8 MB partition layout matches the stock table exactly (same OTA slots, verified on a live device), so the stock updater can install it directly:
- Find the device IP (shown in the stock Settings app)
- Browse to
http://<device-ip>/update - Upload
smalltv-mod-firmware-esp32-pro.bin(the plain app image, not the.factory.bin) from the Releases page. The device reboots into this firmware
This path keeps the stock bootloader and partition table, and it cannot be undone without a backup. The stock image is not published anywhere official, so if you want the option to return to stock, take the UART backup below before flashing OTA.
UART header, for backup, recovery, or a direct install
Section titled “UART header, for backup, recovery, or a direct install”Open the case. The PCB has a 6-pad serial header (pad map from the HA community thread):
| Pad | Function | Wire it to |
|---|---|---|
| 1 (square) | GND | GND on the adapter |
| 2 | TX | the adapter’s RX |
| 3 | RX | the adapter’s TX |
| 4 | 3V3 | 3.3 V on the adapter |
| 5 | GPIO0 | GND during power-on to enter download mode |
| 6 | RST | optional, tie to GND briefly to reset |
Hold pad 5 (GPIO0) to GND while the device powers on, then release it. Back up the full 8 MB stock image first:
python -m esptool --chip esp32 --port COM3 read_flash 0x0 0x800000 stock-backup.binWriting it back with write_flash 0x0 stock-backup.bin returns the device to factory state at any time. To install this firmware over UART instead of OTA, write the merged image:
python -m esptool --chip esp32 --port COM3 --baud 921600 write_flash 0x0 smalltv-mod-firmware-esp32-pro.factory.binWith a source checkout, pio run -e smalltv_esp32_8mb -t upload does the same over the adapter’s COM port.
After the first flash
Section titled “After the first flash”Every board then updates from the browser. Open the web UI’s System tab and either let the device pull the newest GitHub release (each board fetches its own image) or upload a firmware file by hand. The manual upload takes the plain app image (smalltv-mod-firmware*.bin), not the .factory.bin.
The ESP32 boards download and flash in place. From 2.7.0 the ESP8266 updates at boot instead, because the download’s 16 KB TLS buffer fits only before the firmware’s features start. The device queues the update, reboots, shows updating... while it downloads, then reboots again into the new version. Expect two reboots and a couple of minutes. If the download fails, the device boots normally and the System tab shows why.
Recovery
Section titled “Recovery”- Re-flash your stock backup or this firmware with the method for your board
- Factory reset in the System tab wipes saved settings and restarts in SETUP MODE. It does not change the firmware
- On the ESP32 boards, a device left unresponsive by a bad flash still enters download mode, so esptool can always rewrite it: over USB on the ESP32-C2 and the NM-TV-154, and over the internal UART header on the SmallTV Pro