Skip to content
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

Add Security Devices #61

Open
ErikSGross opened this issue Mar 17, 2022 · 6 comments
Open

Add Security Devices #61

ErikSGross opened this issue Mar 17, 2022 · 6 comments
Labels
blocked enhancement New feature or request

Comments

@ErikSGross
Copy link

Description

When running the version of nest-protect that enables all buckets (https://github.com/iMicknl/ha-nest-protect/archive/refs/heads/enhancement/add_more_info.zip), there are security devices in my account, which I suspect are the Yale x Nest door locks.

In the diagnostics output, the bucket names look like this:

        {
          "object_key": "buckets.xxxxxxx",
          "object_revision": -xxxx,
          "object_timestamp": xxxxxxxxxxxxxxx,
          "value": {
            "buckets": [
              "wwn_security.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            ]
          }
        },

I don't see any entries in the object_key section for these devices, but maybe that's because they need to be enabled in the integration?

Device (optional)

No response

Additional information

No response

@iMicknl
Copy link
Owner

iMicknl commented Mar 17, 2022

I recall that Yale x Nest locks are not supported in the API I use, but will require a grpc/protobuf endpoint.

If I request the wwn_security bucket through the current REST endpoint, I receive the following error:

{'error': 'input_error', 'error_description': 'Non-allowed known bucket types: Set(wwn_security)', 'instance_id': 'd21fd146-20c3-45bd-89fc-dc1e0fd27474', 'errors': [{'label': '', 'format': 'Non-allowed known bucket types: Set(wwn_security)', 'params': []}]}

So it seems that this one will be harder to implement, however I will keep this issue open to track progress.

@ErikSGross
Copy link
Author

Not sure if this in the same category as the door locks, but I can also see door (open/closed) sensors via home.nest.com. I don't see a bucket for them in the current diagnostic output, though. Any thoughts on how to figure out whether they can be accessed via the API you're using for the protect and temp sensors?

@iMicknl
Copy link
Owner

iMicknl commented Mar 18, 2022

@ErikSGross
Copy link
Author

I tried a few different things with the Nest Home Web App and it seems they've limited the security-related capabilities of the web app. I found some details here: https://support.google.com/googlenest/answer/9241220?hl=en&app=true&country=US&locale=en_US#zippy=%2Cnest-web-app-features

I can definitely see the state of the doors, door locks, and alarm from the web app, but I'm not seeing any way to change anything via the web app. I'm not sure where the app is getting the data on device status from, but even that would be useful in Home Assistant if the devices can't be controlled via this API.

The XHR subscribe entries show the object keys in the payload section, but there is no response information, so I'm not sure where to find how the door/lock/alarm status is coming from.

@ErikSGross
Copy link
Author

I wanted to see what functiuonality homebridge currently exposes, so I spun up an instance and added the homebridge-nest plugin. I then could access and control all of:

  • smoke protector
  • thermostat
  • temperature sensor
  • yale x nest door lock

The authentication method appears to be the same as what ha-nest-protect is using - namely log into home.nest.com with your Google account and get a refresh token.

So even though the google support docs mention a difference between the home.nest.com web app and the mobile apps (namely that security devices can't be controlled via home.nest.com), it appears that homebridge has figured out a way to make this happen. I can definitely both see the status of my door locks AND lock/unlock them. I'm not sure if that's because homebridge is emulating the iOS app or if they're doing something else.

@iMicknl
Copy link
Owner

iMicknl commented Mar 28, 2022

They use the GRPC / protobuf API, however this works in another way and is hard to test and debug for me since I don't own any of these devices. When I have some more time in the future, I will perhaps give it another try, but for now this won't be implemented soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants