Skip to content

Configurable polling interval & per-request timeout #13

@takker99

Description

@takker99

Priority: P2
Category: UX / Reliability

Background:
Polling interval is hard-coded (1000 ms) and timeout fixed at 3000 ms. Different devices need tuning (slow slaves, noisy lines). Making these configurable improves adaptability.

Goal:
Allow user to set monitoring poll interval and per-request timeout (with sensible bounds & persistence).

Acceptance Criteria:

  • UI inputs (number or slider) for Poll Interval (100–60000 ms) and Timeout (500–10000 ms)
  • Values persisted in localStorage and applied on next monitor start / immediate for timeout
  • Validation & clamping with inline error hints
  • Tests verifying persistence and effect on timing (use fake timers)

Tasks:

  1. Add settings state & storage helpers
  2. Expose fields in UI (Settings panel or existing area)
  3. Use configured timeout in ModbusClient (inject or parameterize)
  4. Adjust monitoring loop to read interval dynamically
  5. Add tests (fake timers) for interval & timeout behavior

Definition of Done:
User can modify interval/timeout, values persist, tests green.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions