简体   繁体   English

Google Home 报告 state 请求有效但未显示预期结果?

[英]Google Home report state request is working but not showing expected result?

I'm integrating google assistant with my application.我正在将谷歌助手与我的应用程序集成。 The problem is when I send a report state request to assistant while inside a device screen in google home application, I get a 200 OK response with the requestId I'm sending, but the device screen doesn't update with the device state.问题是,当我在 google home 应用程序的设备屏幕内向助手发送报告 state 请求时,我收到了带有我正在发送的 requestId 的 200 OK 响应,但设备屏幕没有随设备 state 更新。 (It gets updated after I go back and go to device screen again but that is done through query intent) (它在我 go 返回和 go 再次到设备屏幕后更新,但这是通过查询意图完成的)

Sample Request Body样品请求正文

{  
   "payload" : {
      "devices" : {
         "states" : {
            "12364" : {
               "on" : true
                      }
                    }
                  }
               },
  "requestId" : "A7TNpoXlnG0OQWzpTvJAa4sjolAAt46q",
  "agentUserId" : "14556"
}

Sample Response Body示例响应正文

{ "requestId" : "A7TNpoXlnG0OQWzpTvJAa4sjolAAt46q" }

This is their documentation regarding the report state .这是他们关于报告 state的文档。

I even deployed the report state dashboard locally to monitor the state changes but it doesn't update as well.我什至在本地部署了报告 state 仪表板来监控 state 的变化,但它也没有更新。

Can anyone point me in right direction?谁能指出我正确的方向? Thanks!谢谢!

The behavior of different Assistant surfaces with respect to Home Graph changes can vary, so it's best not to rely on looking for real-time UI changes in the Google Home app.不同 Google 助理界面在 Home Graph 更改方面的行为可能会有所不同,因此最好不要依赖于在 Google Home 应用中查找实时 UI 更改。

The Report State Dashboard noted in the documentation that you linked is a good way to validate the state you publish to Home Graph graphically.您链接的文档中指出的报告 State 仪表板是验证您以图形方式发布到主图的 state 的好方法。 We also recently published an AoG ProTips episode on this topic that shows you how to do the same from the command line.我们最近还发布了关于此主题的AoG ProTips剧集,向您展示如何从命令行执行相同操作。

Neither of these methods will update automatically in real-time either, but you can refresh them after publishing a state change to verify the right data is in Home Graph.这两种方法都不会实时自动更新,但您可以在发布 state 更改后刷新它们,以验证正确的数据是否在 Home Graph 中。

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

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