-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
4bc5416
to
17eb8d7
Compare
There was a problem hiding this 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:
- exception handling / thing status details, see comments.
- 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.
...ing.iotawatt/src/main/java/org/openhab/binding/iotawatt/internal/IoTaWattHandlerFactory.java
Outdated
Show resolved
Hide resolved
...ding.iotawatt/src/main/java/org/openhab/binding/iotawatt/internal/client/IoTaWattClient.java
Outdated
Show resolved
Hide resolved
...ding.iotawatt/src/main/java/org/openhab/binding/iotawatt/internal/client/IoTaWattClient.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.iotawatt/src/main/resources/OH-INF/addon/addon.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.iotawatt/src/main/resources/OH-INF/i18n/iotawatt.properties
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.iotawatt/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.iotawatt/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.iotawatt/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
a03441a
to
b7a6564
Compare
Many thanks @lsiepel for reviewing my PR by the way.
When I implemented the types, I was also not sure which ones to use. I had a look at the Shelly binding because I use it and it has quite a lot of types. Which one did you compare it to? What do you feel should it be changed to? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final comments added. According to the docs, the power related channels types are good. Only the units should be replace by a placeholder.
...ing.iotawatt/src/main/java/org/openhab/binding/iotawatt/internal/IoTaWattHandlerFactory.java
Show resolved
Hide resolved
...ng.iotawatt/src/main/java/org/openhab/binding/iotawatt/internal/handler/IoTaWattHandler.java
Outdated
Show resolved
Hide resolved
...ing.iotawatt/src/main/java/org/openhab/binding/iotawatt/internal/IoTaWattHandlerFactory.java
Outdated
Show resolved
Hide resolved
...openhab.binding.iotawatt/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.iotawatt/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.iotawatt/src/main/resources/OH-INF/thing/thing-types.xml
Show resolved
Hide resolved
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
@lsiepel I have issues with |
Hmm maybe try %% as unit. i have to search, but percentages have a different handling since a while. You can also check some otherbinding setting a percentage value. |
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. LGTM.
Let me know once you think this binding is tested enough to merge.
Many thanks for your review and good inputs @lsiepel. I tested it on a test setup but haven't yet installed an IoTaWatt on my switchboard because I need an electrician for that. I will have it installed in the coming weeks, set it up to monitor the whole house and integrate it into my rules. Should I find bugs at that stage I'll submit bug fixes. |
Now, you could add your binding's logo to the openHAB website. ` Please also see the updated documentation here - SVG is now preferred: |
Thanks for the hint @lsiepel, I added it here |
* [iotawatt] generate new binding Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com> Signed-off-by: Paul Smedley <paul@smedley.id.au>
* [iotawatt] generate new binding Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
* [iotawatt] generate new binding Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
* [iotawatt] generate new binding Signed-off-by: Peter Rosenberg <prosenb.dev@gmail.com>
This PR adds a new binding for IoTaWatt, an open source power measuring device.
Limitations of this version:
Short discussion about the topic: Forum thread IoTaWatt
Any kinds of feedback is welcome, thank you.
Snapshot Download