-
-
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
[Netatmo] Binding rewrite without external dependencies #12357
Conversation
Due to huge number of conflicting file I closed previous PR and restarted clean. This version runs on my production system, so you should be able to test it right now. Some code cleaning still has to be done due to majors changes introduced by API evolutions. @mdillmann, @Novanic , @robnielsen, @jlaur , @lolodomo : FYI |
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.
@clinique - a few warnings to fix. Can you provide a diff between this PR and the most recent abandoned PR? This would make it easier to catch up with what happened in the meantime, since we are multiple reviewers that need to get back into this.
...b.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/dto/NASnapshot.java
Outdated
Show resolved
Hide resolved
...nhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/ApiResponse.java
Outdated
Show resolved
Hide resolved
...binding.netatmo/src/test/java/org/openhab/binding/netatmo/internal/api/dto/NAObjectTest.java
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
c72f8ec
to
df04e05
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.
@clinique - another review round done. Only minor findings as previous PR was already in a quite good state.
...penhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/EnergyApi.java
Outdated
Show resolved
Hide resolved
...ava/org/openhab/binding/netatmo/internal/handler/propertyhelper/LastEventPropertyHelper.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/netatmo/internal/handler/propertyhelper/NHCPropertyHelper.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.netatmo/src/main/resources/OH-INF/thing/weather.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.netatmo/src/main/resources/OH-INF/thing/weather.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.netatmo/src/main/resources/OH-INF/i18n/netatmo.properties
Show resolved
Hide resolved
....binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/handler/HomeHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.netatmo/src/main/resources/OH-INF/i18n/netatmo.properties
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/netatmo/internal/handler/capability/CameraCapability.java
Outdated
Show resolved
Hide resolved
...penhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/ApiBridge.java
Outdated
Show resolved
Hide resolved
You can test with last version. Should be adressed. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Perfect, thanks! |
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Laurent Garnier <[email protected]>
PR submitted that fixes the issue. I will run the test again. |
Regarding the automatic computation of the refresh interval for the weather station, the result is a little strange, sometimes the binding computes 10 minutes, sometimes 5 minutes. This is probably not something new so not something that should delay the merge but definitively something to analyse more in details. Maybe the station is not always pushing at the same frequency ? |
I had the intention yesterday to test few other channels like known and unknown persons on the home thing but my camera is no more able to detect persons (it detects movements but not persons) so I forgive. |
conf-error-no-username = Cannot connect to Netatmo bridge as no username is available in the configuration | ||
conf-error-no-password = Cannot connect to Netatmo bridge as no password is available in the configuration | ||
status-bridge-offline = Bridge is not connected to Netatmo API | ||
device-not-connected = Device is not connected |
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.
Quite minor, but could this be rephrased to:
device-not-connected = Device is not connected | |
device-not-connected = Device is not reachable |
or is it used in more than this exact scenario? Is it always a module (additional indoor/outdoor)? In this case it could even be "Module is not reachable".
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.
Devices and modules are Netatmo wording. I prefer use Thing.
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.
I should wait for a new submit?
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.
You just received it !
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.
|
||
private Duration dataValidity; | ||
private Instant dataTimeStamp = Instant.now(); | ||
private @Nullable Instant dataTimeStamp0; |
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.
Perhaps Instant.MIN
could be used to avoid @Nullable
. @lolodomo - consider for your pending PR.
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.
Done.
Refresh strategy fixed when thing is OFFLINE
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.
LGTM, thank you Gaël
Signed-off-by: clinique <[email protected]>
Yes, big thank you for helping me finalizing this nearly two years journey ! Great help from your detailed review, tests, PRs...I was a bit exhausted and you gave me energy. @mdillmann, @Novanic , @robnielsen, @jlaur , @lolodomo : kudos ! |
|
Signed-off-by: clinique <[email protected]>
@clinique : please add an entry in file distributions/openhab/src/main/resources/bin/update.lst (openhab-distro) to mention the breaking change. |
End of a long story ;) |
And thank you for your patience on this PR. |
We all have been patient. |
Would be awesome, if you could do that by tonight as we are planning to do the M5 build today and we will need to warn people about that change. |
And we will have to clean up Crowdin for different translations and fill new translations. Not necessarily today :) |
Clean up was done apparently automatically in French and German translations. We just have to create new ones. |
PR pushed. I'm not used to push against this repo, hope it is fine... |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/netatmo-thermostat/114729/58 |
…nhab#12357) Signed-off-by: clinique <[email protected]> Also-by: Laurent Garnier <[email protected]>
…nhab#12357) Signed-off-by: clinique <[email protected]> Also-by: Laurent Garnier <[email protected]> Signed-off-by: Andras Uhrin <[email protected]>
…nhab#12357) Signed-off-by: clinique <[email protected]> Also-by: Laurent Garnier <[email protected]>
This rework of the Netatmo binding was initiated in order to remove external dependencies (swagger, okio, okhttp...).
It ended as a complete rework of it.
Should now be stable :
Most of work done but to be tested more :
To be started (if someone volunteers):
Latest testable version here.
This PR replaces PR #10831, that already replaced PR #9486
Signed-off-by: Gaël L'hopital [email protected]