首页 > 解决方案 > Google Actions 不执行

问题描述

我已经基于 Google 示例代码编写了一个简单的 Java 应用程序: https ://github.com/actions-on-google/smart-home-nodejs

看了很多电影,参加了谷歌代码实验室,但我被困住了。

我的应用程序对所需操作的响应(意图:action.devices.SYNC、action.devices.QUERY、action.devices.EXECUTE) - 使用 Google 验证器、JSON 验证器进行检查。我还实现了简单的 OAuth 授权,为智能家居创建了 Google Actions 项目。

经过几个小时的调试,我得到了:

{
   "requestId":"14182994871341693427",
   "payload":{
      "agentUserId":"rysiek",
      "devices":[
         {
            "id":"dev1",
            "type":"action.devices.types.LIGHT",
            "traits":[
               "action.devices.traits.OnOff"
            ],
            "name":{
               "name":"główne"
            },
            "willReportState":false,
            "roomHint":"pokój dzienny"
         }
      ]
   }
}

我也尝试过willReportState: true

在此之后,没有更多的工作。

我想对我的手机说打开灯 główne(波兰语“ Włącz światło główne ”、“ Włącz światło główne w pokoju dziennym ”等 - 尝试了很多句子),但它只显示了网络搜索结果。没有请求发送到我的服务器(action.devices.EXECUTE) - 我拥有 Nginx 代理后面的所有内容,并且没有向我的服务器发出请求(在日志中不可见请求)。

我不知道该怎么做才能让它工作。任何帮助将不胜感激。

顺便说一句。谷歌助手从今年(16.01.2019)几天后在波兰可用,我想知道这是我的问题还是谷歌的问题?这甚至可能吗?

例如,我说Ok Google,同步我的设备(波兰语:Ok Google, synchronizuj moje urządzenia),我得到英文回复:“抱歉,我没有得到任何回复。 ”。但我看到有一个 SYNC 请求,我的服务器响应了。

顺便说一句。我已将 Google Chromecast 连接到 Google 助理,它可以正常工作 - 我的意思是我说打开电视(波兰语:Włącz telewizor)并且电视按预期启动。

标签: actions-on-googlegoogle-assistant-sdkgoogle-smart-home

解决方案


Checking the list of supported languages for smart home traits, Polish is currently not included. While it does seem like your SYNC response does work, you won't be able to interact with devices in Polish right now. While this will likely happen in the future, you'll only be able to use one of the languages mentioned above for the moment.

Once Polish support for smart home actions are supported, you shouldn't need to do any extra work for commands to succeed.


推荐阅读