Google操作返回对不起功能控件尚不支持

时间:2018-01-28 11:57:11

标签: google-assistant-sdk

我按照instructions

中的说明扩展了助手来实现我的设备

我可以看到我的设备注册了特征:

  

googlesamples-assistant-devicetool list --model

        Device Model Id: assistant-19etc....
        Project Id: assistant-19etc....
        Device Type: action.devices.types.LIGHT
        Trait action.devices.traits.OnOff
        Trait action.devices.traits.StartStop

但是当我说 Ok Google时,请按照in here

提及

我收到了这个活动:

  

ON_RECOGNIZING_SPEECH_FINISHED:

带文字

  

开启

但不是行动

  

ON_DEVICE_ACTION:

相反,助理对我说:

  

对不起支持电源控制

Assitent图书馆/服务是否仅限于地区,或者是否有任何其他限制,为什么我没有收到回复的操作,尽管我按照说明进行操作并根据它们看起来都有效?

1 个答案:

答案 0 :(得分:1)

在与助理一起玩了几个小时后,一遍又一遍地阅读文档,我发现,这句话背后隐藏着隐藏的意思和缺失的指示:

  

运行示例时,它将为您的特定设备生成设备实例。此设备实例将与您指定用于运行样本的设备模型相关联。在示例的输出中查找设备实例ID。您将使用此ID更新您的设备,以便您可以使用设备操作。

     

device_model_id:my-model device_id:1C3E1558B0023E49F71CA0D241DA03CF

该文件忘记提及的是,您不仅必须注册模型,还必须在reference

中注册该设备。

在使用包括nick在内的所有必需字段注册设备后,我能够接收到操作。

这正是你需要上面那句话中的设备ID的地方......不知怎的,这一步从文档中删除了: - )

googlesamples-assistant-devicetool register-device [OPTIONS]

  Registers a device instance under an existing device model.

  Device instance fields must start with a letter or number. The device ID
  can only contain letters, numbers, and the following symbols: period (.),
  hyphen (-), underscore (_), and plus (+). The device nickname can only
  contain numbers, letters, and the space ( ) symbol.

Options:
  --device TEXT                   Enter an identifier for a device instance.
                                  If the device ID already exists, this
                                  command will update the device instance. If
                                  it does not exist, this command will create
                                  a new device instance. This ID must be
                                  unique within all of the devices registered
                                  under the same Google Developer project.
                                  [required]
  --model TEXT                    Enter the identifier for an existing device
                                  model. This new device instance will be
                                  associated with this device model.
                                  [required]
  --nickname TEXT                 Enter a nickname for the device. You can use
                                  this name when talking to your Assistant to
                                  refer to this device.
  --client-type [SERVICE|LIBRARY]
                                  Select the type of the client. Use SERVICE
                                  if using the Google Assistant Service or
                                  LIBRARY if using the Google Assistant
                                  Library.  [required]