简体   繁体   English

Google Smart Home Action 断开连接 ~ 每月一次

[英]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.我开发了一个 Google Smart Home 操作,它在 Google Assistant 和 Google Home 应用程序上运行。

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.我们收到的一个投诉是,有时大约一个月后,这些设备似乎失去了与 Google Assistant 应用程序的连接。

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.命令事件永远不会到达我们的 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.我不记得在文档或示例操作( https://github.com/actions-on-google/smart-home-nodejs )中看到任何提到防止过期发生的内容。

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.例如,您的 OAuth 服务器可能在将新令牌交付给 Google 助理之前使刷新令牌过期。 You can find more details on implementing OAuth token exchange in the documentation , including a note about rotating refresh tokens.您可以在文档中找到有关实现 OAuth 令牌交换的更多详细信息,包括有关旋转刷新令牌的说明。

Note that Google Assistant generally only refreshes the access token when an intent needs to be sent (ie not immediately once the token expires).请注意,Google 助理通常仅在需要发送意图时刷新访问令牌(即,令牌过期后不会立即刷新)。 Sometimes this can also affect the refresh behavior of your OAuth server.有时这也会影响 OAuth 服务器的刷新行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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