Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
36e886e
Charge SOC issue
zakery292 Dec 29, 2025
50c7acc
Conversion from integer to sring for conditional logic
zakery292 Dec 29, 2025
d30bf33
Added OngridEOD_Voltage Corrected the Charge type selects, Adjusted l…
zakery292 Jan 6, 2026
a371f00
Bug fix for FW code check
zakery292 Jan 7, 2026
194dce4
Bump Version numbers
zakery292 Jan 7, 2026
945f2b6
chore: updates to 3.2.0
zakery292 Feb 17, 2026
1fbac17
Merge pull request #103 from Monitor-My-Solar/development
zakery292 Feb 17, 2026
a2d2202
Unified /input + /hold topic dispatch (slice 4 + 5 of plan)
zakery292 Jun 8, 2026
3eb8ff5
setting/updated channel: durable write confirmation routes to entity
zakery292 Jun 8, 2026
aa6f332
Deye family support + unified-topics coordinator fixes
zakery292 Jun 13, 2026
8e0b0c0
Optional dongle-ID in entity names with history-preserving migration
zakery292 Jun 20, 2026
a8893fd
Fix snapshot bootstrap timing + add dongle-replacement entity transfer
zakery292 Jun 21, 2026
0ba7e94
Snapshot eagerly at setup + detect silent reboots
zakery292 Jun 21, 2026
3b17e30
Fix: only one battery created when payload has N batteries
zakery292 Jun 21, 2026
4e202de
Fix: route coordinator data writes through build_entity_id
zakery292 Jun 21, 2026
29b2d38
Add diagnostic entities from the /status payload
zakery292 Jun 21, 2026
d22ef3d
OTA firmware updates over MQTT admin commands
zakery292 Jun 21, 2026
7eb3dd9
Remove dongle IP (breaking), add beta toggle, 4.0.0 changelog
zakery292 Jun 21, 2026
08eedce
OTA: select by track only, drop version targeting
zakery292 Jun 21, 2026
8d875d7
Fix bugs found in code review
zakery292 Jun 21, 2026
92b0463
Add unit tests for 4.0.0 helpers; remove stray dev script
zakery292 Jun 21, 2026
a782e24
Fix: snapshot reply dropped during startup window (snap not working)
zakery292 Jun 29, 2026
467b6e9
final updates to changedata branch
zakery292 Jul 3, 2026
d6b973a
Add grouping to entities
zakery292 Jul 3, 2026
11d0948
Bump Version
zakery292 Jul 3, 2026
5fbad8c
Updates to stop entities going unknown
zakery292 Jul 4, 2026
97b5544
updates to dual write path for legacy and new firmware. Supports both…
zakery292 Jul 5, 2026
7b40b6a
update entites
zakery292 Jul 6, 2026
2979d81
update Entites
zakery292 Jul 6, 2026
c7abd3e
update Entites
zakery292 Jul 6, 2026
84980e6
update to include entity migration logic and logging for debugging pu…
zakery292 Jul 6, 2026
b281410
update to include entity migration logic and logging for debugging pu…
zakery292 Jul 6, 2026
a6b2f16
Add missing Battery Temp sensor
zakery292 Jul 6, 2026
2d1481b
Add missing Battery Temp sensor
zakery292 Jul 6, 2026
f28bc6e
Full 4.0.0 updates including workflows and test. Changelog, readme an…
zakery292 Jul 6, 2026
1149e93
Merge pull request #107 from Monitor-My-Solar/feature/unified-topics
zakery292 Jul 6, 2026
4628eff
update workflows
zakery292 Jul 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
300 changes: 300 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize]

jobs:
claude-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Get full history to see what changed

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# Use sticky comments so Claude updates the same comment
use_sticky_comment: false

# track_progress enables tracking comments like v0.x agent mode
track_progress: true

# Enhanced prompt that makes Claude track and verify fixes
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}

You are reviewing a pull request. Check your previous comment to see the previous issues and make sure these have been fixed before highlighting new ones.

IMPORTANT INSTRUCTIONS:
1. If this is a subsequent review (synchronize event), check what changed since your last review
2. Track each issue with a unique identifier like [ISSUE-001], [ISSUE-002], etc.
3. Mark issues that have been fixed as ✅ FIXED
4. Mark unresolved issues as ⚠️ STILL OPEN
5. Mark new issues as 🔍 NEW

Review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security concerns
- Test coverage

Format your response like this:

## Code Review Status

### Issues Found:

[ISSUE-001] ⚠️ STILL OPEN - Service mode confusion
- File: dist/index.js:341
- Problem: this.mode is undefined
- Suggestion: Remove the check since only writer mode runs this

[ISSUE-002] ✅ FIXED - Missing error handling
- File: socketMapping.js:234
- Status: Fixed in latest commit

[ISSUE-003] 🔍 NEW - Unused variable
- File: someFile.js:123
- Problem: Variable declared but never used

### Summary:
- Total Issues: 3
- Fixed: 1
- Still Open: 1
- New: 1

Be constructive and helpful. When an issue is fixed, acknowledge it positively!

- name: Manage GitHub Issues from Review
if: steps.claude-review.outputs.comment != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
REPO: ${{ github.repository }}
run: |
# Save review comment to temp file for parsing
cat > /tmp/review.txt << 'REVIEW_EOF'
${{ steps.claude-review.outputs.comment }}
REVIEW_EOF

# Initialize counters
new_count=0
still_open_count=0
closed_count=0

echo "## Issue Management Summary" > /tmp/issue_summary.txt
echo "" >> /tmp/issue_summary.txt

# First pass: Handle FIXED issues (close them)
echo "### ✅ Closed Issues" >> /tmp/issue_summary.txt
awk '
/^\[ISSUE-[0-9]+\] ✅ FIXED/ {
match($0, /\[ISSUE-[0-9]+\]/, arr)
issue_id = arr[0]
sub(/^\[ISSUE-[0-9]+\] ✅ FIXED - /, "", $0)
title = $0
print issue_id "|" title
}
' /tmp/review.txt | while IFS='|' read -r issue_id title; do
if [ -z "$issue_id" ]; then
continue
fi

# Convert [ISSUE-001] to issue-id:ISSUE-001 for label search
label_id=$(echo "$issue_id" | tr -d '[]' | sed 's/^/issue-id:/')

# Search for existing issue with this label
existing_issue=$(gh issue list --label "$label_id" --state open --json number --jq '.[0].number' --repo "${REPO}" 2>/dev/null)

if [ -n "$existing_issue" ]; then
echo "Closing issue #${existing_issue} for ${issue_id}: ${title}"
gh issue close "$existing_issue" \
--comment "✅ This issue has been resolved and verified in PR #${PR_NUMBER}" \
--repo "${REPO}"
echo "- ${issue_id}: ${title} (Issue #${existing_issue})" >> /tmp/issue_summary.txt
closed_count=$((closed_count + 1))
else
echo "No open issue found for ${issue_id} (already closed or never created)"
fi
done

if [ "$closed_count" -eq 0 ]; then
echo "- None" >> /tmp/issue_summary.txt
fi
echo "" >> /tmp/issue_summary.txt

# Second pass: Handle NEW and STILL OPEN issues
echo "### 🔍 New Issues Created" >> /tmp/issue_summary.txt
awk '
/^\[ISSUE-[0-9]+\] (🔍 NEW|⚠️ STILL OPEN)/ {
if (issue_id) {
print issue_id "|" status "|" title "|" details
}
match($0, /\[ISSUE-[0-9]+\]/, arr)
issue_id = arr[0]
if ($0 ~ /🔍 NEW/) status = "new"
else if ($0 ~ /⚠️ STILL OPEN/) status = "open"
sub(/^\[ISSUE-[0-9]+\] (🔍 NEW|⚠️ STILL OPEN) - /, "", $0)
title = $0
details = ""
next
}
/^- File:/ || /^- Problem:/ || /^- Suggestion:/ || /^- Status:/ {
if (details) details = details "\n" $0
else details = $0
next
}
/^\[ISSUE-[0-9]+\]/ || /^###/ || /^##/ {
if (issue_id) {
print issue_id "|" status "|" title "|" details
issue_id = ""
}
}
END {
if (issue_id) {
print issue_id "|" status "|" title "|" details
}
}
' /tmp/review.txt | while IFS='|' read -r issue_id status title details; do
if [ -z "$issue_id" ]; then
continue
fi

# Convert [ISSUE-001] to issue-id:ISSUE-001 for label
label_id=$(echo "$issue_id" | tr -d '[]' | sed 's/^/issue-id:/')

# Check if issue already exists
existing_issue=$(gh issue list --label "$label_id" --state open --json number --jq '.[0].number' --repo "${REPO}" 2>/dev/null)

if [ "$status" = "new" ]; then
status_emoji="🔍 NEW"
base_labels="code-review,automated,new-finding"
else
status_emoji="⚠️ STILL OPEN"
base_labels="code-review,automated,needs-attention"
fi

if [ -n "$existing_issue" ]; then
# Issue exists and is still open - update it
echo "Updating existing issue #${existing_issue} for ${issue_id}"

cat > /tmp/issue_comment.txt << 'COMMENT_EOF'
**Still present in PR #${PR_NUMBER}**

${status_emoji} This issue is still open.

## Latest Details
${details}

*Updated: $(date -u +"%Y-%m-%d %H:%M:%S UTC")*
COMMENT_EOF

# Replace variables in the comment
sed -i "s|\${PR_NUMBER}|${PR_NUMBER}|g" /tmp/issue_comment.txt
sed -i "s|\${status_emoji}|${status_emoji}|g" /tmp/issue_comment.txt
sed -i "s|\${details}|${details}|g" /tmp/issue_comment.txt

gh issue comment "$existing_issue" --body "$(cat /tmp/issue_comment.txt)" --repo "${REPO}"

if [ "$status" = "open" ]; then
still_open_count=$((still_open_count + 1))
fi
else
# Create new issue
cat > /tmp/issue_body.txt << 'ISSUE_EOF'
**Found in PR #${PR_NUMBER}**: ${PR_TITLE}

**Status**: ${status_emoji}
**Issue ID**: ${issue_id}

## Details
${details}

---
*This issue was automatically identified during code review.*
*For full context, see the [code review comment](https://github.com/${REPO}/pull/${PR_NUMBER}).*
ISSUE_EOF

# Replace variables in the issue body
sed -i "s|\${PR_NUMBER}|${PR_NUMBER}|g" /tmp/issue_body.txt
sed -i "s|\${PR_TITLE}|${PR_TITLE}|g" /tmp/issue_body.txt
sed -i "s|\${status_emoji}|${status_emoji}|g" /tmp/issue_body.txt
sed -i "s|\${issue_id}|${issue_id}|g" /tmp/issue_body.txt
sed -i "s|\${details}|${details}|g" /tmp/issue_body.txt
sed -i "s|\${REPO}|${REPO}|g" /tmp/issue_body.txt

echo "Creating new issue for ${issue_id}: ${title}"
new_issue=$(gh issue create \
--title "Code Review: ${title}" \
--body "$(cat /tmp/issue_body.txt)" \
--label "${base_labels},${label_id}" \
--repo "${REPO}" \
--json number --jq '.number' 2>/dev/null)

if [ -n "$new_issue" ]; then
echo "- ${issue_id}: ${title} (Issue #${new_issue})" >> /tmp/issue_summary.txt
new_count=$((new_count + 1))
fi
fi
done

if [ "$new_count" -eq 0 ]; then
echo "- None" >> /tmp/issue_summary.txt
fi
echo "" >> /tmp/issue_summary.txt

# Third pass: List still open issues
echo "### ⚠️ Still Open Issues" >> /tmp/issue_summary.txt
awk '
/^\[ISSUE-[0-9]+\] ⚠️ STILL OPEN/ {
match($0, /\[ISSUE-[0-9]+\]/, arr)
issue_id = arr[0]
sub(/^\[ISSUE-[0-9]+\] ⚠️ STILL OPEN - /, "", $0)
print issue_id "|" $0
}
' /tmp/review.txt | while IFS='|' read -r issue_id title; do
if [ -z "$issue_id" ]; then
continue
fi

label_id=$(echo "$issue_id" | tr -d '[]' | sed 's/^/issue-id:/')
existing_issue=$(gh issue list --label "$label_id" --state open --json number --jq '.[0].number' --repo "${REPO}" 2>/dev/null)

if [ -n "$existing_issue" ]; then
echo "- ${issue_id}: ${title} (Issue #${existing_issue})" >> /tmp/issue_summary.txt
fi
done

if [ "$still_open_count" -eq 0 ]; then
echo "- None" >> /tmp/issue_summary.txt
fi
echo "" >> /tmp/issue_summary.txt

# Summary stats
echo "---" >> /tmp/issue_summary.txt
echo "**Summary**: ${new_count} new, ${still_open_count} still open, ${closed_count} closed" >> /tmp/issue_summary.txt

# Output summary
cat /tmp/issue_summary.txt

# Post summary as PR comment
gh pr comment "${PR_NUMBER}" \
--body "$(cat /tmp/issue_summary.txt)" \
--repo "${REPO}"

echo "Issue management completed: ${new_count} new, ${still_open_count} still open, ${closed_count} closed"
39 changes: 39 additions & 0 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
additional_permissions: |
actions: read
36 changes: 36 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tests

on:
push:
branches: [main]
workflow_dispatch:

jobs:
pytest:
name: pytest (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt

- name: Byte-compile the integration
run: python -m py_compile custom_components/monitormysolar/*.py

- name: Run pytest
run: python -m pytest tests/ -q
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ monitormysolar-schedule-card/
*.claude
claude.md
docs/
.idea/
.idea
# Test virtualenv
.venv/
__pycache__/
.pytest_cache/
RELEASE_NOTES_4.0.0.md
Loading
Loading