Skip to content

feat: opt-in local stats API and settings page (#12) - #59

Open
mb26-dev wants to merge 2 commits into
SneezeGUI:mainfrom
mb26-dev:feature/local-stats-api
Open

mb26-dev wants to merge 2 commits into
SneezeGUI:mainfrom
mb26-dev:feature/local-stats-api

Conversation

@mb26-dev

@mb26-dev mb26-dev commented Nov 7, 2026

Copy link
Copy Markdown

Implements the opt-in local stats API scoped in #12.

What it adds

  • Synchronous WebServer + mDNS, no new libraries. Disabled by default: no task and no socket exists while it is off, so there is no hashrate cost.
  • AxeOS/ESP-Miner compatible /api/system/info and /api/system/statistics, native /api/sparkminer, /api/log (pool/stratum events, no wallet or passwords).
  • Config portal toggle ("Local Stats API"), wallet masked by default.
  • Authenticated /settings page (WiFi, pools, display, access) with fallback to the previous WiFi if the new one fails.
  • WEB_API.md, README section, changelog entry.

Also included

  • Compact layout for the 170x320 LILYGO T-Display S3.
  • S3: miner_sha256_header runs from IRAM. The hot path is ~20 KB and did not fit the 16 KB instruction cache (~1.3 KH/s measured before, ~49 KH/s after).
  • Pool URL accepts host:port and stratum+tcp://host:port.
  • Landscape spacing fix so the LAN panel stays on screen on 240 px high panels (portrait unchanged).

Tested on hardware

  • LILYGO T-Display S3 and ESP32-2432S028 (CYD, 2x USB): API and settings page reachable, settings saved, polled by Home Assistant (Bitaxe integration).
  • The landscape spacing fix on the CYD (320x240).
  • Hashrate on the CYD with the API enabled is about 697 KH/s vs. about 701 KH/s without (within noise).
  • Pool compatibility depends on the pool: some pools reject unknown user agents; /api/log shows why.

Not tested

  • Other boards and HashWatcher itself.
  • The Home Assistant YAML example in WEB_API.md.

Home Assistant note: the Bitaxe custom integration truncates hashRate (GH/s) to an integer, so a few hundred KH/s show as 0. WEB_API.md shows a REST sensor on /api/sparkminer instead.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Un1JuUyRQV47YNQ9dEWRQC

mbergmann26-droid and others added 2 commits November 7, 2026 09:46
…neezeGUI#12)

Adds an optional AxeOS/ESP-Miner compatible HTTP API (/api/system/info,
/api/system/statistics), a native /api/sparkminer endpoint, an event log,
mDNS announcement and an authenticated /settings page. Disabled by default;
no task or socket exists while it is off.

Also: compact layout for the 170x320 LILYGO T-Display S3, IRAM placement of
the S3 SHA hot path (~1.3 -> ~49 KH/s), host:port / stratum+tcp:// pool URLs,
and a landscape spacing fix so the LAN panel stays on screen on 240 px high
panels (portrait unchanged).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Un1JuUyRQV47YNQ9dEWRQC
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Un1JuUyRQV47YNQ9dEWRQC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant