-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sonnen] Initial contribution of new binding for solar battery #11915
Conversation
You broke the BOM POM (you forgot a tag). That's the reason of the failing build. |
Signed-off-by: chingon007 <tron81@gmx.de>
Signed-off-by: chingon007 <tron81@gmx.de>
Thanks, just a small copy & paste error. Now it should work. |
@lolodomo Ready to review. Clean and building :-) |
Bravo ;) I will review your proposal certainly next year now ;) |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/new-binding-sonnen-battery/129178/2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review part 1 of 2
bundles/org.openhab.binding.sonnen/src/main/feature/feature.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
...binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenBindingConstants.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
....openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenHandler.java
Show resolved
Hide resolved
....openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenHandler.java
Outdated
Show resolved
Hide resolved
...g.sonnen/src/main/java/org/openhab/binding/sonnen/communication/SonnenJSONCommunication.java
Outdated
Show resolved
Hide resolved
...es/org.openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/utilities/Helper.java
Outdated
Show resolved
Hide resolved
Signed-off-by: chingon007 <tron81@gmx.de>
…d 2 for Battery Feeding and Dispense Signed-off-by: chingon007 <tron81@gmx.de>
Signed-off-by: chingon007 <tron81@gmx.de>
Signed-off-by: chingon007 <tron81@gmx.de>
Signed-off-by: chingon007 <tron81@gmx.de>
Signed-off-by: chingon007 <tron81@gmx.de>
...g.sonnen/src/main/java/org/openhab/binding/sonnen/communication/SonnenJSONCommunication.java
Outdated
Show resolved
Hide resolved
...g.sonnen/src/main/java/org/openhab/binding/sonnen/communication/SonnenJSONCommunication.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.sonnen/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
....openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenHandler.java
Outdated
Show resolved
Hide resolved
....openhab.binding.sonnen/src/main/java/org/openhab/binding/sonnen/internal/SonnenHandler.java
Outdated
Show resolved
Hide resolved
When I try to compile your branch, I have errors with wrong copyrights. It looks like the compiler is using the check with 2021 and not 2022. How do you solve that to get a full compilation (mvn clean install) ? Edit: works of course with mvn clean install -DskipChecks |
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
I just open a PR to your repo to provide the default translations properties file. |
I had the same problem. I was wondering how to update the local mvn install. However I switched back the copyright 2021 in order to compile and then changed it back to 2022 |
Provide the default translations properties
I created another PR that resolves the Note that you should move all your classes in internal packages. I discovered that some of them are not. I let you change that. |
Remove @nullable config
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
I created a last PR with an improved class SonnenJSONCommunication resolving our discussions about nullable batteryData and some of my other review comments for this class. It is ok to keep batteryData nullable but it has to be set to null when appropriate. |
I submitted to your repo a new PR to finalize the thing definition and the documentation. |
Improved thing types and documentation
Thats great. Very much appreciated. |
I will work on that in the next days, as soon as I have time again. |
Signed-off-by: chingon007 <tron81@gmx.de>
Signed-off-by: chingon007 <tron81@gmx.de>
I submitted a PR with my last enhancements regarding java code. |
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@chingon007 : you implemented your thing handler in such a way the refresh job is started only when at least one channel is linked. This is correct in theory but adds a lot of complexity to your thing handler, while in practice you have no user that will create a thing without linking at least one channel. In fact, this will only happen during a short time when setting up the binding. I let you decide, I think the code is OK but you have to test it seriously in case you want to keep your optimization.. |
Enhancement of the thing handler
Thanks a lot. I appreciate it. With this change I will make an enhancement to my other older binding in order to improve the code there as well. |
Thanks for the hint. I took that implementation from a other binding when I developed my first binding over a year ago. I understand what you mean. For the moment I will keep it and consider it to change it in the future. |
Note that the way I changed with your method now returning the error message or an empty string is probably not the best implementation. Using an exception would have been probably a better implementation.
Ok I will have a final look today but everything is certainly ok now. Do you need time to test again that everything is still working or can I merge if I have no other comments ? |
Signed-off-by: chingon007 <tron81@gmx.de>
I made just now the final testing. Found some typos. After this recent commit is passed it can be merged. Thanks a lot for your contribution. |
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
I just submitted a last PR adding 2 missing channels in README and with the last run of the i18n tool. |
2 channels added in README + last run of i18n tool
Thanks. You are right. I forgot to add them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
@chingon007 : thank your for contributing this new binding. Now, you could add your binding's logo to the openHAB website. See https://www.openhab.org/docs/developer/bindings/#add-your-binding-s-logo-to-the-openhab-website |
…ab#11915) * Initial contribution of sonnen binding Signed-off-by: chingon007 <tron81@gmx.de> Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
…ab#11915) * Initial contribution of sonnen binding Signed-off-by: chingon007 <tron81@gmx.de>
…ab#11915) * Initial contribution of sonnen binding Signed-off-by: chingon007 <tron81@gmx.de>
…ab#11915) * Initial contribution of sonnen binding Signed-off-by: chingon007 <tron81@gmx.de> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
…ab#11915) * Initial contribution of sonnen binding Signed-off-by: chingon007 <tron81@gmx.de>
…ab#11915) * Initial contribution of sonnen binding Signed-off-by: chingon007 <tron81@gmx.de> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Initial contribution for a new binding which communicates with a solar battery from sonnen. It is a simple read only binding which just reads the values of the solar battery.
I mentioned my initiative in the forum here: https://community.openhab.org/t/new-binding-sonnen-battery/129178
Regards
Chingon