Skip to content

Feat/sensor integration 2 - #24

Merged
CarlosVasquez04 merged 20 commits into
mainfrom
feat/sensor-integration-2
Apr 14, 2026
Merged

Feat/sensor integration 2#24
CarlosVasquez04 merged 20 commits into
mainfrom
feat/sensor-integration-2

Conversation

@tylerlv3

@tylerlv3 tylerlv3 commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

This branch delivers end-to-end sensor integration (config, workers, simulated and real clients, metrics APIs) and moves the routine builder to the Python service (SQLite-backed routines, backend execution, HMI routine editor and docs). It also includes HMI polish (groups vs routines in the side panel, compact grid when the panel is open, control-source indicators, clearer “windows” copy) and container/dev workflow updates (e.g. compose and service/web images where applicable).

This branch is also updated with main's DIAL changes.

Type

  • Feature
  • Fix
  • Docs
  • Chore

Testing

  • Backend: from svc/, run uv run pytest (full suite).
  • Frontend: from web/, run npm run build (and npm run dev for local UI).
  • HMI: open groups panel — create/edit/delete groups, tint group, confirm audit entries; open routines — create/run/stop routines, confirm logs and persistence across service restart.
  • Sensors: with sim config, confirm /metrics/latest, history, and sensor log endpoints (and any watcher/sim paths you use); with real config, smoke-test on hardware only in a safe environment.
  • Real mode / Halio: if applicable, smoke single-window and multi-window group tint against a non-production site.

Risk and rollout

  • Routines: server-side execution and DB schema affect production data under svc/data/; validate backup/restore and that old DBs migrate cleanly.
  • Sensors: real drivers, serial paths, and file watchers can fail loudly or block workers; confirm svc/.env and svc/data/sensors_config.json for each environment.
  • Merge surface: large overlap on svc/main.py, web/src/api.ts, and grid/side-panel components; regression-test HMI flows after deploy.

Checklist

  • Issue linked if applicable
  • Added or updated docs
  • CI green
  • At least one reviewer not the author

CarlosVasquez04 and others added 20 commits December 1, 2025 21:53
… T10A driver, sensor manager with workers, configuration support, and new metrics API endpoints.
…results to the backend. Accessible at /metrics/latest
- Add [JetiSpectravalFileWatcher] to ingest sensor data from  files.
- Implement dynamic directory watching: automatically detects and switches to the newest capture file.
- Refactor [JetiSpectravalSimClient] to act as a pure data generator (sim mode).
- Update [manager.py] to coordinate Watcher and Sim clients.
- Config updated to use directory-based output paths for automatic file rotation support.

Frontend:
- Add [LiveGraph] component using  for real-time Lux visualization.
- Integrate graph into .
- Optimize polling intervals for responsiveness.
…of python for now as it seems it may be moore user friendly as we can run it sandboxed in the browser. Will reevaluate and decide if running python server side is a better option. Allows for saving routines, setting intervals, and access to currently available sensor data
…update mappings

- Migrated the Routine Engine from frontend JavaScript execution to Python backend subprocesses for robust, asynchronous execution.
- Implemented SQLite persistence for active and saved routines, ensuring they cleanly survive complete server restarts.
- Refactored the UI to use backend APIs instead of browser local storage for state and logs.
- Fixed a critical database schema bug that caused exponentially recursive runaway subprocess loops on restart.
- Added routine actor tagging to backend commands for clearer audit logging.
- Integrated React Router to support multi-page navigation.
- Built a comprehensive Routine Builder Documentation page with syntax guides, API wrapper references, and example scripts.
- Updated the window mapping configuration with the correct Halio UUIDs.
Add end-to-end support for sensor logging and real sensor integrations. Introduces SensorLogEntry model plus two new endpoints: GET /logs/sensors (paginated/filterable) and /logs/sensors/export (CSV export). Adds spectral data files and a spectral_metrics module, multiple real and sim sensor clients (EKO C-BOX Modbus, JETI SPECFIRM/file watcher, T-10A sim/real), updates sensor manager/state to surface log entries, and adds related tests. Updates docs and examples: new docs/real_sensor_setup.md runbook, expanded svc/README and svc/.env.example for sensor config and sim toggles, and .gitignore entries for service runtime files. Also includes small frontend and styling tweaks and other housekeeping (pyproject, main, tests).
- Removed legacy visual steps routine builder
- Added dedicated Routine Logs tab to LogsPanel with linkable actors
- Reorganized RoomGrid layout to maintain 1-on-top, 3x3-below structure
- Added specific actor tags ('manual', 'group') to API client commands
- Added descriptive tooltips and SVG icons to Audit Log column headers
- Enforced Apply button requirement for panel slider quick actions
- Removed quick tint actions from group control for UI consistency
Resolve conflicts: keep main DIAL/static serving and group API behavior;
preserve sensor workers, routine resume, RoutineCodeEditor side panel,
and compact-grid indicators. Single Windows grid + name-sorted panels.

Made-with: Cursor
@CarlosVasquez04
CarlosVasquez04 merged commit ca313fb into main Apr 14, 2026
1 check passed
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.

2 participants