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] Add support for Austrian smart meter #11193

Closed
wants to merge 1 commit into from

Conversation

tknaller
Copy link

@tknaller tknaller commented Sep 3, 2021

Support for Austrian Smart Meter. Actually breaks everything, please do not approve pull request (failing tests make sure of that).

the issue is, that the austrian meters use a different quantitytype for the same OBISIdentifier

for example:
1-0:1.8.1(000230515*Wh)

vs:
1-0:1.8.1(123456.789*kWh)

which makes parsing/detecting impossible with the current system in the binding.

Signed-off-by: Thomas <thomas@knaller.info>
@tknaller tknaller requested a review from Hilbrand as a code owner September 3, 2021 07:48
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/dsmr-binding-for-austrian-smart-meters/90649/11

@Skinah Skinah changed the title austrian smart meter [dsmr] Add support for Austrian smart meter Sep 3, 2021
@Skinah Skinah added the enhancement An enhancement or new feature for an existing add-on label Sep 3, 2021
Hilbrand added a commit to Hilbrand/openhab-addons that referenced this pull request Oct 1, 2021
Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
<description>Production Tariff 2.</description>
<state pattern="%.1f %unit%" readOnly="true"/>
</channel-type>
<channel-type id="totalImportedRnergyRegisterRRate2NonKiloType">
Copy link
Contributor

Choose a reason for hiding this comment

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

TReplace RRnergy by Energy.

This name is very long (same remark for lots of your added channels). Any chance to reduce it, remaining consistent with other channels ? For example, is the ending "NonKiloType" really useful ? Is "register" useful ?

Comment on lines +390 to +391
<label>Total Imported Energy Rate2 (R+)</label>
<description>The Total imported energy register Rate2 (R+).</description>
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering the channel name, I guess that you should use "exported" in label and description.

<channel-type id="deliveryTariff2NonKiloType">
<item-type>Number:Energy</item-type>
<label>Delivery Tariff 2</label>
<description>Production Tariff 2.</description>
Copy link
Contributor

Choose a reason for hiding this comment

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

The description is probably wrong as exactly the same as for another channel.

<channel-type id="emeterDeliveryTariff1NonKiloType">
<item-type>Number:Energy</item-type>
<label>Delivery Tariff 1</label>
<description>Production Tariff 1.</description>
Copy link
Contributor

Choose a reason for hiding this comment

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

The description is probably wrong as exactly the same as for another channel.

Comment on lines +414 to +415
<label>Actual Power Delivery</label>
<description>Actual Power Delivery.</description>
Copy link
Contributor

Choose a reason for hiding this comment

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

Label and description are strictly the same as for the channel actualProductionNonKiloType. Please explain the difference at least in the description of both channels.

Comment on lines +402 to +403
<label>Total Imported Energy Rate1 (R+)</label>
<description>The Total imported energy register Rate1 (R+).</description>
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering the channel name, I guess that you should use "exported" in label and description.

<description>This is an electricity meter that complies to the Austria's Smarty V1.0 specification.</description>

<channels>
<channel id="emeter_actual_reactive_delivery" typeId="actualReactiveDeliveryType"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little strange to use _ for channel id while not for channel type.
Is it consistent with existing channels inj the binding ?


<channels>
<channel id="emeter_actual_reactive_delivery" typeId="actualReactiveDeliveryType"/>
<channel id="emeter_production_tariff1_non_kilo" typeId="productionTariff1NonKiloType"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment for all channels: is the "_non_kilo" really useful ?

Comment on lines +260 to +261


Copy link
Contributor

Choose a reason for hiding this comment

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

Please check the SAT results if you have something for these added blank lines.
Normally useless blank lines is not recommended.

Comment on lines +300 to +301


Copy link
Contributor

Choose a reason for hiding this comment

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

Same here. To be checked.

@lolodomo
Copy link
Contributor

@Hilbrand : can you please additionally review and comment ? I have some comments which may be relative to consistency with existing channels.

@Hilbrand
Copy link
Member

@lolodomo as this pr breaks things I'm not sure what what intended with this pr. However, I've already rewritten the support for Austrian meters (see the link above to my commit that GitHub linked when I pushed my changes), which removes all the additional non kilo channels added, as it's not needed. I'm intending to submit this as new pr, and than this pr can be closed. But I've not had time to submit that pr as I still wanted to let my changes run for some time on my own system as the code also contains some additional improvements and I worked on the Spotify improvements. So I'll hope to submit this pr soon and we can close this pr.

@tknaller
Copy link
Author

as said in my opening statement: don't use this pull request as.

thank you @Hilbrand for incorporating these features in Hilbrand@38f6eac
Further discussions there, i hereby close my PR

@tknaller tknaller closed this Oct 24, 2021
Hilbrand added a commit to Hilbrand/openhab-addons that referenced this pull request Oct 25, 2021
Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Hilbrand added a commit to Hilbrand/openhab-addons that referenced this pull request Oct 27, 2021
Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
fwolter pushed a commit that referenced this pull request Oct 30, 2021
…11458)

* Fix fix for channel id detection, Added missing channels to emucs electra

- M-bus channels are dynamic and present in the obis id.
The binding had most channel types fixed because most of the time these channels are the same.
However the device identifier is the same for multiple devices.
But the binding only registered only one and while the channel id was derived from this obis data.
For detected meters this resulted in the channel id to be the same if there are multiple devices.
This change looks at the channel id to assign it to the found device.
This is a bit tricky because the general device has no channel and has channels that have different id's.
So the binding needs to cover that case.

This change also adds some optional channels to the emucs electra meter.

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

* [dsmr] Add support for Austrian meters

Improved the work done in pr #11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

* [dsmr] Added Null handling annotations.
dschoepel pushed a commit to dschoepel/openhab-addons that referenced this pull request Nov 9, 2021
…penhab#11458)

* Fix fix for channel id detection, Added missing channels to emucs electra

- M-bus channels are dynamic and present in the obis id.
The binding had most channel types fixed because most of the time these channels are the same.
However the device identifier is the same for multiple devices.
But the binding only registered only one and while the channel id was derived from this obis data.
For detected meters this resulted in the channel id to be the same if there are multiple devices.
This change looks at the channel id to assign it to the found device.
This is a bit tricky because the general device has no channel and has channels that have different id's.
So the binding needs to cover that case.

This change also adds some optional channels to the emucs electra meter.

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

* [dsmr] Add support for Austrian meters

Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

* [dsmr] Added Null handling annotations.

Signed-off-by: Dave J Schoepel <dave@theschoepels.com>
jpg0 pushed a commit to jpg0/openhab-addons that referenced this pull request Nov 10, 2021
…penhab#11458)

* Fix fix for channel id detection, Added missing channels to emucs electra

- M-bus channels are dynamic and present in the obis id.
The binding had most channel types fixed because most of the time these channels are the same.
However the device identifier is the same for multiple devices.
But the binding only registered only one and while the channel id was derived from this obis data.
For detected meters this resulted in the channel id to be the same if there are multiple devices.
This change looks at the channel id to assign it to the found device.
This is a bit tricky because the general device has no channel and has channels that have different id's.
So the binding needs to cover that case.

This change also adds some optional channels to the emucs electra meter.

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

* [dsmr] Add support for Austrian meters

Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

* [dsmr] Added Null handling annotations.
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
…penhab#11458)

* Fix fix for channel id detection, Added missing channels to emucs electra

- M-bus channels are dynamic and present in the obis id.
The binding had most channel types fixed because most of the time these channels are the same.
However the device identifier is the same for multiple devices.
But the binding only registered only one and while the channel id was derived from this obis data.
For detected meters this resulted in the channel id to be the same if there are multiple devices.
This change looks at the channel id to assign it to the found device.
This is a bit tricky because the general device has no channel and has channels that have different id's.
So the binding needs to cover that case.

This change also adds some optional channels to the emucs electra meter.

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

* [dsmr] Add support for Austrian meters

Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

* [dsmr] Added Null handling annotations.

Signed-off-by: Nick Waterton <n.waterton@outlook.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
…penhab#11458)

* Fix fix for channel id detection, Added missing channels to emucs electra

- M-bus channels are dynamic and present in the obis id.
The binding had most channel types fixed because most of the time these channels are the same.
However the device identifier is the same for multiple devices.
But the binding only registered only one and while the channel id was derived from this obis data.
For detected meters this resulted in the channel id to be the same if there are multiple devices.
This change looks at the channel id to assign it to the found device.
This is a bit tricky because the general device has no channel and has channels that have different id's.
So the binding needs to cover that case.

This change also adds some optional channels to the emucs electra meter.

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

* [dsmr] Add support for Austrian meters

Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

* [dsmr] Added Null handling annotations.
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
…penhab#11458)

* Fix fix for channel id detection, Added missing channels to emucs electra

- M-bus channels are dynamic and present in the obis id.
The binding had most channel types fixed because most of the time these channels are the same.
However the device identifier is the same for multiple devices.
But the binding only registered only one and while the channel id was derived from this obis data.
For detected meters this resulted in the channel id to be the same if there are multiple devices.
This change looks at the channel id to assign it to the found device.
This is a bit tricky because the general device has no channel and has channels that have different id's.
So the binding needs to cover that case.

This change also adds some optional channels to the emucs electra meter.

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

* [dsmr] Add support for Austrian meters

Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

* [dsmr] Added Null handling annotations.
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
…penhab#11458)

* Fix fix for channel id detection, Added missing channels to emucs electra

- M-bus channels are dynamic and present in the obis id.
The binding had most channel types fixed because most of the time these channels are the same.
However the device identifier is the same for multiple devices.
But the binding only registered only one and while the channel id was derived from this obis data.
For detected meters this resulted in the channel id to be the same if there are multiple devices.
This change looks at the channel id to assign it to the found device.
This is a bit tricky because the general device has no channel and has channels that have different id's.
So the binding needs to cover that case.

This change also adds some optional channels to the emucs electra meter.

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

* [dsmr] Add support for Austrian meters

Improved the work done in pr openhab#11193

Also-by: Thomas <thomas@knaller.info>
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

* [dsmr] Added Null handling annotations.
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.

5 participants