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

[modbus][sunspec] Support for SunSpec meters #7441

Merged
merged 4 commits into from
Apr 24, 2020

Conversation

mrbig
Copy link

@mrbig mrbig commented Apr 22, 2020

This is the last of my PRs of the new modbus/sunspec binding. First PR is #6331. This is also a split of the legacy PR #4220

Related issue: #3216

This one introduces a new inverter type for smart meters. The specification handles 4 meter types, but they share a common dataset. The only difference is in that 2, 3 phase inverters use more registers.

As with the others I've organized the channels into channel group by phase, so the thing type descriptions could be simpler to maintain.

Raw data is first parsed by the MeterModelParser into simple (unitless) types, then MeterHandler scales them and matches them with the correct unit and channel.

Thank you

This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.


Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
@TravisBuddy
Copy link

Travis tests were successful

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

@cpmeister cpmeister added the enhancement An enhancement or new feature for an existing add-on label Apr 22, 2020
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
@TravisBuddy
Copy link

Travis tests were successful

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

This way we could get rid of ~250 loc.


Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
…decimal dots

Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
@TravisBuddy
Copy link

Travis tests were successful

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

@mrbig
Copy link
Author

mrbig commented Apr 24, 2020

Please note, I've included one more quick fix that technically reverts this change It caused problems when this bundle was run on OH 2.5.3 and I didn't want to risk the same issue in release.
If you'd rather have this in a separate PR please let me know.

Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpmeister cpmeister merged commit 31af81e into openhab:2.5.x Apr 24, 2020
@cpmeister cpmeister added this to the 2.5.5 milestone Apr 24, 2020
@mrbig
Copy link
Author

mrbig commented Apr 24, 2020

Thanks again for reviewing and merging this!

yfre pushed a commit to yfre/openhab-addons that referenced this pull request Apr 27, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Signed-off-by: Eugen Freiter <freiter@gmx.de>
LoungeFlyZ pushed a commit to LoungeFlyZ/openhab2-addons that referenced this pull request Jun 8, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
J-N-K pushed a commit to J-N-K/openhab-addons that referenced this pull request Jul 14, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Signed-off-by: CSchlipp <christian@schlipp.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
* [sunspec] Support for SunSpec meters
This commit adds support for SunSpec compatible meters. They are auto discovered
and handled as separate things even if they are part of another device.
This is due to the nature of the SunSpec format wich also handles
the different report types as different blocks.
* [sunspec] fixed file endings and missing unit declaration
* [sunspec] meter block dto refactored
This way we could get rid of ~250 loc.
* [sunspec] make sure we don't fail if the address/block size contains decimal dots
Some older installations of OpenHAB returned this values incorrectly

Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants