-
-
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
[nest] Add support for Smart Device Management (SDM) API #8664
Comments
Just seen your message on the forum. Any help required? |
Hi! Do you have Doorbells or Displays? I don't have these so it will be difficult to test this functionality. :-) I think I'll first refactor the existing binding and add some basic implementation and functionality and get that merged. That should get it merged quickly (less code to review) and allows for everyone to start using it and it will make it easier for others to collaborate using the usual PR process. |
I've only got the thermostat / protects. Ok no worries. |
OK I've got those too, as well as some cameras. |
Yeah that is annoying, is that finalised or are they just gradually rolling stuff out on the new API as the protects would be handy to have. Home/away state is annoying especially because you could do something cool like a baysian sensor rather than just rely on the gps. But I guess you could have a rule in OpenHab to just switch to ECO mode. As you seem to be a big/regular contributor to OpenHab, thought I'd ask, how do you get started contributing? I've been using 2.4 for a while and figured I should probably start contributing to the code base. |
Just like anything new, it's probably best to start small and learn/find your way around it. I first started with fixing bugs in bindings I used. After that I started adding enhancements to bindings I used. Then I created a binding from scratch and contributed to the core. Now that I know my way around everything, I'm confident enough to touch anything without severely breaking it. :-) But I've been doing Java development for more than 10 years. The only challenges for me with openHAB were getting to know OSGi and learning the ESH/openHAB framework/domain. |
I agree it's best to start small, get it right and add incrementally. But they shut down old API new access over a year ago... and still have no equivalent. Ideally, they would continue to allow people to use the old... and when the new is ready and full featured, then cut off the old. But, it is what it is... and I'm hopeful that the new will eventually surpass the old. Not only in terms of keeping capability the same (e.g., home/away), but also things like accessing temperature sensors through the API, making their schedule more customizable, adding a selectable radius geofence, etc. But now I'm just dreaming 😜 |
No Nest Hub here, but I do have a doorbell and am happy to send any required info. I've already transitioned to the Google login and am using a Starling Hub in the meantime. |
I've got a Thermostat v3 and ready to test. Still on the old Nest login but there's no point anymore so I might as well convert it. |
@wborn ok, thanks for that. Yeah I need to have a poke in OH, I've been a java developer for over 7 years :) |
I've got a thermostat and doorbell and happy to help 👍 |
I have both, and am looking forward to helping out. |
Also having a Thermostat, 5 Protects, Hello Doorbell and a Camera. I'll be happy to test for you! All the best, Bob |
I'm also having Thermostat, Protects & Hello Doorbell, happy to help! |
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
This is great guys. Juist a 'visit xxz Drop jar from y in z location |
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Thanks @wborn for the work on this! |
Hello! The coming week I plan on spending a lot of time on this PR and if it all works out well I'll also update the JAR so it has the camera support. 🙂 🤞 |
That’s great! Thank-you! 👍 |
I've been testing the jar with OH3.0.0 I am using my own developer account and tokens. Everything was great until I restarted OH. Now I am getting a NullPointer Exception:
I tried getting new authorization codes, but the error remains. |
Yup - seems you have to redo the tokens every time you reboot.
Was wondering is this might be because we’re hard coding the tokens in a config file, rather than storing them as a property somewhere - meaning as the token updates each time, the stored and active token is the current one, rather than(after rebooting) being the one we started with?
It’s a real problem, if you do anything like maintenance reboots
…On 10 Jan 2021, 18:21 +0000, Jacob G. ***@***.***>, wrote:
I've been testing the jar with OH3.0.0 I am using my own developer account and tokens. Everything was great until I restarted OH. Now I am getting a NullPointer Exception:
2021-01-10 13:14:05.246 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: java.lang.NullPointerException: null at org.openhab.binding.nestdeviceaccess.internal.nesthelper.NestUtility.isAccessTokenExpired(NestUtility.java:128) ~[?:?] at org.openhab.binding.nestdeviceaccess.internal.nesthelper.NestUtility.getAccessToken(NestUtility.java:108) ~[?:?] at org.openhab.binding.nestdeviceaccess.internal.nesthelper.NestUtility.getDeviceInfo(NestUtility.java:171) ~[?:?] at org.openhab.binding.nestdeviceaccess.internal.thermostat.NestThermostat.getThermostatInfo(NestThermostat.java:414) ~[?:?] at org.openhab.binding.nestdeviceaccess.internal.thermostat.NestThermostatHandler.refreshChannels(NestThermostatHandler.java:148) ~[?:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:834) [?:?]
I tried getting new authorization codes, but the error remains.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
I have 2 thermostats, 5 Cameras (Nest Cams, Drop Cams, Outdoor Cams), and 5 Nest Protects 2nd Gen. Happy to be part of the group testing the binding. I also put together a guide (GitHub Wiki) to help folks get set up using the SDM API Nest On OpenHAB - Step By Step Guide |
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/google-nest-device-access-console-now-available/105404/243 |
I'm getting the following error:
Using latest jar at https://github.com/wborn/openhab-addons/releases/tag/nest-sdm-api-20201103 |
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Port nestdeviceaccess add-on to OH3 based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess Rework code so WWN and SDM are supported by existing binding Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
* Reworks WWN implementation so there the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
* Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]>
Hello everyone! I've finished my work on the PR that adds SDM support to the Nest Binding and marked it as ready for review. 🙂 |
* [nest] Add support for Smart Device Management (SDM) API * Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes #8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]> * Fix and improve documentation Signed-off-by: Wouter Born <[email protected]> * Always use UTF8 when decoding SDM events Signed-off-by: Wouter Born <[email protected]>
* [nest] Add support for Smart Device Management (SDM) API * Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]> * Fix and improve documentation Signed-off-by: Wouter Born <[email protected]> * Always use UTF8 when decoding SDM events Signed-off-by: Wouter Born <[email protected]>
* [nest] Add support for Smart Device Management (SDM) API * Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]> * Fix and improve documentation Signed-off-by: Wouter Born <[email protected]> * Always use UTF8 when decoding SDM events Signed-off-by: Wouter Born <[email protected]> Signed-off-by: Luca Calcaterra <[email protected]>
* [nest] Add support for Smart Device Management (SDM) API * Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]> * Fix and improve documentation Signed-off-by: Wouter Born <[email protected]> * Always use UTF8 when decoding SDM events Signed-off-by: Wouter Born <[email protected]> Signed-off-by: Luca Calcaterra <[email protected]>
* [nest] Add support for Smart Device Management (SDM) API * Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]> * Fix and improve documentation Signed-off-by: Wouter Born <[email protected]> * Always use UTF8 when decoding SDM events Signed-off-by: Wouter Born <[email protected]> Signed-off-by: Luca Calcaterra <[email protected]>
* [nest] Add support for Smart Device Management (SDM) API * Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]> * Fix and improve documentation Signed-off-by: Wouter Born <[email protected]> * Always use UTF8 when decoding SDM events Signed-off-by: Wouter Born <[email protected]>
* [nest] Add support for Smart Device Management (SDM) API * Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]> * Fix and improve documentation Signed-off-by: Wouter Born <[email protected]> * Always use UTF8 when decoding SDM events Signed-off-by: Wouter Born <[email protected]>
* [nest] Add support for Smart Device Management (SDM) API * Reworks WWN implementation so that the thing types have a wwn_ prefix and the classes have a WWN prefix and reside in a 'wwn' package * Adds an SDM implementation which is also based on: https://github.com/bhigg-code/openhab-addons/tree/2.5.x/bundles/org.openhab.binding.nestdeviceaccess * Adds unit tests for (de)serialization of the SDM and Pub/Sub API requests and responses * Updates the binding documentation for the changes and additions Fixes openhab#8664 Also-by: Brian Higginbotham <[email protected]> Signed-off-by: Wouter Born <[email protected]> * Fix and improve documentation Signed-off-by: Wouter Born <[email protected]> * Always use UTF8 when decoding SDM events Signed-off-by: Wouter Born <[email protected]>
The current API used by the binding is based on the Works With Nest (WWN) API for which new users can no longer sign up (see What's happening at Nest?).
Recently a new Smart Device Management API has become available which again allows for controlling Nest devices, see:
There is a non-refundable $5 registration fee for creating a developer account to gain access to this API.
See also the following community topics:
I'll start implementing this SDM API in the existing binding so existing WWN API users can migrate over time.
The new SDM API may also not provide the same functionality.
Most likely the WWN API will be retired and can then be removed from the binding.
The text was updated successfully, but these errors were encountered: