-
-
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
[ecobee] Ecobee binding initial contribution #6823
Conversation
a392439
to
e83dabd
Compare
Removed the WIP tag. |
I see this binding includes OAuth2 support and that you plan to implement the core variant later. What you already could do is to implement the current version using the same interface. So create the same classes with only the methods you need in your binding package. Then later on you can simply change the imports and changing can be done fast. I've done this in the past for the Spotify binding. Here you can see what that looked: https://github.com/astenlund74/openhab2-addons/tree/bee1134692e1c61d2caf38dbfffe92b0cfd8891f/addons/binding/org.openhab.binding.spotify/src/main/java/org/openhab/binding/spotify/internal/oauth2 |
That's a good suggestion. Wish I had thought of it. 😉
I see you used the Authorization Code method in the Spotify binding. I had considered changing from the PIN method, which is what the OH1 version of the binding used, to the Authorization Code method, however, the Ecobee documentation says that in their OAuth implementation redirect URIs cannot have port numbers. This would seem to be a showstopper, as the default redirect URI would need to be something like That being the case, I guess I would need to stick with the PIN method, and would need to adjust the local OAuth classes to account for this. In addition, as @cweitkamp and I had discussed separately, the OHC OAuth implementation would need to be extended to support a non-standard grant type used by Ecobee (i.e. "grant_type=ecobeePIN"). For example, a new method such as this:
|
Resetting back to WIP while I rework the OAuth stuff. |
Travis tests were successfulHey @mhilbush, |
@cpmeister I've pushed some changes that address most of your review feedback, as well as the rework of For the remaining review feedback not covered in the changes I pushed, I've added answers and/or questions in response to your review comments. |
...rg.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/action/EcobeeActions.java
Outdated
Show resolved
Hide resolved
...ee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeAccountBridgeHandler.java
Show resolved
Hide resolved
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 think these are the last changes I can find.
...obee/src/main/java/org/openhab/binding/ecobee/internal/discovery/SensorDiscoveryService.java
Outdated
Show resolved
Hide resolved
...obee/src/main/java/org/openhab/binding/ecobee/internal/discovery/SensorDiscoveryService.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/ecobee/internal/discovery/ThermostatDiscoveryService.java
Outdated
Show resolved
Hide resolved
...openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/api/EcobeeAuth.java
Outdated
Show resolved
Hide resolved
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
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Travis tests were successfulHey @mhilbush, |
@cpmeister I pushed some additional changes. There are a couple things above that are still unresolved. If you could have a look at my comments when you get a chance. |
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
@cpmeister, what does the cre label stand for? |
@robnielsen "Coordinated Review Effort" it basically used to mark PRs that require additional reviewers to review 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.
Awesome work, @mhilbush!
I only had a quick glance over it, but as you are known to be a very experienced binding author and we already have two approvals, there shouldn't be any reason to wait with the merge any longer 🎉.
Thanks @kaikreuzer. Very much appreciated. And thanks for fixing up @cpmeister @robnielsen Thanks again for the reviews! |
Signed-off-by: Mark Hilbush <mark@hilbush.com> Signed-off-by: Eugen Freiter <freiter@gmx.de>
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Signed-off-by: Mark Hilbush <mark@hilbush.com> Signed-off-by: CSchlipp <christian@schlipp.de>
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Signed-off-by: Mark Hilbush <mark@hilbush.com> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
Signed-off-by: Mark Hilbush <mark@hilbush.com>
Contributing an OH2 version of the ecobee binding.
Binding supports:
Things are organized in a Bridge->Bridge->Thing configuration. The first level (Account Bridge) represents the Ecobee Account. The second-level (Thermostat Bridge) represents the Thermostats that are associated with the Ecobee Account bridge. The third-level (Remote Sensor Thing) represents the remote and internal sensors that are associated with the Thermostat bridge.
Signed-off-by: Mark Hilbush mark@hilbush.com