简体   繁体   中英

Google Smart Home Action disconnects ~monthly

I've developed a Google Smart Home action and it is live on the Google Assistant and Google Home app.

Account Linking, Device Creation, and Device Control seem to all be working fine.

The one complaint we receive is that sometimes, after around a month, the devices seem to lose connection to the Google Assistant app.

When attempting to send a command, we get the most message "Sorry it looks like the is unavailable right now." The devices still show up under Home control and the action still appears under "Linked". The command event never reaches our Lambda function.

Does this problem description sound like a red flag towards any aspect of the integration?

I'm wondering if it is maybe a token that isn't being refreshed correctly? So that after the month, Google kicks us out? I only think this because of the consistent time frame the error occurs at. No idea though haha. I don't remember seeing anything in the docs or the sample action ( https://github.com/actions-on-google/smart-home-nodejs ) that mentioned preventing expirations from occurring.

Thank you for your help in advance!

You can review the error logs for your project, which will indicate if errors are occurring due to account linking or something else related to your intent fulfillment.

I'm wondering if it is maybe a token that isn't being refreshed correctly?

This is a reasonable place to start, and your error logs will indicate if there are account linking errors. For example, your OAuth server may be expiring the refresh token before a new one is delivered to Google Assistant. You can find more details on implementing OAuth token exchange in the documentation , including a note about rotating refresh tokens.

Note that Google Assistant generally only refreshes the access token when an intent needs to be sent (ie not immediately once the token expires). Sometimes this can also affect the refresh behavior of your OAuth server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM