Commit Graph

288 Commits

Author SHA1 Message Date
Yinyin Liu f8b9428ce4 Merge feature/ticket-dashboard: backend data layer, CRUD, AI diagnosis service, 9 endpoints 2026-03-06 09:52:52 +01:00
Yinyin Liu 662810db98 fixed weeks to days in monthly report system 2026-03-05 14:09:19 +01:00
Yinyin Liu 9cee5398d4 added ticket dashboard backend: data models, CRUD, AI diagnosis service, and 9 controller endpoints
Week 1 of ticket dashboard MVP — backend only:
- 4 new SQLite tables: Ticket, TicketComment, TicketAiDiagnosis, TicketTimelineEvent
- CRUD methods in Database/ partial classes with cascade delete
- TicketDiagnosticService for async Mistral AI diagnosis (fire-and-forget)
- 9 admin-only Controller endpoints for ticket CRUD, comments, and detail view
- Ticket cleanup integrated into Delete(Installation) cascade
2026-03-05 14:03:34 +01:00
Yinyin Liu 534b00aeb8 removed accumulating duplicate/stale WebSocket entries over time 2026-03-05 09:17:06 +01:00
Yinyin Liu 4ac1bc78ab automatically delete S3 files which are over 1 year 2026-03-04 14:04:13 +01:00
Yinyin Liu f82190afc1 improved delete installation logic with S3 bucket purge and delete and reminder for manual check 2026-03-04 12:46:18 +01:00
Yinyin Liu 7aacddd761 Added SodistoreGrid as an empty templated and built S3 bucket creation pipeline 2026-03-04 10:59:08 +01:00
Yinyin Liu 79f695f9b4 check master admin account name from innov to inesco 2026-03-04 09:45:15 +01:00
Yinyin Liu 25b961dc93 fixed folder name and SodistoreMax name 2026-03-04 09:37:01 +01:00
Yinyin Liu 35b64c3318 store hourly energy records in SQLite and remove file cache 2026-03-02 18:52:36 +01:00
Yinyin Liu 1761914f24 restructured data pipeline for report system and updated the way to create monthly and yearly report 2026-03-02 12:49:46 +01:00
Yinyin Liu 78b9c2dc72 generate monthly and yearly report based on xlsx files 2026-02-27 11:48:05 +01:00
Yinyin Liu 7476c939c3 fixed issue failed to revoke grant access of the user 2026-02-27 09:04:54 +01:00
Yinyin Liu e5b910238f fixed issue failed to change user name in frontend 2026-02-26 15:17:48 +01:00
Yinyin Liu d464c9cd71 Fixed unawaited SendAsync calls of Websocket 2026-02-26 13:52:43 +01:00
Yinyin Liu abedc6c203 avoid adding folder to itself, children and parent 2026-02-26 13:13:38 +01:00
Yinyin Liu 80639e9169 feat: add move installation/folder UI with admin-only access control
- Add MoveModal component with folder dropdown and circular-reference protection
- Add move icon button to each tree row (admin only)
- Add moveInstallation and moveFolder functions to InstallationsContext
- Restrict CreateFolder, MoveFolder, MoveInstallation to admin only (UserType==2) in backend

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 13:00:10 +01:00
Yinyin Liu 062fd5141f added pause and resume alarm diagnosis review campaign service 2026-02-26 08:25:15 +01:00
Yinyin Liu e72f16f26b improve alarm diagnosis review service 2026-02-25 20:08:40 +01:00
Yinyin Liu 8de43276a0 fixed AlarmKnowledgeBase issue 2026-02-25 08:09:11 +01:00
Yinyin Liu 2f8eda5e7e build easy form to collect sodistore home alarm diagnosis review 2026-02-25 06:48:23 +01:00
Yinyin Liu 50c45399bd fix inesco and sodistore home naming and remove Mistral AI info 2026-02-24 19:08:37 +01:00
Yinyin Liu 36848b97c5 improved weekly performance report quality based on inesco team meeting feedback on 24.02 2026-02-24 15:52:28 +01:00
Yinyin Liu 3bffe70a75 translated all Sinexcel and Growatt Alarm now it also shows in the frontend of UI 2026-02-23 17:59:03 +01:00
Yinyin Liu 25280afb8f add behavioral pattern detection using AI to enrich weekly performance report's insight to customers 2026-02-23 07:40:22 +01:00
Yinyin Liu d7300dde91 improve growatt and sinexcel alarm knowledge base with AI 2026-02-18 16:23:08 +01:00
Yinyin Liu 8e50220242 added language support for monitor AI and non-AI content and email delivery 2026-02-18 12:12:58 +01:00
Yinyin Liu 77f6e0de6c AI-P1: Weekly Performance Report 1.0 2026-02-18 07:36:00 +01:00
Yinyin Liu c076d55407 AI diagnosis UX improvements: status-aware, time-filtered, simpler explanations
- Only show AI diagnosis when installation status is red/orange (not green/offline)
- Filter alarms to last 24 hours to avoid showing outdated issues
- Show alarm name first with "Last seen" timestamp instead of "AI Diagnosis" label
- Update Mistral prompt for shorter, non-technical bullet-point explanations
- Fix Mistral JSON parsing when response wrapped in markdown code fences
- Add TestDiagnoseError endpoint for testing full AI flow without auth

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:16:35 +01:00
Yinyin Liu 6460328eb0 Safe mode for AI diagnostics, align alarm keys with device enums, and multi-diagnosis frontend
- Remove API key gate so knowledge base works without Mistral key
- Return 204 No Content instead of 500 when no diagnosis available
- Rewrite AlarmKnowledgeBase keys to match Sinexcel property names and Growatt enum names
- Fix SQLite OrderBy crash in DiagnosticService
- Frontend: show latest 3 unique alarms with independent expand/collapse and handle 204

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:32:49 +01:00
Yinyin Liu 0c918e86ae Fix build errors: FrozenDictionary (.NET 8) and Flurl 3.x API compatibility
- Replace FrozenDictionary with IReadOnlyDictionary for .NET 6 compat
- Use WithHeader instead of SetHeader for Flurl.Http 3.2.4
- Fix FlurlHttpException error logging for Flurl 3.x

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 07:55:43 +01:00
Yinyin Liu 2da2ded84c Merge branch 'main' into integrated_AI 2026-02-12 07:45:22 +01:00
Yinyin Liu 68f4006f55 Switch AI diagnostics from OpenAI to Mistral and use .env for API key
- Changed API endpoint to api.mistral.ai, model to mistral-small-latest
- Replaced openAiConfig.json with .env file for secure API key storage
- Added .env loader in Program.cs, added .env to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 07:45:16 +01:00
Yinyin Liu 1b6d5a5916 added Overview Page without last week button for SodistoreHome 2026-02-11 13:30:34 +01:00
Yinyin Liu e16fa59771 removed useless db 2026-02-06 14:40:26 +01:00
Yinyin Liu e7f8aacc34 Integrate AI on Alarm 2026-02-06 12:57:12 +01:00
Yinyin Liu 617ab2f782 fixed the bug of Sodistore Home Product not show on side bar and added related backend logs and more accurate frontend error messages 2026-02-03 13:52:20 +01:00
Yinyin Liu d73a85c38d enabled Control Permission for Sinexcel on monitor in frontend 2026-02-03 13:29:18 +01:00
Yinyin Liu 1083bb4091 Update Installation data type and fix solution file 2026-02-02 18:19:07 +01:00
Yinyin Liu bcaac92e34 Fixed Monitor Mailer Issue and added debug logs 2026-02-02 10:20:33 +01:00
Yinyin Liu 77e25aab51 added TimeChargeandDischargePower in backend 2025-12-10 15:21:43 +01:00
Yinyin Liu a1f981a13e added Start/StopTimeChargeandDischargeDayandTime in bakcend 2025-12-10 14:11:39 +01:00
Yinyin Liu da037b7f5a added Control Permission for Growatt configuration in backend 2025-12-03 13:27:00 +01:00
Yinyin Liu 2c50d0944c added Cluster and PV number for SodistoreHome in backend 2025-11-26 15:52:11 +01:00
Yinyin Liu 4b35fca8f2 fixed Configuration timestamp issue when added to History of Action 2025-11-19 11:22:44 +01:00
Yinyin Liu 0df6c26ed6 Added BatteryClusterNumber attribute in backend 2025-11-17 12:19:20 +01:00
Yinyin Liu 13844ebf05 removed SodistoreMax Calibration Discharge Configuration info on History of Action from backend 2025-11-13 14:19:56 +01:00
Yinyin Liu d91090965d fixed configuration message format 2025-10-30 08:20:20 +01:00
Yinyin Liu e4674b41e5 added product_based configuration in the backend of the monitor 2025-10-20 16:32:47 +02:00
Yinyin Liu 692a278f04 added inverterSN and dataloggerSN for sodistorehome in backend 2025-10-14 16:11:31 +02:00