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

[omnikinverter] Add extra parameters (temperature, AC frequency, AC current, AC voltage and total hours running) #14244

Merged
merged 20 commits into from
Feb 2, 2023

Conversation

leansoft
Copy link
Contributor

@leansoft leansoft commented Jan 18, 2023

Added temperature sensor to the Omnikinvert addon:

  • [omnikinverter] Added temperature sensor information
  • [omnikinverter] Added extra AC information (frequency, voltage and current)
  • [omnikinverter] Added the total hours of generating power.
  • [omnikinverter] Fixed channel-types to prevent issue when adding items

Description

This PR adds an improvement and bugfix to the omnikinverter.

Signed-off-by: Dave <leansoft@users.noreply.github.com>
Prevents 'Received HTTP PUT request with an invalid item name' when adding items
Signed-off-by: Dave <leansoft@users.noreply.github.com>
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

Thanks for the channel and UoM fixes as well. I have provided some minor feedback mostly about typos.

@jlaur jlaur added the enhancement An enhancement or new feature for an existing add-on label Jan 18, 2023
leansoft and others added 8 commits January 19, 2023 09:53
…enhab/binding/omnikinverter/internal/OmnikInverterBindingConstants.java


Signed-off-by: Dave <leansoft@users.noreply.github.com>

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Dave <leansoft@users.noreply.github.com>

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
…enhab/binding/omnikinverter/internal/OmnikInverterMessage.java


Signed-off-by: Dave <leansoft@users.noreply.github.com>

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
…H-INF/thing/thing-types.xml


Signed-off-by: Dave <leansoft@users.noreply.github.com>

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
…H-INF/thing/thing-types.xml


Signed-off-by: Dave <leansoft@users.noreply.github.com>

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
openhab#14244 (comment)
Signed-off-by: Dave <leansoft@users.noreply.github.com>
Signed-off-by: Dave <leansoft@users.noreply.github.com>
Signed-off-by: Dave <leansoft@users.noreply.github.com>
leansoft and others added 3 commits January 19, 2023 13:41
[omnikinverter] Added extra data for AC and hours running (#1)
Signed-off-by: Dave <leansoft@users.noreply.github.com>
…H-INF/thing/thing-types.xml


Signed-off-by: Dave <leansoft@users.noreply.github.com>

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
…H-INF/thing/thing-types.xml


Signed-off-by: Dave <leansoft@users.noreply.github.com>

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
@leansoft leansoft changed the title [omnikinverter] added temperature of sensor [omnikinverter] added extra parameters (temprature, AC frequency, current and voltage and total hours running) Jan 19, 2023
@leansoft leansoft changed the title [omnikinverter] added extra parameters (temprature, AC frequency, current and voltage and total hours running) [omnikinverter] added extra parameters (temperature, AC frequency, AC current, AC voltage and total hours running) Jan 19, 2023
@leansoft leansoft requested a review from jlaur January 19, 2023 12:50
Signed-off-by: Dave <leansoft@users.noreply.github.com>
Signed-off-by: Dave <leansoft@users.noreply.github.com>
Removed newline
Signed-off-by: Dave <leansoft@users.noreply.github.com>
@leansoft leansoft requested a review from jlaur January 19, 2023 13:18
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

A few additional comments for new changes. Please also regenerate the I18N properties file - see https://www.openhab.org/docs/developer/utils/i18n.html#generating-i18n-properties-file

<label>Instantaneous Power</label>
<description>The instantaneous power generation for output 1</description>
</channel>
<channel id="powerAC1" typeId="system.electric-power">
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 actually a breaking change until openhab/openhab-core#2590 has been resolved, unfortunately. Even though the channel type is fully compatible, I believe this could be a problem for existing things configured in the UI.

You would either need to revert the channel type changes for existing channels or add a note here:
/~https://github.com/openhab/openhab-distro/blob/84f0e7d06e23befbb7a9bebe36783fc5f1665f18/distributions/openhab/src/main/resources/bin/update.lst#L95-L99

IMHO your refactoring/simplification makes sense, so either solution is fine by me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I Reverted this in f25b9b2
I also build it against 3.4.2 with the XML and everything works.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean that changing the underlying channel type for an existing channel is a breaking change (when the previous channel type id no longer exists). I'm fine with it, but it needs to be mentioned in the openhab-distro notes that users may have to re-create their things. You should be able to reproduce it if you go back to the previous version before your changes and create an item for one of these old channels - in the UI, so it will be managed. Then upgrade to this version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unresolving this for visibility until PR towards openhab-distro has been created. @leansoft, please remember about this.

* [Omnik] Added AC Voltage, Currrent and Frequency

Signed-off-by: Dave <leansoft@users.noreply.github.com>

* [Omnik] Added AC Voltage, Currrent and Frequency and total running hours

Signed-off-by: Dave <leansoft@users.noreply.github.com>

* [omnikinverter] Fixes for wrong method names

Signed-off-by: Dave <leansoft@users.noreply.github.com>

* [omnikinverter] Adjusted test to omnik test output

Signed-off-by: Dave <leansoft@users.noreply.github.com>

* [omnikinverter] XML syntax fix

Signed-off-by: Dave <leansoft@users.noreply.github.com>

* [omnikconverter] Reverted channel changes

Signed-off-by: Dave <leansoft@users.noreply.github.com>

* [omnikconverter] Reverted channel to things-types to prevent backward issues

Signed-off-by: Dave <leansoft@users.noreply.github.com>

* [omnikconverter] Regenerated Generating I18N properties file

As requested in PR
Signed-off-by: Dave <leansoft@users.noreply.github.com>

Signed-off-by: Dave <leansoft@users.noreply.github.com>
@leansoft leansoft requested a review from jlaur January 24, 2023 13:12
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

One more small iteration. Sorry for being absent the last few days.

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

LGTM

@jlaur jlaur merged commit baf077d into openhab:main Feb 2, 2023
@jlaur jlaur added this to the 4.0 milestone Feb 2, 2023
@jlaur jlaur changed the title [omnikinverter] added extra parameters (temperature, AC frequency, AC current, AC voltage and total hours running) [omnikinverter] Add extra parameters (temperature, AC frequency, AC current, AC voltage and total hours running) Feb 2, 2023
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
… current, AC voltage and total hours running) (openhab#14244)

* [omnikinverter] Added temperature sensor
* [Omnikinverter] Bugfix for wrong channeltype item-type

Prevents 'Received HTTP PUT request with an invalid item name' when adding items

* [Omnik] Added AC Voltage, Currrent and Frequency and total running hours

Signed-off-by: Dave <leansoft@users.noreply.github.com>
renescherer pushed a commit to renescherer/openhab-addons that referenced this pull request Mar 23, 2023
… current, AC voltage and total hours running) (openhab#14244)

* [omnikinverter] Added temperature sensor
* [Omnikinverter] Bugfix for wrong channeltype item-type

Prevents 'Received HTTP PUT request with an invalid item name' when adding items

* [Omnik] Added AC Voltage, Currrent and Frequency and total running hours

Signed-off-by: Dave <leansoft@users.noreply.github.com>
FordPrfkt pushed a commit to FordPrfkt/openhab-addons that referenced this pull request Apr 20, 2023
… current, AC voltage and total hours running) (openhab#14244)

* [omnikinverter] Added temperature sensor
* [Omnikinverter] Bugfix for wrong channeltype item-type

Prevents 'Received HTTP PUT request with an invalid item name' when adding items

* [Omnik] Added AC Voltage, Currrent and Frequency and total running hours

Signed-off-by: Dave <leansoft@users.noreply.github.com>
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.

2 participants