Home Graph

Smart home Actions rely on 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 the 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 is essentially a logical map of your home. It allows you to have a natural conversation with the Google Assistant. If you are sitting in the den and you want to turn the den lights off, you would just say Hey Google, turn off the lights and would not mention the room that you are currently in.

Benefits of Home Graph:

  • Implicit commands. You, your 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.
  • Better control over explicit targeting. While in a different room, you can turn off the kitchen lights even when the lights are from multiple manufacturers. The smart home intent is determined for a particular room that is identified in Home Graph.

The Google Home app 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:

  • Managers - The account of the owner(s) of the structure. Each structure must have at least one manager. Once a manager is defined, the manager can share and unshare a structure with other users.
  • Rooms - The rooms that are part of a structure.
  • Labels - The label that identifies the structure such as “John’s House”.
  • Devices - The devices that are part of a structure. These can be devices from multiple manufacturers.

A room belongs to a structure and consists of the following:

  • Labels - The label that identifies the room such as “Master Bedroom”.
  • Devices - The devices that are part of the room. These can be devices from multiple manufacturers.

A device must belong to at least one structure, can belong to a maximum of 1 room, and has these properties:

  • Type - The type of device such as a lamp, camera or air conditioning unit.
  • Traits - The type of traits that the device supports. Each device can have a number of traits. A light might have traits such as Brightness and ColorSetting.

Traits have these properties:

  • Attributes - The device attributes that are static for a device. An attribute can be something like temperature units, mode, etc…
  • State - The device state(s) for a device. A lamp might return a state of brightness to indicate the current brightness of that specific lamp. Each device trait adds different device states for a device.
  • Labels - The label that identifies the device such as “Bedroom Lamp”.

For more information on device types and traits, see device types and traits.

Figure 1 shows a sample home with a structure, three rooms, and several devices. Each of these items has their corresponding properties that are described above.

This figure shows a sample home graph. There is one structure that
            is outlined with a blue dotted line, three rooms that are outlined
            with an orange line, and several devices located in the rooms that
            are green circles.
Figure 1