歡迎使用 Google Home 開發人員中心,探索全新功能,瞭解如何開發智慧住宅動作。注意:請繼續在「動作」控制台中建立動作。

首頁圖

透過集合功能整理內容 你可以依據偏好儲存及分類內容。

智慧型住宅動作取決於 Google Home Graph , a database that stores and provides contextual data about the home and its devices. The Home Graph database stores information about structures (for example, home or office), rooms (for example, bedroom or living room), and devices (for example, speaker and light bulb). For example, Home Graph can store the concept of a home with a living room that contains multiple types of devices from different manufacturers such as a light, television, and speaker. This information is available to Google Assistant in order to execute user requests based on the appropriate context. State data, such as if a light bulb is on, is not stored in the long term - it’s ephemeral and is only used in the Home Graph.

Home Graph」基本上是住家的邏輯地圖,讓您與 Assistant 自然對話。如果坐在房子裡想關燈,可以直接說出「Ok Google,關燈」,而且不要提及您目前所在的房間。

Home Graph 的優點:

  • 隱式指令。您,您的Google Home device, and your lights are in the same room. All you have to say is turn on the lights. You do not need to specify what room the lights are in.
  • 更有效地指定明確指定目標。如果位於不同房間,即使燈具是由多個製造商製造,您還是可以關閉廚房燈。 smart home intent is determined for a particular room that is identified in Home Graph.

建築作品

Google Home app (GHA) lets a user configure multiple structures which allows a user to manage multiple houses. Each structure has its own set of rooms and devices. A structure consists of the following:

  • 管理員 - 結構擁有者的帳戶。每個結構至少要有一個管理員。管理員定義完畢後,管理員可以與其他使用者共用及取消共用結構。
  • 會議室 - 屬於特定建築物的會議室。
  • 標籤:用於識別結構的標籤,例如「小明家屋」。
  • 裝置 - 結構中的裝置。這些裝置可以是多個製造商的裝置。

圖 1 顯示住家結構體、三個房間和多部裝置的住家範例:

此圖顯示首頁圖範例。其中一個架構是一條藍色虛線、三個以橘色線條框出的房間,以及多個房間,其中的裝置是綠色圓圈。
圖 1:首頁圖範例

房間

聊天室屬於結構,包含下列項目:

  • 標籤 - 用於識別會議室的標籤,例如「主臥室」。
  • 裝置 - 會議室中的裝置。這些裝置可以是多個製造商的裝置。

裝置

裝置必須屬於至少一個結構、最多可加入 1 間會議室,並且具備下列屬性:

  • 類型 - 裝置類型,例如燈具、相機或空調裝置。
  • 特徵 - 裝置支援的特徵類型。每部裝置可能具備多個特徵。光可能具有 BrightnessColorSetting 等特徵。

特性

特徵具備以下特性:

  • 屬性 - 裝置的靜態屬性。屬性可以是溫度單位或模式。
  • 狀態 - 裝置的狀態。燈具可能會傳回亮度狀態,以表示該特定燈具目前的亮度。每部裝置特性都會為裝置新增不同的裝置狀態。
  • 標籤 - 用於識別裝置的標籤,例如「臥室燈具」。