From ef223a85c699b7a28a901c8d676f0ff07bbb45a9 Mon Sep 17 00:00:00 2001 From: Tobias Olsson Date: Wed, 29 Jan 2025 09:27:02 +0100 Subject: [PATCH 1/8] Update README.md Initial zap text. --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5fe39a..6b5280a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,65 @@ -# srcful-spark -Sourceful Energy Grants Repo +# Zap - spark + +## Home Assistant Integration for Zap P1-meter +### Challenge Overview +Development of an open-source Home Assistant integration that enables seamless connectivity and data visualization for the Zap P1-meter. +### Grant Amount +1000 USDC awarded to the first submission that meets all requirements and passes review. +### Technical Requirements +#### Core Functionality +1. Integration Requirements: + - Full configuration through Home Assistant UI + - Automatic discovery of Zap P1-meter on local network + - Real-time data polling with configurable intervals + - Support for all P1 data points +2. Data Handling: + - Parse all standard P1 DSMR metrics + - Store historical data using Home Assistant's native storage + - Handle connection interruptions gracefully + - Implement proper error handling and logging +3. User Interface: + - Provide clear status indicators + - Display current power consumption/production + - Show historical data in graphs + - Include energy cost calculations (optional) +#### Technical Specifications +1. Code Quality: + - Follow Home Assistant development guidelines + - Include comprehensive documentation + - Write unit tests with >80% coverage + - Implement proper error handling + - Follow Python type hinting +2. Security: + - Secure connection handling + - No hardcoded credentials + - Proper input validation + - Rate limiting implementation +### Submission Requirements +1. Code Deliverables: + - Complete source code on GitHub + - Installation documentation + - Configuration examples + - Testing instructions +2. Documentation: + - Setup guide + - Configuration options + - Troubleshooting guide + - API documentation +### Review Process +1. Initial Screening: + - Code review for quality and security + - Documentation completeness check + - Test coverage verification +2. Technical Testing: + - Installation testing + - Functionality verification + - Performance testing + - Security assessment +3. Final Approval: + - Community review period (7 days) + - Final technical review + - Grant distribution upon approval +### Timeline +- Challenge Open: [Date] +- Submission Deadline: Open until first qualifying submission +- Review Period: Up to 14 days after submission From 7ffa2a2c2a8dce37290a3feb869aa74a12e8a35a Mon Sep 17 00:00:00 2001 From: Tobias Olsson Date: Wed, 29 Jan 2025 09:46:03 +0100 Subject: [PATCH 2/8] Create submission.md --- submission.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 submission.md diff --git a/submission.md b/submission.md new file mode 100644 index 0000000..3e7e404 --- /dev/null +++ b/submission.md @@ -0,0 +1,4 @@ +Edit this file and issue a pull request when your submission is ready for review. + +Link to your repo: +Link to Home Assistant community thread announcing your integration: From 55622ed70664bee4280afc963ea816efb1d0dcfb Mon Sep 17 00:00:00 2001 From: Tobias Olsson Date: Wed, 29 Jan 2025 09:47:55 +0100 Subject: [PATCH 3/8] Update README.md added installation requirement --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6b5280a..526d3bb 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Development of an open-source Home Assistant integration that enables seamless c ### Technical Requirements #### Core Functionality 1. Integration Requirements: + - Full installation throug Home Assistant UI eg [HACS}(https://www.hacs.xyz/) - Full configuration through Home Assistant UI - Automatic discovery of Zap P1-meter on local network - Real-time data polling with configurable intervals From 7a0b83f1095e57812b837577ded3fb838e3116da Mon Sep 17 00:00:00 2001 From: Tobias Olsson Date: Wed, 29 Jan 2025 09:48:09 +0100 Subject: [PATCH 4/8] Update README.md fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 526d3bb..e8f9bc4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Development of an open-source Home Assistant integration that enables seamless c ### Technical Requirements #### Core Functionality 1. Integration Requirements: - - Full installation throug Home Assistant UI eg [HACS}(https://www.hacs.xyz/) + - Full installation throug Home Assistant UI eg [HACS](https://www.hacs.xyz/) - Full configuration through Home Assistant UI - Automatic discovery of Zap P1-meter on local network - Real-time data polling with configurable intervals From 95c9927407e0fd197016a646e24696ff02be44a2 Mon Sep 17 00:00:00 2001 From: Fredrik Ahlgren Date: Mon, 3 Mar 2025 15:44:16 +0100 Subject: [PATCH 5/8] Update README.md --- README.md | 161 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 95 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index e8f9bc4..84593cb 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,95 @@ -# Zap - spark - -## Home Assistant Integration for Zap P1-meter -### Challenge Overview -Development of an open-source Home Assistant integration that enables seamless connectivity and data visualization for the Zap P1-meter. -### Grant Amount -1000 USDC awarded to the first submission that meets all requirements and passes review. -### Technical Requirements -#### Core Functionality -1. Integration Requirements: - - Full installation throug Home Assistant UI eg [HACS](https://www.hacs.xyz/) - - Full configuration through Home Assistant UI - - Automatic discovery of Zap P1-meter on local network - - Real-time data polling with configurable intervals - - Support for all P1 data points -2. Data Handling: - - Parse all standard P1 DSMR metrics - - Store historical data using Home Assistant's native storage - - Handle connection interruptions gracefully - - Implement proper error handling and logging -3. User Interface: - - Provide clear status indicators - - Display current power consumption/production - - Show historical data in graphs - - Include energy cost calculations (optional) -#### Technical Specifications -1. Code Quality: - - Follow Home Assistant development guidelines - - Include comprehensive documentation - - Write unit tests with >80% coverage - - Implement proper error handling - - Follow Python type hinting -2. Security: - - Secure connection handling - - No hardcoded credentials - - Proper input validation - - Rate limiting implementation -### Submission Requirements -1. Code Deliverables: - - Complete source code on GitHub - - Installation documentation - - Configuration examples - - Testing instructions -2. Documentation: - - Setup guide - - Configuration options - - Troubleshooting guide - - API documentation -### Review Process -1. Initial Screening: - - Code review for quality and security - - Documentation completeness check - - Test coverage verification -2. Technical Testing: - - Installation testing - - Functionality verification - - Performance testing - - Security assessment -3. Final Approval: - - Community review period (7 days) - - Final technical review - - Grant distribution upon approval -### Timeline -- Challenge Open: [Date] -- Submission Deadline: Open until first qualifying submission -- Review Period: Up to 14 days after submission +**Zap Spark Initiative: Home Assistant Integration for Zap P1-Meter** + +**Challenge Overview** +We’re calling on talented developers to create an open-source Home Assistant integration for the Zap P1-Meter, enabling seamless connectivity, real-time data visualization, and smart energy monitoring for users. Help us empower homeowners to take control of their energy usage while contributing to a growing ecosystem of sustainable tech. + +**Grant Amount** +The first submission that meets all requirements and passes our review process will be awarded **1,000 USDC**. Plus, you’ll gain early access to a Zap P1-Meter test device and recognition as a pioneer in our Spark Initiative community. + +**Who Can Participate** +This challenge is open to individual developers and teams who are passionate about smart home technology and sustainability. To participate, register at [https://sourceful.energy/grants](https://sourceful.energy/grants) and reach out to join the Spark Initiative. + +**Technical Requirements** + +**Core Functionality** +1. **Integration Requirements** + - Full installation via Home Assistant UI (e.g., through HACS). + - Full configuration via Home Assistant UI. + - Automatic discovery of the Zap P1-Meter on the local network. + - Real-time data polling with user-configurable intervals. + - Support for all standard P1 data points (per DSMR specifications). + +2. **Data Handling** + - Parse all standard P1 DSMR metrics accurately. + - Store historical data using Home Assistant’s native storage system. + - Gracefully handle connection interruptions with reconnection logic. + - Implement robust error handling and detailed logging for debugging. + +3. **User Interface** + - Display clear status indicators for device connectivity and data updates. + - Show real-time power consumption and production data. + - Provide historical data visualization through graphs in Home Assistant. + - (Optional) Include energy cost calculations based on user-defined tariffs. + +**Technical Specifications** +1. **Code Quality** + - Adhere to Home Assistant’s development guidelines. + - Include comprehensive documentation for setup, usage, and troubleshooting. + - Write unit tests with at least 80% code coverage. + - Follow Python type hinting and PEP 8 style guidelines. + +2. **Security** + - Ensure secure connection handling with encrypted communication where applicable. + - Avoid hardcoded credentials and implement secure storage of sensitive data. + - Include proper input validation to prevent injection attacks. + - Implement rate limiting to prevent abuse or overload. + +**Submission Requirements** + +**Code Deliverables** +- Complete source code hosted on a public GitHub repository. +- Installation instructions for Home Assistant users. +- Configuration examples showcasing different setups. +- Testing instructions for reviewers to verify functionality. + +**Documentation** +- Detailed setup guide for end users. +- Explanation of configuration options and their use cases. +- Troubleshooting guide for common issues. +- API documentation for developers extending the integration. + +**Review Process** + +1. **Initial Screening** + - Code review for quality, adherence to guidelines, and security best practices. + - Verification of documentation completeness. + - Confirmation of test coverage (minimum 80%). + +2. **Technical Testing** + - Installation testing on a Home Assistant instance. + - Functionality verification against all requirements. + - Performance testing under normal and edge-case conditions. + - Security assessment for vulnerabilities. + +3. **Final Approval** + - Community review period (7 days) for feedback from other developers and users. + - Final technical review by the Zap team. + - Grant distribution and early access device shipping upon approval. + +**Timeline** +- **Challenge Open:** [Insert Date] +- **Submission Deadline:** Open until the first qualifying submission is approved. +- **Review Period:** Up to 14 days after submission. + +**Why Participate?** +By tackling this challenge, you’ll not only earn a grant but also: +- Gain early access to Zap P1-Meter hardware for testing and development. +- Be featured as a contributor in our growing Spark Initiative community. +- Help thousands of Home Assistant users monitor their energy usage sustainably. + +**How to Get Started** +1. Register your interest at [https://sourceful.energy/grants](https://sourceful.energy/grants). +2. Join our Discord community for updates, collaboration, and support. +3. Submit your integration via GitHub and notify us through the Spark Initiative channels. + +Let’s spark an energy revolution together! We can’t wait to see what you build. From 23e771d02321eeffa99d0e414a9cf206e1d3809e Mon Sep 17 00:00:00 2001 From: Fredrik Ahlgren Date: Sun, 6 Jul 2025 06:52:28 +0200 Subject: [PATCH 6/8] Update README.md --- README.md | 234 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 139 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index 84593cb..41fbcb1 100644 --- a/README.md +++ b/README.md @@ -1,95 +1,139 @@ -**Zap Spark Initiative: Home Assistant Integration for Zap P1-Meter** - -**Challenge Overview** -We’re calling on talented developers to create an open-source Home Assistant integration for the Zap P1-Meter, enabling seamless connectivity, real-time data visualization, and smart energy monitoring for users. Help us empower homeowners to take control of their energy usage while contributing to a growing ecosystem of sustainable tech. - -**Grant Amount** -The first submission that meets all requirements and passes our review process will be awarded **1,000 USDC**. Plus, you’ll gain early access to a Zap P1-Meter test device and recognition as a pioneer in our Spark Initiative community. - -**Who Can Participate** -This challenge is open to individual developers and teams who are passionate about smart home technology and sustainability. To participate, register at [https://sourceful.energy/grants](https://sourceful.energy/grants) and reach out to join the Spark Initiative. - -**Technical Requirements** - -**Core Functionality** -1. **Integration Requirements** - - Full installation via Home Assistant UI (e.g., through HACS). - - Full configuration via Home Assistant UI. - - Automatic discovery of the Zap P1-Meter on the local network. - - Real-time data polling with user-configurable intervals. - - Support for all standard P1 data points (per DSMR specifications). - -2. **Data Handling** - - Parse all standard P1 DSMR metrics accurately. - - Store historical data using Home Assistant’s native storage system. - - Gracefully handle connection interruptions with reconnection logic. - - Implement robust error handling and detailed logging for debugging. - -3. **User Interface** - - Display clear status indicators for device connectivity and data updates. - - Show real-time power consumption and production data. - - Provide historical data visualization through graphs in Home Assistant. - - (Optional) Include energy cost calculations based on user-defined tariffs. - -**Technical Specifications** -1. **Code Quality** - - Adhere to Home Assistant’s development guidelines. - - Include comprehensive documentation for setup, usage, and troubleshooting. - - Write unit tests with at least 80% code coverage. - - Follow Python type hinting and PEP 8 style guidelines. - -2. **Security** - - Ensure secure connection handling with encrypted communication where applicable. - - Avoid hardcoded credentials and implement secure storage of sensitive data. - - Include proper input validation to prevent injection attacks. - - Implement rate limiting to prevent abuse or overload. - -**Submission Requirements** - -**Code Deliverables** -- Complete source code hosted on a public GitHub repository. -- Installation instructions for Home Assistant users. -- Configuration examples showcasing different setups. -- Testing instructions for reviewers to verify functionality. - -**Documentation** -- Detailed setup guide for end users. -- Explanation of configuration options and their use cases. -- Troubleshooting guide for common issues. -- API documentation for developers extending the integration. - -**Review Process** - -1. **Initial Screening** - - Code review for quality, adherence to guidelines, and security best practices. - - Verification of documentation completeness. - - Confirmation of test coverage (minimum 80%). - -2. **Technical Testing** - - Installation testing on a Home Assistant instance. - - Functionality verification against all requirements. - - Performance testing under normal and edge-case conditions. - - Security assessment for vulnerabilities. - -3. **Final Approval** - - Community review period (7 days) for feedback from other developers and users. - - Final technical review by the Zap team. - - Grant distribution and early access device shipping upon approval. - -**Timeline** -- **Challenge Open:** [Insert Date] -- **Submission Deadline:** Open until the first qualifying submission is approved. -- **Review Period:** Up to 14 days after submission. - -**Why Participate?** -By tackling this challenge, you’ll not only earn a grant but also: -- Gain early access to Zap P1-Meter hardware for testing and development. -- Be featured as a contributor in our growing Spark Initiative community. -- Help thousands of Home Assistant users monitor their energy usage sustainably. - -**How to Get Started** -1. Register your interest at [https://sourceful.energy/grants](https://sourceful.energy/grants). -2. Join our Discord community for updates, collaboration, and support. -3. Submit your integration via GitHub and notify us through the Spark Initiative channels. - -Let’s spark an energy revolution together! We can’t wait to see what you build. +# Zap Spark Initiative: Home Assistant Integration - Community Improvements + +## Challenge Overview + +We've created a reference implementation for the Zap P1-Meter Home Assistant integration, but we need the community's help to bring it to Home Assistant core standards. We're calling on talented developers to improve our open-source integration with UI configuration, multi-device support, comprehensive testing, and more. Help us create a professional integration that will be included in Home Assistant core! + +## Grant Amounts + +Multiple grants are available for specific improvements: +- **Config Flow Implementation (UI setup)**: 300 USDC +- **Multi-Device Support**: 200 USDC +- **Test Coverage (80%+)**: 200 USDC +- **DataUpdateCoordinator Migration**: 200 USDC +- **Additional improvements**: 100 USDC each + +*First come, first served - claim an issue on GitHub to get started!* + +## Who Can Participate + +This challenge is open to individual developers and teams who are passionate about Home Assistant and creating quality integrations. To participate, check the open issues at [github.com/frahlg/zap_hass](https://github.com/frahlg/zap_hass) and register at [sourceful.energy/grants](https://sourceful.energy/grants). + +## Current Implementation Status + +### What's Already Working +- ✅ HACS-compatible custom component +- ✅ 35+ sensors from OBIS codes +- ✅ Energy Dashboard integration +- ✅ Real-time power monitoring +- ✅ Device diagnostics and system info +- ✅ YAML-based configuration + +### What We Need + +## Priority Improvements for Core Inclusion + +### 1. Config Flow Implementation +- Replace YAML config with UI-based setup +- Add device discovery (mDNS/SSDP) +- Implement config validation +- Follow Home Assistant config flow guidelines +- Include options flow for settings + +### 2. Multi-Device Support +- Support multiple Zap devices per installation +- Unique entity naming per device +- Proper device registry management +- Handle device removal/addition + +### 3. Comprehensive Testing +- Achieve 80%+ test coverage with pytest +- Mock all API responses +- Test error conditions +- Test all sensor types +- Include integration tests + +### 4. DataUpdateCoordinator Pattern +- Migrate from current polling to DataUpdateCoordinator +- Implement proper error handling +- Add connection state management +- Follow HA best practices + +### 5. Additional Improvements +- Diagnostics support +- Repair suggestions +- Device triggers for automations +- Documentation improvements +- Code quality enhancements + +## Technical Requirements + +### Development Standards +- Follow [Home Assistant development guidelines](https://developers.home-assistant.io/docs/development_index) +- Use type hints throughout +- Implement proper logging +- Follow Python PEP 8 style +- Include docstrings + +### Integration Quality +- Meet [Home Assistant Integration Quality Scale](https://developers.home-assistant.io/docs/integration_quality_scale_index) requirements +- Implement proper error handling +- Add connection retry logic +- Handle edge cases gracefully + +### Testing Requirements +- Unit tests with pytest +- Mock external API calls +- Test coverage reports +- CI/CD integration + +## Submission Requirements + +### How to Contribute + +1. Review the current implementation at [github.com/frahlg/zap_hass](https://github.com/frahlg/zap_hass) +2. Check [open issues](https://github.com/frahlg/zap_hass/issues) for available tasks +3. Comment on an issue to claim it (one task per developer at a time) +4. Fork the repository and create a feature branch +5. Submit a pull request with: + - Implementation following task requirements + - Tests for new functionality + - Updated documentation + - Clear commit messages + +### Review Process +- Code review by Sourceful team +- Functionality testing with real Zap devices +- Home Assistant standards compliance check +- Community feedback period +- Grant payment upon PR merge + +## Why Participate? + +By improving this integration, you'll: +- 🏠 Help thousands of Zap users get official Home Assistant support +- 💡 Gain experience with Home Assistant core development +- 💰 Earn grants for your contributions +- 🏆 Be credited in the official integration +- 🤝 Join our growing developer community + +## Timeline + +- **Challenge Open**: Ongoing +- **Tasks Available**: First come, first served +- **Review Period**: 3-7 days per PR +- **Payment**: Within 7 days of PR merge + +## How to Get Started + +1. Visit [github.com/frahlg/zap_hass](https://github.com/frahlg/zap_hass) +2. Review the README and current code +3. Check [open issues](https://github.com/frahlg/zap_hass/issues) for available tasks +4. Claim an issue by commenting +5. Start coding! + +## Questions? + +Join our Discord at [discord.gg/sourceful](https://discord.gg/sourceful) #dev channel for support and discussion. + +**Let's work together to bring professional Zap integration to Home Assistant core!** 🚀 From f24ddf3d0311a67c5e29b34e92b01281b8b10581 Mon Sep 17 00:00:00 2001 From: Fredrik Ahlgren Date: Sun, 6 Jul 2025 08:23:35 +0200 Subject: [PATCH 7/8] Update links README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 41fbcb1..ddb3c79 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Multiple grants are available for specific improvements: ## Who Can Participate -This challenge is open to individual developers and teams who are passionate about Home Assistant and creating quality integrations. To participate, check the open issues at [github.com/frahlg/zap_hass](https://github.com/frahlg/zap_hass) and register at [sourceful.energy/grants](https://sourceful.energy/grants). +This challenge is open to individual developers and teams who are passionate about Home Assistant and creating quality integrations. To participate, check the open issues at [github.com/srcfl/zap-home-assistant](https://github.com/srcfl/zap-home-assistant) and register at [sourceful.energy/grants](https://sourceful.energy/grants). ## Current Implementation Status @@ -91,8 +91,8 @@ This challenge is open to individual developers and teams who are passionate abo ### How to Contribute -1. Review the current implementation at [github.com/frahlg/zap_hass](https://github.com/frahlg/zap_hass) -2. Check [open issues](https://github.com/frahlg/zap_hass/issues) for available tasks +1. Review the current implementation at [github.com/srcfl/zap-home-assistant](https://github.com/srcfl/zap-home-assistant) +2. Check [open issues](https://github.com/srcfl/zap-home-assistant/issues) for available tasks 3. Comment on an issue to claim it (one task per developer at a time) 4. Fork the repository and create a feature branch 5. Submit a pull request with: @@ -126,14 +126,14 @@ By improving this integration, you'll: ## How to Get Started -1. Visit [github.com/frahlg/zap_hass](https://github.com/frahlg/zap_hass) +1. Visit [github.com/srcfl/zap-home-assistant](https://github.com/srcfl/zap-home-assistant) 2. Review the README and current code -3. Check [open issues](https://github.com/frahlg/zap_hass/issues) for available tasks +3. Check [open issues](https://github.com/srcfl/zap-home-assistant/issues) for available tasks 4. Claim an issue by commenting 5. Start coding! ## Questions? -Join our Discord at [discord.gg/sourceful](https://discord.gg/sourceful) #dev channel for support and discussion. +Join our Discord at [discord.com/invite/srcful](https://discord.com/invite/srcful) #dev channel for support and discussion. **Let's work together to bring professional Zap integration to Home Assistant core!** 🚀 From 5a70a9913aab238507c497dd86533ef06b39e33e Mon Sep 17 00:00:00 2001 From: Fredrik Ahlgren Date: Sun, 6 Jul 2025 08:24:25 +0200 Subject: [PATCH 8/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ddb3c79..799f505 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Multiple grants are available for specific improvements: ## Who Can Participate -This challenge is open to individual developers and teams who are passionate about Home Assistant and creating quality integrations. To participate, check the open issues at [github.com/srcfl/zap-home-assistant](https://github.com/srcfl/zap-home-assistant) and register at [sourceful.energy/grants](https://sourceful.energy/grants). +This challenge is open to individual developers and teams who are passionate about Home Assistant and creating quality integrations. To participate, check the open issues at [github.com/srcfl/zap-home-assistant](https://github.com/srcfl/zap-home-assistant) ## Current Implementation Status