Pinscope on the ESP8266

Remote access, logs, metrics and firmware updates for the ESP8266 with the ESP8266 RTOS SDK: a component, a key in menuconfig, one call.

With an AI assistant. Copy the instructions and paste them into Claude, Cursor, Copilot or ChatGPT in your project: it adds Pinscope the way this page says, and asks you for the project key instead of writing it into your code. Or give it the link: esp8266.md.

This page is for ESP8266_RTOS_SDK 3.4. The Arduino core for the ESP8266 is not supported yet.

Try the sample first

With the ESP8266_RTOS_SDK 3.4 set up:

git clone https://github.com/pinscope-dev/pinscope-esp8266 && cd pinscope-esp8266
export IDF_PATH=~/esp/ESP8266_RTOS_SDK
PINSCOPE_KEY=psk_... WIFI_SSID=... WIFI_PASSWORD=... idf.py build flash monitor

1. Connect

Add the component

Get it from https://github.com/pinscope-dev/pinscope-esp8266 and put the pinscope folder in your project's components/ folder, or point EXTRA_COMPONENT_DIRS at it.

Enter your project key

In the dashboard, open your project and the tab Connect a device and copy the project key. Enter it in idf.py menuconfig under Pinscope.

Start it

#include "pinscope.h"

void app_main(void)
{
    /* your WiFi and web server setup */

    pinscope_start(NULL);
}

Call it once, after tcpip_adapter_init() and esp_event_loop_create_default(). It does not need WiFi to be connected yet and reconnects by itself. The device needs to reach connect.pinscope.dev on TCP port 443, outbound only.

2. Reach the device

Whatever listens on port 80 of the device is served at its own HTTPS address, as on ESP32. See Reach the device.

3. Logs and metrics

Pinscope's own lines reach the Logs tab, and anything you send with pinscope_log(). ESP_LOG output stays on the serial port.

MetricMeaning
heap_free, heap_minFree heap now, and the lowest it has been
stack/pinscopeStack the Pinscope task has never used
rssi, uptime_sWiFi signal, and time since boot
pinscope_metric("water_level_cm", 42.5);

4. Crashes

The SDK keeps no backtrace across a reset, so the dashboard shows that the device restarted after a crash (reset reason panic, or a watchdog), not where it crashed.

5. Firmware updates

The partition table needs two OTA slots: in menuconfig, Partition Table → Factory app, two OTA definitions (4 MB of flash). Upload build/<project>.bin under Firmware and press Update firmware on the device. The image is written to the spare slot and booted. The SDK has no rollback: a new image that cannot connect stays on the device until it is flashed again by cable, so try each build on a device at hand first.

Memory

About 7 KB of RAM: 4.2 KB of buffers, queue and state, and a 3 KB task stack. No TLS library, which on the ESP8266 would take a large share of the free heap.

If it does not work

What you seeWhat to check
the project key is missingEnter the key in idf.py menuconfig under Pinscope
No online at line, no errorWiFi is not connected yet, or the network does not let the device reach connect.pinscope.dev on TCP port 443
There is no Update firmware buttonThe partition table has no second OTA slot