Skip to content

v2.4.0 — Control push

Choose a tag to compare

@CSCSoftware CSCSoftware released this 25 Sep 15:28
· 9 commits to master since this release

Dashboard controls can now be pushed to your program instead of polled.

Push instead of poll

Until now a program learned about a dashboard change — a slider moved, a switch flipped, a button pressed — only by polling GET /control. That costs a request every second or so even when nothing changes, keeps running when no Log Hub is there at all, and a button press only arrives at the next poll.

A program that runs its own HTTP server can now subscribe once:

POST /control/subscribe   { "port": 8080 }
POST /control/subscribe   { "url": "http://192.168.1.50:8080/hub", "ids": ["gain", "reset_btn"] }

With just a port, the hub calls back the address the request came from (IPv4-mapped IPv6 like ::ffff:192.168.1.50 is normalized). From then on every change — from the dashboard, from the AI via control_set, from a button press — is POSTed there right away, as the same flat { id: value } map GET /control returns. Your program can feed both through the same parser.

Delivery rules

  • Never blocks the dashboard — fire & forget with a 1.5 s timeout.
  • Ordered — one request in flight per subscriber; changes arriving meanwhile are merged, so a fast slider drag cannot arrive out of order. Verified: 20 changes against a deliberately slow receiver → 2 deliveries, last value correct, dashboard requests unaffected.
  • Self-cleaning — after 3 failed deliveries in a row the subscription is dropped and logged as a warn from source loghub. The hub never keeps knocking on a dead device. Subscribing is idempotent — just do it again.
  • Local network only — callbacks must be plain http to a loopback, private or link-local IP address. No DNS names, no redirects.

Push is an addition, not a replacement. GET /control works exactly as before — for programs behind NAT, without their own server, or in a browser. Keep a slow poll (~30 s) as a safety net; button counters make a missed push harmless.

POST /control/unsubscribe { url } removes a subscription, and aidex_log status lists them.

Documentation

MCP-API-REFERENCE.md has a new Dashboard & Control API section covering the panel endpoints, all control endpoints, control_get / control_set, the button-counter contract and the push rules. The README's Control API section explains poll vs. push.


npm install -g aidex-mcp@2.4.0 · Full changelog