Skip to content

[7324] Replace HTTP polling of instance / device status with MQTT-over-WS#7573

Open
n-lark wants to merge 14 commits into
mainfrom
7324-mqtt/ws-device-instances
Open

[7324] Replace HTTP polling of instance / device status with MQTT-over-WS#7573
n-lark wants to merge 14 commits into
mainfrom
7324-mqtt/ws-device-instances

Conversation

@n-lark

@n-lark n-lark commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

See test plan: #7324 (comment)
See details: #7324 (comment)

Related Issue(s)

Resolves #7324

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

… the team channel, add Pinia store, connect for Instances list only
@n-lark n-lark self-assigned this Jun 18, 2026
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.06173% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.07%. Comparing base (01e79e2) to head (6ba8c73).

Files with missing lines Patch % Lines
forge/comms/aclManager.js 86.66% 2 Missing ⚠️
forge/db/controllers/Project.js 97.29% 1 Missing ⚠️
forge/routes/api/projectActions.js 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7573      +/-   ##
==========================================
+ Coverage   76.95%   77.07%   +0.11%     
==========================================
  Files         411      411              
  Lines       21094    21170      +76     
  Branches     5141     5161      +20     
==========================================
+ Hits        16233    16316      +83     
+ Misses       4861     4854       -7     
Flag Coverage Δ
backend 77.07% <95.06%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…n't intermix and broadcast a stale instance status
…vices, fixing the cache test to use a real project id
Comment thread forge/comms/aclManager.js
// - ff/v1/<team>/p/<instance>/state
{ topic: /^ff\/v1\/[^/]+\/p\/[^/]+\/state$/ },
// - ff/v1/<team>/d/<device>/state
{ topic: /^ff\/v1\/[^/]+\/d\/[^/]+\/state$/ },

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So devices already publish their raw status to the …/status topics, which forge subscribes to in order to collect it.

If forge re-published the browser-facing copy onto that same …/status topic, it would receive its own message back and loop forever, so the browser updates use a separate …/state topic that nothing on the backend listens to.

Also named instances .../state for consistency. I was also considering .../liveStatus to imply FE, not sold on the name.

…shing, and only mask a real stop on device restarts
@n-lark n-lark deployed to staging June 23, 2026 19:31 — with GitHub Actions Active
@n-lark n-lark marked this pull request as ready for review June 23, 2026 20:19
@n-lark n-lark requested a review from cstns June 23, 2026 20:19
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.

Replace HTTP polling of instance / device status with MQTT-over-WS

1 participant