Google Home デベロッパー センターにようこそ。スマートホーム アクションの開発方法を学ぶことができます。注: アクションの作成は、引き続き Actions Console で行います。

ホームグラフ

コレクションでコンテンツを整理 必要に応じて、コンテンツの保存と分類を行います。

スマートホーム アクションは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 に、構造、3 つの部屋、複数のデバイスを含むサンプルの家を示します。

この図はホームグラフの例を示しています。青い点線で囲まれた 1 つの構造に、オレンジ色の線で囲まれた 3 つの部屋があり、各部屋に置かれたデバイスが緑色の円で示されています。
図 1: ホームグラフのサンプル

Rooms

部屋は構造に属し、次のもので構成されています。

  • ラベル - 「寝室」など、部屋を識別するラベル。
  • デバイス - 部屋の一部であるデバイス。複数のメーカー製のデバイスが混在していてもかまいません。

デバイス

デバイスは少なくとも 1 つの構造に属する必要があり、最大で 1 つの部屋に属することができます。デバイスには次のプロパティがあります。

  • [タイプ] - 照明、カメラ、エアコンなど、デバイスの種類。
  • トレイト - デバイスがサポートするトレイトの種類。トレイトはデバイスごとに異なります。たとえば、照明には BrightnessColorSetting などのトレイトがあります。

トレイト

トレイトには次のプロパティがあります。

  • 属性 - デバイス属性のうち、デバイスにとって静的なものをいいます。属性には、温度の単位やモードなどがあります。
  • 状態 - デバイスの状態。ランプは、その特定のランプの現在の明るさを示す明るさの状態を返すことができます。デバイスのトレイトごとに、さまざまなデバイス状態がデバイスに追加されます。
  • ラベル - 「寝室のランプ」など、デバイスを識別するラベル。