potmat / homebridge-google-nest-sdm

A Homebridge plugin for Google Nest devices that uses the Google Smart Device Management API. Supports Cameras, Doorbells, Displays, and Thermostats. Includes support for HomeKit Secure Video.
ISC License
148 stars 17 forks source link

Permission Issues Accessing sdm-prod Project Resources #147

Closed johnhuetz closed 7 months ago

johnhuetz commented 7 months ago

Problem Description

I am encountering permission issues with the homebridge-google-nest-sdm plugin. The plugin initialization fails due to lack of access to the sdm-prod project. The specific errors indicate missing permissions for pubsub.topics.get and serviceusage.services.list.

Steps to Reproduce

  1. I set up the plugin according to the provided documentation, including adding the additional scope when obtaining the authorization code.
  2. I confirmed that the Smart Device Management and Pub/Sub APIs are enabled.
  3. I obtained the OAuth credentials and refresh token as instructed.
  4. Upon running Homebridge, the plugin logs show errors related to permission issues with the sdm-prod project.

Expected Behavior

The plugin should initialize successfully and connect to my Google Nest devices without requiring access to the sdm-prod project.

Actual Behavior

The plugin initialization fails with the following error message:

'Plugin initialization failed, there was a failure with event subscription. StatusError: Requested project not found or user does not have access to it (project=sdm-prod)'

Additional Context

Question

How can I configure the plugin to avoid permission issues with the 'sdm-prod' project? Is there a step I missed that grants my Google account the necessary permissions, or should the plugin reference resources only within my Google Cloud project?