[sunsynk] Add support for solar strings, fix for battery status and misc improvements#19506
[sunsynk] Add support for solar strings, fix for battery status and misc improvements#19506lsiepel merged 12 commits intoopenhab:mainfrom LeeC77:Sunynk-Updates
Conversation
|
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/new-sun-synk-connect-account-and-inverter-binding/155680/13 |
|
Could you please seperate bug fixes and enhancements? This makes it easier to review, backport and properly add it to the release notes. |
|
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/new-sun-synk-connect-account-and-inverter-binding/155680/1 |
Do you want two separate Pull Requests or just separated git commits? |
…attery-dc Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
I meant seperate PR's |
Given that the fix is so trivial is this necessary? Understand I got it wrong could it be overlooked please. |
Not a big issue, but as a consequence i prefer not to backport this PR. For future PR's please remember this. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for solar string data collection, fixes battery status channel updates, and includes various robustness improvements for the SunSynk binding. The changes enable monitoring of individual solar strings (voltage, current, power), plant-level solar statistics, and grid frequency, while improving API error handling and rate limiting.
Key changes:
- Added support for two solar string channels (voltage, current, power) and plant-level summary data (energy totals, efficiency, AC power, inverter capacity)
- Fixed battery channel constant names (changed from "battery-grid-" to "battery-dc-")
- Enhanced API error handling with per-call status tracking and improved logging
Reviewed Changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| thing-types.xml | Added new channel definitions for solar strings, grid frequency, inverter capacity, and plant summary data; fixed spelling errors |
| sunsynk.properties | Added i18n strings for new channels and corrected spelling errors |
| SunSynkInverterHandler.java | Implemented new channels, added status flag checking for API calls, and improved error messages |
| SunSynkHandlerFactory.java | Updated debug messages with version identifier |
| SunSynkAccountHandler.java | Improved error messages and bridge status updates |
| SunSynkAccountDiscoveryService.java | Added plant ID and name to discovered inverter properties |
| SunSynkInverterConfig.java | Added plantId and plantName configuration fields |
| PlantSummary.java | New DTO class for plant summary data from API |
| RealTimeInData.java | Refactored to track individual string data instead of aggregated solar power |
| DeviceController.java | Added plant summary API call, improved URL construction, enhanced error handling with status flags |
| Grid.java | Added grid frequency getter and fixed spelling in toString |
| Details.java | Added plant ID and name extraction from API response |
| Client.java | Fixed spelling errors in comments and strings |
| Battery.java | Added getters for code and msg fields |
| Daytemps.java | Added getters for code and msg fields |
| Inverter.java | Added plantId and plantName fields with getters/setters |
| Settings.java | Added getters for code and msg fields; fixed spelling in toString |
| SunSynkLogin.java | Fixed spelling in comment |
| AccountController.java | Improved error messages, refresh token validation, and trace logging |
| SunSynkBindingConstants.java | Added new channel constants and fixed battery channel constant names |
| feature.xml | Added commented-out alternative configuration lines |
| README.md | Updated documentation with new channels, plant configuration requirements, and tested equipment list |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...binding.sunsynk/src/main/java/org/openhab/binding/sunsynk/internal/api/DeviceController.java
Outdated
Show resolved
Hide resolved
...binding.sunsynk/src/main/java/org/openhab/binding/sunsynk/internal/api/DeviceController.java
Outdated
Show resolved
Hide resolved
...binding.sunsynk/src/main/java/org/openhab/binding/sunsynk/internal/api/DeviceController.java
Outdated
Show resolved
Hide resolved
...nsynk/src/main/java/org/openhab/binding/sunsynk/internal/handler/SunSynkInverterHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sunsynk/src/main/feature/feature.xml
Outdated
Show resolved
Hide resolved
…e typo. Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
…ines Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
...inding.sunsynk/src/main/java/org/openhab/binding/sunsynk/internal/api/AccountController.java
Outdated
Show resolved
Hide resolved
...binding.sunsynk/src/main/java/org/openhab/binding/sunsynk/internal/api/DeviceController.java
Show resolved
Hide resolved
...unsynk/src/main/java/org/openhab/binding/sunsynk/internal/handler/SunSynkHandlerFactory.java
Outdated
Show resolved
Hide resolved
…ation and code Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
…bility Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
I hope I did this correct: added thing upgrade instructions. |
...binding.sunsynk/src/main/java/org/openhab/binding/sunsynk/internal/api/DeviceController.java
Outdated
Show resolved
Hide resolved
Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
Signed-off-by: LeeC77 <lee.charlton00@gmail.com>
Thanks Isiepel for your review and support, I'm still learning and your help makes this easy. Thanks. |
Improvements to binding.sunsynk
Sparked by a bug and feature requests here:
https://community.openhab.org/t/new-sun-synk-connect-account-and-inverter-binding/155680/11?u=leec77
The JAR is here if you want to test: Build JAR
Corrected the status update of the channels.
Added support for.
Added support for solar panel strings.
Robustness improvements
Readme updated