Skip to content
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

[dsmr] Handle cosem values that a have a unit or not, related to smarty meters #8383

Merged
merged 4 commits into from Sep 5, 2020

Conversation

Hilbrand
Copy link
Member

@Hilbrand Hilbrand commented Sep 2, 2020

And some minor cleanup fixes.

@TravisBuddy
Copy link

Travis tests were successful

Hey @Hilbrand,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
The telegram files have a checksum that includes the newlines. So it's important the specific newline endings always remain the same. The protocol uses windows line endings, therefor fixed to windows line endings. It was previously set to binary, but that makes it difficult to textual compare with git as it doesn't compare binary files.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
It appears some Luxembourg meters have a unit in the cosem value, while other meters don't report this value. This changes makes it possible to handle both cases.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
@TravisBuddy
Copy link

Travis tests were successful

Hey @Hilbrand,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@Hilbrand Hilbrand added the bug An unexpected problem or unintended behavior of an add-on label Sep 3, 2020
@fwolter fwolter merged commit 35c08e2 into openhab:2.5.x Sep 5, 2020
@wborn
Copy link
Member

wborn commented Sep 5, 2020

This PR seems to have broken the build now that Spotless is enabled:

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.0.3:check (codestyle_check) on project org.openhab.binding.dsmr: The following files had format violations:
[ERROR]     src/main/java/org/openhab/binding/dsmr/internal/device/SmartyDecrypter.java
[ERROR]         @@ -192,7 +192,7 @@
[ERROR]          ········reset();
[ERROR]          ········if·(plainText·==·null)·{
[ERROR]          ············telegramListener
[ERROR]         -············.telegramReceived(new·P1Telegram(Collections.emptyList(),·TelegramState.INVALID_ENCRYPTION_KEY));
[ERROR]         +····················.telegramReceived(new·P1Telegram(Collections.emptyList(),·TelegramState.INVALID_ENCRYPTION_KEY));
[ERROR]          ········}·else·{
[ERROR]          ············parser.parse(plainText,·plainText.length);
[ERROR]          ········}

wborn added a commit to wborn/openhab-addons that referenced this pull request Sep 5, 2020
PR openhab#8383 was created before Spotless was enforced.

Signed-off-by: Wouter Born <github@maindrain.net>
@wborn wborn mentioned this pull request Sep 5, 2020
@wborn
Copy link
Member

wborn commented Sep 5, 2020

It was to be expected so I'll trigger some builds on recent PRs to reduce the chance of it happening again. 😉

fwolter pushed a commit that referenced this pull request Sep 5, 2020
PR #8383 was created before Spotless was enforced.

Signed-off-by: Wouter Born <github@maindrain.net>
@fwolter fwolter added this to the 2.5.9 milestone Sep 5, 2020
@Hilbrand Hilbrand deleted the fix_smarty branch September 5, 2020 19:34
@wborn wborn mentioned this pull request Sep 8, 2020
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Sep 12, 2020
…ty meters (openhab#8383)

* [dsmr] Smarty fix for decrypting different length Initialization Vector
* [dsmr] Changed specific gitattributes to eol

The telegram files have a checksum that includes the newlines. So it's important the specific newline endings always remain the same. The protocol uses windows line endings, therefor fixed to windows line endings. It was previously set to binary, but that makes it difficult to textual compare with git as it doesn't compare binary files.

* [dsmr] Handle specific cosem values that can either have a unit or not

It appears some Luxembourg meters have a unit in the cosem value, while other meters don't report this value. This changes makes it possible to handle both cases.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Sep 12, 2020
PR openhab#8383 was created before Spotless was enforced.

Signed-off-by: Wouter Born <github@maindrain.net>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
…ty meters (openhab#8383)

* [dsmr] Smarty fix for decrypting different length Initialization Vector
* [dsmr] Changed specific gitattributes to eol

The telegram files have a checksum that includes the newlines. So it's important the specific newline endings always remain the same. The protocol uses windows line endings, therefor fixed to windows line endings. It was previously set to binary, but that makes it difficult to textual compare with git as it doesn't compare binary files.

* [dsmr] Handle specific cosem values that can either have a unit or not

It appears some Luxembourg meters have a unit in the cosem value, while other meters don't report this value. This changes makes it possible to handle both cases.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
PR openhab#8383 was created before Spotless was enforced.

Signed-off-by: Wouter Born <github@maindrain.net>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Oct 8, 2020
…ty meters (openhab#8383)

* [dsmr] Smarty fix for decrypting different length Initialization Vector
* [dsmr] Changed specific gitattributes to eol

The telegram files have a checksum that includes the newlines. So it's important the specific newline endings always remain the same. The protocol uses windows line endings, therefor fixed to windows line endings. It was previously set to binary, but that makes it difficult to textual compare with git as it doesn't compare binary files.

* [dsmr] Handle specific cosem values that can either have a unit or not

It appears some Luxembourg meters have a unit in the cosem value, while other meters don't report this value. This changes makes it possible to handle both cases.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Oct 8, 2020
PR openhab#8383 was created before Spotless was enforced.

Signed-off-by: Wouter Born <github@maindrain.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants