Skip to content

Websocket api#1623

Open
mutatrum wants to merge 21 commits intobitaxeorg:masterfrom
mutatrum:websocket-api
Open

Websocket api#1623
mutatrum wants to merge 21 commits intobitaxeorg:masterfrom
mutatrum:websocket-api

Conversation

@mutatrum
Copy link
Collaborator

@mutatrum mutatrum commented Mar 21, 2026

This adds a new websocket endpoint: /api/ws/live. It streams partial updates in the format of the /api/system/info endpoint. The frontend is completely switched over of using this stream, so all fields are updates as soon as they are available. To improve this experience, the following things have also been changed:

  • The actual_frequency field is exposed. Frequency ramps are visible on the dashboard, even at boot. This also cleaned up some code in the asic component. This has been extracted to Show actual frequency on dashboard #1629;
  • There is only one websocket connection that's used on all screens, so no longer multiple calls to the info endpoint;
  • Share submit and the block header cards now have a blinking up and down arrow icon, similar as on the display (Add share notification icons to AxeOS #1212);
  • Device disconnect is smoother now, and reconnects quicker when the device comes online again;
  • The hashrate registers now poll every second and have smooth color transitions, so they pulsate;
  • The horizontal axis of the graph now has smart labels, showing second or minute labels if there's room, instead of only hour labels;
  • The vertical axis has been stabilised, the scale should now jump around a lot less;
  • The chart also has a much improved data retention system, where live data no longer pushes out historical data;
  • Average efficiency is now calculated on 1m hashrate and current power, instead of front-end datapoints;
  • The websocket log handler is unified into the same code;

A recording of loading the dashboard while the device is still starting:

Screencast.from.2026-03-21.23-32-44.webm

You can see the frequency ramp-up, settle into hashrate, receive work and submit shares.

@mutatrum mutatrum linked an issue Mar 21, 2026 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Mar 21, 2026

Test Results

49 tests  ±0   49 ✅ ±0   0s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7118aa1. ± Comparison against base commit 3035b7d.

♻️ This comment has been updated with latest results.

@mutatrum mutatrum marked this pull request as ready for review March 21, 2026 19:01
@WantClue WantClue self-requested a review March 22, 2026 19:24
@WantClue WantClue added this to the 2.14.0 milestone Mar 22, 2026
@WantClue WantClue added the enhancement New feature or request label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add share notification icons to AxeOS

2 participants