-
-
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
[senechome] Avoid null pointer errors #12512
[senechome] Avoid null pointer errors #12512
Conversation
NOTE: Needs to be tested. Theoretically, it should work but coded all with my best gut feeling! I'm currently on a milestone release and getting this error:
No idea how to solve this and test my own work 😞 |
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.
Thanks - just a single comment with some advise to be sure problem is fixed and improve reliability. Perhaps it would also be worth checking if there are any null annotation warnings, didn't try to run a build myself.
...binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeHandler.java
Show resolved
Hide resolved
c02b912
to
18ebdc5
Compare
See: #12512 (comment) |
I managed to get it working just now. I had to wipe userdata/{cache,tmp}. I'm going to update the PR once I'm done with testing. |
I understand, but that was only part of the suggestion. Please see #12512 (comment). |
@eguib Want to take a look at this PR? 👀 |
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.
Thanks for fixing this.
Let me know when you are ready for having it merged. :) |
...binding.senechome/src/main/java/org/openhab/binding/senechome/internal/SenecHomeHandler.java
Show resolved
Hide resolved
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.
See #12512 (comment)
18ebdc5
to
e91e5fb
Compare
@jlaur We are ready to go! Feel free to take a last look and, if everything is fine, push the merge button 😄 |
e91e5fb
to
42c25df
Compare
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.
LGTM
One last thing: Can you shorten the commit message: https://www.openhab.org/docs/developer/contributing.html#conventions And fix the co-signers: |
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.
Thank you for the patch
Ok, corrected the signed-of tags. Made @eguib "also-by".
|
42c25df
to
c570d78
Compare
Looks like the new generation of SenecIES power storage systems, which are using LiPo technology, provide additional data in the JSON array. This data is not available in the old generation, which lead to missing data, when asking for a key and in further null pointer exceptions when going deeper in the data structure. Therefore making a trivial check to detect the new generation of devices and skip the troubling section entirely. CON: The section of items would not be updated. A to-do is of course to split the old and new generation into separate models of devices. Fixes openhab#11606 Also-By: Erwin Guib <eguib@web.de> Signed-off-by: Thomas Karl Pietrowski <thopiekar@gmail.com> Signed-off-by: Korbinian Probst <kp.droid.dev@gmail.com>
c570d78
to
07069ba
Compare
It's fine! I might have mixed up something previously. It's ready to go, thanks for the fix. I can tweak the sign-off further when squash-merging as I believe there should be only one sign-off, so I would move Korbinian to "Also-By". Please confirm. After that I'll merge. |
Well, @KorbinianP didn't take a look at the problem in-depth, but reviewed @eguib 's and my solution. Therefore I would keep the sense and keep him "signed-off-by". |
.. otherwise someone might get questions, look into the commit message and contact him about why the heck something has been done as is. I mean yeah, he knows the case now, but logically I would keep the commit as it is. |
For such small commit I guess the usual approach would be simply letting the committer sign-off the commit. But since you insist, I have to consult other maintainers, since I'm not fully aware of the rules. @openhab/add-ons-maintainers - is it allowed to have more than one "Signed-off-by" in commit message? The DCO check passes, but it seems inconsistent being able to mix "Signed-off-by" and "Also-by" this way - it could even obsolete "Also-by" if you could just choose to have multiple "Signed-off by" instead? |
I'm not sure about the rules in detail here, too, just following my logic and my gut feeling. |
Hello, how do I sign off if I don't commit anything? Or how can I help to get this merged? |
The person creating the PR adds the "sign off" commit message and ensures that other contributors also certify the DCO. The other contributors are then added in the "Also-By" line: See: https://www.openhab.org/docs/developer/contributing.html#sign-your-work
The "DCO check" only checks that the last line of a commit message is So when all contributors certify the Developer Certificate of Origin (DCO), the PR can be squashed with the following lines at the end of the commit message:
|
Cool, thank you all! |
Thank you for the explanation @wborn |
Looks like the new generation of SenecIES power storage systems, which are using LiPo technology, provide additional data in the JSON array. This data is not available in the old generation, which lead to missing data, when asking for a key and in further null pointer exceptions when going deeper in the data structure. Therefore making a trivial check to detect the new generation of devices and skip the troubling section entirely. CON: The section of items would not be updated. A to-do is of course to split the old and new generation into separate models of devices. Fixes openhab#11606 Also-By: Erwin Guib <eguib@web.de> Also-By: Korbinian Probst <kp.droid.dev@gmail.com> Signed-off-by: Thomas Karl Pietrowski <thopiekar@gmail.com> Signed-off-by: Nick Waterton <n.waterton@outlook.com>
Looks like the new generation of SenecIES power storage systems, which are using LiPo technology, provide additional data in the JSON array. This data is not available in the old generation, which lead to missing data, when asking for a key and in further null pointer exceptions when going deeper in the data structure. Therefore making a trivial check to detect the new generation of devices and skip the troubling section entirely. CON: The section of items would not be updated. A to-do is of course to split the old and new generation into separate models of devices. Fixes openhab#11606 Also-By: Erwin Guib <eguib@web.de> Also-By: Korbinian Probst <kp.droid.dev@gmail.com> Signed-off-by: Thomas Karl Pietrowski <thopiekar@gmail.com>
Looks like the new generation of SenecIES power storage systems, which are using LiPo technology, provide additional data in the JSON array. This data is not available in the old generation, which lead to missing data, when asking for a key and in further null pointer exceptions when going deeper in the data structure. Therefore making a trivial check to detect the new generation of devices and skip the troubling section entirely. CON: The section of items would not be updated. A to-do is of course to split the old and new generation into separate models of devices. Fixes openhab#11606 Also-By: Erwin Guib <eguib@web.de> Also-By: Korbinian Probst <kp.droid.dev@gmail.com> Signed-off-by: Thomas Karl Pietrowski <thopiekar@gmail.com> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Looks like the new generation of SenecIES power storage systems, which are using LiPo technology, provide additional data in the JSON array. This data is not available in the old generation, which lead to missing data, when asking for a key and in further null pointer exceptions when going deeper in the data structure. Therefore making a trivial check to detect the new generation of devices and skip the troubling section entirely. CON: The section of items would not be updated. A to-do is of course to split the old and new generation into separate models of devices. Fixes openhab#11606 Also-By: Erwin Guib <eguib@web.de> Also-By: Korbinian Probst <kp.droid.dev@gmail.com> Signed-off-by: Thomas Karl Pietrowski <thopiekar@gmail.com>
Looks like the new generation of SenecIES power storage systems, which are using LiPo technology, provide additional data in the JSON array.
This data is not available in the old generation, which lead to missing data, when asking for a key and in further null pointer exceptions when going deeper in the data structure.
Therefore making a trivial check to detect the new generation of devices and skip the troubling section entirely.
CON: The section of items would not be updated. A to-do is of course to split the old and new generation into separate models of devices.
Fixes #11606
Also-By: Erwin Guib eguib@web.de
Signed-off-by: Thomas Karl Pietrowski thopiekar@gmail.com
Signed-off-by: Korbinian Probst kp.droid.dev@gmail.com