While this works (for now) there are some issues with this plugin:
- It uses a non-public API. As far as I can tell an old API for mobile applications is used. Several projects (including Domoticz) use this API but there's no telling how much longer it will work.
- Documentation for this API is non-existant. By the looks of it some (successful) reverse engineering has been done to access the API.
- Having 2FA (2 factor authentication) enabled on the account locks Domoticz out because Domoticz cannot supply an additional PIN code.
- (minor issue): Plain credentials to the Nest account need to be entered and be kept up to date to allow Domoticz to keep working.
I went ahead and adapted the current Nest plugin to use the new authentication method, calls and properties (for those interested in code see here). Still needs a bit of polishing and cleanup though.
There are some points that still need to be tackled:
- Getting an access token for Domoticz is a kind of convoluted process: you need to register with Nest as a developer, create an application and permission set, log in as that application, get one-time PIN code, use that PIN code to obtain token. While it is certainly doable, it will need to be well documented on the Wiki. Even then it is much less accessible than just entering a user+pass to make it work.
- I intend on having it replace the old plugin, but it is not compatible since it uses a different form of authentication.
- What are the thoughts on the old and new style plugins coexisting in Domoticz?