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

[iotawatt] Initial contribution #16491

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

PRosenb
Copy link
Contributor

@PRosenb PRosenb commented Mar 6, 2024

This PR adds a new binding for IoTaWatt, an open source power measuring device.
The first version aims to get feedback from the community and provide initial, basic functionality to measure power consumption.

Limitations of this version:

  • No authentication support
  • Support of IoTaWatt's Input channels with select values

Short discussion about the topic: Forum thread IoTaWatt

Any kinds of feedback is welcome, thank you.

Snapshot Download

@PRosenb PRosenb changed the title New binding io ta watt [iotawatt] New binding for IoTaWatt Mar 6, 2024
@PRosenb PRosenb changed the title [iotawatt] New binding for IoTaWatt [iotawatt][WIP] Initial contribution Mar 6, 2024
@jlaur jlaur added the new binding If someone has started to work on a binding. For a new binding PR. label Mar 6, 2024
@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/iotawatt/153849/3

@PRosenb PRosenb force-pushed the NewBindingIoTaWatt branch 2 times, most recently from 4bc5416 to 17eb8d7 Compare March 24, 2024 12:02
@PRosenb PRosenb marked this pull request as ready for review March 26, 2024 11:00
@PRosenb PRosenb requested a review from a team as a code owner March 26, 2024 11:00
@PRosenb PRosenb changed the title [iotawatt][WIP] Initial contribution [iotawatt] Initial contribution May 1, 2024
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thansk for this contribution. In general it seems already solid. Besides the minor comments, i guess there are two areas that i have questions about:

  1. exception handling / thing status details, see comments.
  2. thing-types. I see several power/energy rel;ated channels that have diffent quantitytypes declared compare to others bindings that have the same channels. Please double check.

bundles/org.openhab.binding.iotawatt/README.md Outdated Show resolved Hide resolved
bundles/org.openhab.binding.iotawatt/README.md Outdated Show resolved Hide resolved
public IoTaWattHandlerFactory() {
this.insecureClient = new HttpClient(new SslContextFactory.Client(true));
try {
this.insecureClient.start();
Copy link
Contributor

Choose a reason for hiding this comment

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

As you manually create and start the client. You should also stop and dispose it in this class to prevent any leaks.

PRosenb and others added 16 commits May 7, 2024 07:26
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Pete <8108165+PRosenb@users.noreply.github.com>
…/binding/iotawatt/internal/handler/IoTaWattHandler.java

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Pete <8108165+PRosenb@users.noreply.github.com>
…/binding/iotawatt/internal/handler/IoTaWattHandler.java

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Pete <8108165+PRosenb@users.noreply.github.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
…/thing/thing-types.xml

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Pete <8108165+PRosenb@users.noreply.github.com>
…/thing/thing-types.xml

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Pete <8108165+PRosenb@users.noreply.github.com>
…/thing/thing-types.xml

Co-authored-by: lsiepel <leosiepel@gmail.com>
Signed-off-by: Pete <8108165+PRosenb@users.noreply.github.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants