Skip to content

Add enphase solar monitor#225

Open
ammyyou112 wants to merge 17 commits intoopenhome-dev:devfrom
ammyyou112:add-enphase-solar-monitor
Open

Add enphase solar monitor#225
ammyyou112 wants to merge 17 commits intoopenhome-dev:devfrom
ammyyou112:add-enphase-solar-monitor

Conversation

@ammyyou112
Copy link
Contributor

@ammyyou112 ammyyou112 commented Mar 26, 2026

What does this Ability do?

Voice-activated solar monitoring for Enphase IQ Gateway systems. Users can check real-time solar production, battery status, consumption, and grid import/export with natural voice commands.

Suggested Trigger Words

  • "solar"
  • "how's my solar"
  • "solar status"
  • "solar production"
  • "battery level"
  • "battery status"
  • "am I exporting"
  • "grid status"
  • "solar today"
  • "enphase"
  • "solar panels"

Type

  • New community Ability
  • Improvement to existing Ability
  • Bug fix
  • Documentation update

External APIs

  • No external APIs
  • Uses external API(s):
    • Enphase Cloud API v4 (requires OAuth 2.0 authentication)
    • Endpoints: /systems/{system_id}/summary, /systems/{system_id}/encharge, /systems/{system_id}/consumption_stats
    • Requires: System ID, API key, OAuth client ID/secret, access/refresh tokens

Testing

  • Tested in OpenHome Live Editor
  • All exit paths tested (said "stop", "exit", etc.)
  • Error scenarios tested (API down, bad input, etc.)

Checklist

  • Files are in community/enphase-solar-monitor/
  • main.py follows SDK pattern (extends MatchingCapability, has register_capability + call)
  • README.md included with description, suggested triggers, and setup
  • resume_normal_flow() called on every exit path
  • No print() — using editor_logging_handler
  • No hardcoded API keys — using placeholders
  • No blocked imports (redis, connection_manager, user_config)
  • No asyncio.sleep() or asyncio.create_task() — using session_tasks
  • Error handling on all external calls
  • Tested in OpenHome Live Editor

Anything else?

Demo Mode Included:
The ability includes a DEMO_MODE = True flag that returns realistic fake data for testing without real Enphase credentials. Perfect for trying out the conversation flow before connecting a real system.

Features:

  • 15-minute data caching to minimize API calls
  • OAuth token auto-refresh
  • Multi-intent classification (production, battery, consumption, grid status)
  • Voice-optimized formatting ("kilowatts" not "kW")
  • Conversational loop with context awareness

Conversation Example:

User: "enphase"
Assistant: "Sure! Let me check your solar system."
Assistant: "You're producing 4.2 kilowatts right now."
Assistant: "Today you've generated 28.0 kilowatt hours."
Assistant: "Your battery is at 73 percent and charging."
User: "what about consumption?"
Assistant: "You're using 3.1 kilowatts right now."
User: "stop"
Assistant: "Okay, talk to you later!"

Loom Demo: https://www.loom.com/share/0ae21d6369eb4310bc96446dd5f5923c


---

## 📋 **Files to Include in PR:**

community/enphase-solar-monitor/
├── main.py
└── README.md

@ammyyou112 ammyyou112 requested a review from a team as a code owner March 26, 2026 12:56
@github-actions
Copy link
Contributor

🔀 Branch Merge Check

PR direction: add-enphase-solar-monitordev

Passedadd-enphase-solar-monitordev is a valid merge direction

@github-actions
Copy link
Contributor

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions github-actions bot added the community-ability Community-contributed ability label Mar 26, 2026
@github-actions
Copy link
Contributor

✅ Ability Validation Passed

📋 Validating: community/enphase-solar-monitor
  ✅ All checks passed!

@github-actions
Copy link
Contributor

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/enphase-solar-monitor/main.py

✅ Flake8 — Passed

✅ All checks passed!

@ammyyou112 ammyyou112 mentioned this pull request Mar 26, 2026
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants