IoT Multi-Cloud Monitor

Use Case Dashboard — ShineMonitor & DessMonitor Platforms

ShineMonitor 10 UCs
DessMonitor 10 UCs
Use Cases
10
UC1-UC9, UC11
Tests
119
All passing
Workflows
2
Daily + Weekly
Schedule
6x/day
Every 4 hours
Production Monitoring
UC1Admin Production Alerts
15 testsProduction
Monitors all solar plants for production anomalies and sends system-wide alerts to admin.

Features

  • RED alert: Production < 20% of baseline for 3 consecutive days
  • ORANGE alert: Production < 40% of baseline for 3 consecutive months
  • Auto-ignore: Plants with 0 production for 1 month
  • HTML email with color-coded alert sections
Workflow: trigger-shinemonitor.yml
Schedule: 6x daily (every 4 hours)
Recipient: ktronicssolar@gmail.com
Test file: test_admin_alerts.py
UC2Customer Weekly Reports
16 testsProduction
Generates personalized weekly production reports for each customer every Sunday.

Features

  • Weekly, monthly, yearly production totals
  • Month-over-month and year-over-year comparisons
  • Multi-plant support per customer
  • Admin summary email with all customers combined
Workflow: trigger-customer-reports.yml
Schedule: Sunday 04:00 UTC
Recipient: Each customer + admin
Test file: test_customer_weekly.py
Device Alarms & Notifications
UC3Device Alarm Notifications
38 testsProduction
Monitors device-level warnings from ShineMonitor API and sends alarm notifications to admin and customers.

Features

  • Fetches UNHANDLED device alarms via webQueryPlantsWarning API
  • 3-send rule: each alarm sent 3 times, then auto-ignored
  • 4-hour interval between sends to prevent spam
  • State persistence for send count tracking
  • Admin + customer device alarm emails
Workflow: trigger-shinemonitor.yml
Schedule: 6x daily (every 4 hours)
State: state/device_alarms_state.json
Test file: test_device_alarms.py
UC4Test Customer Email Control
3 testsProduction
Controls which customers receive emails based on trigger type, enabling continuous testing.

Features

  • Scheduled runs: all customers receive emails
  • Push/manual runs: only test customer (Gayan-IMH) receives emails
  • Test mode bypasses 3-send limit for testing
Test customer: Gayan-IMH
Test file: test_device_alarms.py
UC5Test Mode Filter
2 testsProduction
Filters alarms to test customer only when running in test mode (push/manual triggers).
Part of: UC3 Device Alarms
Test file: test_device_alarms.py
UC6Log Summary Counts
1 testProduction
Logs alarm summary counts in GitHub Actions for admin visibility.

Output

  • "Summary: X alarms from Y customers affecting Z plants"
Part of: UC3 Device Alarms
Test file: test_device_alarms.py
UC7State JSON Enhancement
1 testProduction
Adds human-readable fields (customer, plant, message) to device alarm state file.
State file: state/device_alarms_state.json
Test file: test_device_alarms.py
UC8Weekly Report Schedule Filter
1 testProduction
Controls when customer emails are sent based on trigger type.

Rules

  • Admin emails: sent on ALL triggers (push/manual/schedule)
  • Customer emails: only on scheduled runs (Sunday)
Workflow: trigger-customer-reports.yml
Test file: test_device_alarms.py
System Optimization
UC9Admin Email Optimization
9 testsProduction
Reduces admin email noise using hash-based duplicate detection. Only sends when alert state actually changes.

Features

  • SHA256 hash of alert content (excludes timestamp)
  • Compares hash to previous run's hash
  • Email reduction: 6/day down to 1-2/day (83% reduction)
State: state/admin_email_state.txt
Test file: test_uc9_admin_email.py
Analytics & ROI
UC11Plant ROI Analysis
19 testsProduction
Analyzes historical device data for ROI verification, focusing on OffGrid (battery backup) usage during grid outages.

Features

  • Tracks OffGrid events (battery backup mode)
  • Calculates total backup hours, energy provided, cost savings
  • Monthly breakdown with peak load analysis
  • Works for any plant by selecting customer
Scripts: check_plant_roi.py, analyze_plant_roi.py
Test file: test_uc11_plant_roi.py

ROI Report Viewer

Reports are pre-generated from roi/*.txt files. To generate new reports, run:
py check_plant_roi.py --customer <name> --days 365 then py analyze_plant_roi.py --input roi/<file>.csv
Infrastructure
BVTBuild Verification Tests
14 testsProduction
Verifies centralized credentials configuration across all scripts. Prevents hardcoded path regressions.
Config: config.py, common_config.sh
Test file: test_centralized_config.py
APIShineMonitor API Tests
8 testsProduction
Integration tests for ShineMonitor API endpoints. Runs in GitHub Actions (Linux), skipped on Windows.
Environment: GitHub Actions only
Test file: test_shinemonitor_api.py
GitHub Workflows

ShineMonitor Daily Monitor

File: trigger-shinemonitor.yml
Schedule: 6x daily (02:30, 06:30, 10:30, 14:30, 18:30, 22:30 UTC)
Triggers: Schedule, Push, Manual
UCs: UC1, UC3-UC9

ShineMonitor Weekly Reports

File: trigger-customer-reports.yml
Schedule: Sunday 04:00 UTC
Triggers: Schedule, Push, Manual
UCs: UC2, UC8
Use Cases
10
UC1-UC9, UC11
Tests
112
64 pass, 48 stub
Workflows
2
Daily + Weekly
Schedule
6x/day
Offset from ShineMonitor
Production Monitoring
UC1Admin Production Alerts
19 testsProduction
Monitors all DessMonitor solar plants for production anomalies and sends system-wide alerts to admin.

Features

  • RED alert: Production < 20% of baseline for 3 consecutive days
  • ORANGE alert: Production < 40% of baseline for 3 consecutive months
  • Auto-ignore: Plants with 0 production for 1 month
  • Uses --platform dessmonitor flag for anomaly detection
Workflow: trigger-dessmonitor.yml
Schedule: 6x daily (offset from ShineMonitor)
State: state/dessmonitor_alerts_state.json
Test file: test_dessmonitor_admin_alerts.py
UC2Customer Weekly Reports
15 testsProduction
Generates personalized weekly production reports for DessMonitor customers every Sunday.

Features

  • Weekly, monthly, yearly production totals
  • Platform-specific CSV filtering (dessmonitor- prefix)
  • Separate workflow from ShineMonitor reports
Workflow: trigger-dessmonitor-weekly-reports.yml
Schedule: Sunday 04:00 UTC
Test file: test_dessmonitor_data_collection.py
Device Alarms & Notifications
UC3Device Alarm Notifications
19 testsProduction
Monitors device-level warnings from DessMonitor API and sends alarm notifications to admin and customers.

Features

  • Fetches UNHANDLED device alarms via check_dessmonitor_device_alarms.sh
  • 3-send rule: each alarm sent 3 times, then auto-ignored
  • 4-hour interval between sends to prevent spam
  • Admin + customer device alarm emails
Workflow: trigger-dessmonitor.yml
Script: check_dessmonitor_device_alarms.sh
State: state/dessmonitor_device_alarms_state.json
Test file: test_dessmonitor_device_alarms.py
UC4Test Customer Email Control
3 testsProduction
Controls which DessMonitor customers receive emails based on trigger type.

Features

  • Scheduled runs: all customers receive emails
  • Push/manual runs: only test customer (MifrazMarsoon) receives emails
  • Customer device alarm emails with platform filtering
Test customer: MifrazMarsoon
Workflow: trigger-dessmonitor.yml
UC5Test Mode Filter
2 testsProduction
Filters DessMonitor alarms to test customer only in test mode (push/manual triggers).
Part of: UC3 Device Alarms
UC6Log Summary Counts
1 testProduction
Logs DessMonitor alarm summary counts in GitHub Actions for admin visibility.

Output

  • "Summary: X alarms from Y customers affecting Z plants"
Part of: UC3 Device Alarms
UC7State JSON Enhancement
1 testProduction
Human-readable fields (customer, plant, message) in DessMonitor device alarm state file.
State: state/dessmonitor_device_alarms_state.json
UC8Weekly Report Schedule Filter
2 testsProduction
Controls when DessMonitor customer emails are sent based on trigger type.

Rules

  • Admin emails: sent on ALL triggers
  • Customer emails: only on scheduled runs (Sunday)
System Optimization
UC9Admin Email Optimization
9 testsProduction
Hash-based duplicate detection for DessMonitor admin emails. Only sends when alert state changes.
State: state/dessmonitor_admin_email_state.txt
Test file: test_dessmonitor_uc9_admin_email.py
Analytics & ROI
UC11Plant ROI Analysis
19 testsStub
ROI analysis for DessMonitor plants. Stub tests - requires DessMonitor device-level data API integration.
Test file: test_dessmonitor_uc11_plant_roi.py
Infrastructure
BVTBuild Verification Tests
13 testsProduction
Verifies centralized credentials configuration across all scripts including DessMonitor.
Test file: test_dessmonitor_centralized_config.py
APIDessMonitor API Tests
18 testsProduction
Integration tests for DessMonitor API endpoints and bash scripts. Runs in GitHub Actions (Linux).
Environment: GitHub Actions only
Test file: test_dessmonitor_api.py
GitHub Workflows

DessMonitor Daily Monitor

File: trigger-dessmonitor.yml
Schedule: 6x daily (03:00, 07:00, 11:00, 15:00, 19:00, 23:00 UTC)
Triggers: Schedule, Push, Manual
UCs: UC1, UC3-UC9, UC11

DessMonitor Weekly Reports

File: trigger-dessmonitor-weekly-reports.yml
Schedule: Sunday 04:00 UTC
Triggers: Schedule, Push, Manual
UCs: UC2, UC8, UC11