-
-
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
[airgradient] Initial contribution #16584
Conversation
AirGradient are open source and open hardware air quality sensors that you can read values from through a cloud API or directly from the device. Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
(I am not able to set "new binding" label) |
It does not build. I let you check the logs but I already see that a required file is missing in bom folder. |
Thanks to lolodomo for the find! Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Thank you @lolodomo ! I had some issues with forgetting signoffs on some commits and forgot that change when I started from scratch. |
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.
Hi, this is not a full review and I am not a maintainer.
I just double checked for SAT warnings (just a few, see below), checked that javadoc runs without errors (the warnings are fine), and quickly looked into the README.
Find my suggestions below.
...nt/src/main/java/org/openhab/binding/airgradient/internal/handler/AirGradientAPIHandler.java
Outdated
Show resolved
Hide resolved
.../org/openhab/binding/airgradient/internal/discovery/AirGradientMDNSDiscoveryParticipant.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/openhab/binding/airgradient/internal/handler/AirGradientAPIHandlerTest.java
Outdated
Show resolved
Hide resolved
...st/java/org/openhab/binding/airgradient/internal/handler/AirGradientLocationHandlerTest.java
Outdated
Show resolved
Hide resolved
Thank you, @holgerfriedrich Co-authored-by: Holger Friedrich <mail@holger-friedrich.de> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Thank you, @holgerfriedrich! I believe all your excellent suggestions are incorporated now. |
- Required token (not required for local) - Stack trace when emptying inbox Make some more constants. Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Thanks for your contribution!. As there are more new bindings waiting to be reviewed, and usually new bindings can take up some time to be reviewed and adjusted, i would like to ask you to do a selff-review before a maintainer picks this up. ftr: it is not mandatory, it is just an attempt to improve the experience/time spend on PR's. Let's see if this turns out to be a step in the good direction. |
Thank you, @lsiepel ! I'm currently traveling, but will run that self check when I am back in about a week. |
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
@lsiepel I have now gone through the review checklist and fixed the two issues I found. There is one point there I might still be sinning against: 32. Cache results of getConfigAs(). Reading it more frequently got rid of many non-null warnings. Do you have any guidance for how to deal with config null safe? |
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
used to debug the sensors when troubleshooting. Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
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 performing the self-review. Code is allready in a good shape, i just have some comments and questions.
...c/main/java/org/openhab/binding/airgradient/internal/handler/AirGradientLocationHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/addon/addon.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/discovery/AirGradientLocationDiscoveryService.java Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/handler/AirGradientAPIHandler.java Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/handler/AirGradientAPIHandler.java Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/handler/AirGradientAPIHandler.java Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/handler/AirGradientAPIHandler.java Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/handler/AirGradientAPIHandler.java Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/handler/AirGradientAPIHandler.java Co-authored-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Can you give some insights of the size (lines changed) and the estimated time of publishing the PR? |
The one with model property and separating out creating of states from the controller (for reuse):
The local thing:
Both PRs are ready, but I dont want to feature creep this review unless you are OK with it. |
It’s ok, just add it to this pr |
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Thank you! I'm sorry for adding more. My only defense is that May in Norway is filled with vacation days, and some of them has had bad weather :) |
.../org/openhab/binding/airgradient/internal/discovery/AirGradientLocationDiscoveryService.java
Outdated
Show resolved
Hide resolved
.../org/openhab/binding/airgradient/internal/discovery/AirGradientLocationDiscoveryService.java
Outdated
Show resolved
Hide resolved
.../org/openhab/binding/airgradient/internal/discovery/AirGradientLocationDiscoveryService.java
Outdated
Show resolved
Hide resolved
.../org/openhab/binding/airgradient/internal/discovery/AirGradientMDNSDiscoveryParticipant.java
Outdated
Show resolved
Hide resolved
…hab/binding/airgradient/internal/discovery/AirGradientLocationDiscoveryService.java Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/discovery/AirGradientLocationDiscoveryService.java Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/discovery/AirGradientMDNSDiscoveryParticipant.java Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…hab/binding/airgradient/internal/discovery/AirGradientLocationDiscoveryService.java Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Thank you, @jlaur! |
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
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.
One question and some very minor last comments. I think these are the last ones.
bundles/org.openhab.binding.airgradient/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
...inding.airgradient/src/main/java/org/openhab/binding/airgradient/internal/model/Measure.java
Outdated
Show resolved
Hide resolved
...irgradient/src/main/java/org/openhab/binding/airgradient/internal/handler/MeasureHelper.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Thanks for you contribution! Now, you could add your binding's logo to the openHAB website. See https://www.openhab.org/docs/developer/addons/#add-your-add-on-s-logo-to-the-openhab-website |
openhab/openhab-docs#2296 Logo pull request |
* [airgradient] Initial contribution AirGradient are open source and open hardware air quality sensors that you can read values from through a cloud API or directly from the device. Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* [airgradient] Initial contribution AirGradient are open source and open hardware air quality sensors that you can read values from through a cloud API or directly from the device. Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* [airgradient] Initial contribution AirGradient are open source and open hardware air quality sensors that you can read values from through a cloud API or directly from the device. Signed-off-by: Jørgen Austvik <jaustvik@acm.org> Signed-off-by: Paul Smedley <paul@smedley.id.au>
* [airgradient] Initial contribution AirGradient are open source and open hardware air quality sensors that you can read values from through a cloud API or directly from the device. Signed-off-by: Jørgen Austvik <jaustvik@acm.org> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
* [airgradient] Initial contribution AirGradient are open source and open hardware air quality sensors that you can read values from through a cloud API or directly from the device. Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* [airgradient] Initial contribution AirGradient are open source and open hardware air quality sensors that you can read values from through a cloud API or directly from the device. Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
New binding: Airgradient
This binding lets you get data from https://www.airgradient.com/ air quality sensors and use them for you home automation or dashboards.
AirGradient air quality sensors are open source and open hardware, so should be attractive for home automation enthusiasts.
This binding can either poll from data from the AirGradient Cloud API or communicate directly to sensors on the network.
The binding has been tested against the latest firmware with both outdoor O-1PST and indoor I-9PSL sensors.
It has a thread here: https://community.openhab.org/t/airgradient-api-binding/152798