homegraph

package
v0.81.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package homegraph consumes the Cloud home graph for paired voice output. It owns no graph persistence, adoption decision or device credential.

Stability: Stable — no breaking change without a minor version bump and a changelog callout.

Package homegraph consumes kombify.home_graph.v1 for voice answer routing. The graph remains Cloud-owned; this package never changes it or its leader.

Index

Constants

View Source
const MaxDocumentBytes = 2 << 20

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	ID       string   `json:"id"`
	Class    string   `json:"class"`
	Status   string   `json:"status"`
	Roles    []string `json:"roles"`
	RoomID   *string  `json:"room_id"`
	Identity struct {
		Kind string `json:"kind"`
		Ref  string `json:"ref"`
	} `json:"identity"`
	ExternalRefs []struct {
		System string `json:"system"`
		Ref    string `json:"ref"`
	} `json:"external_refs"`
}

type Document

type Document struct {
	Schema   string `json:"schema"`
	SpaceID  string `json:"space_id"`
	Revision int64  `json:"revision"`
	Rooms    []struct {
		ID string `json:"id"`
	} `json:"rooms"`
	Devices     []Device `json:"devices"`
	Assignments []struct {
		Kind           string `json:"kind"`
		DeviceID       string `json:"device_id"`
		TargetDeviceID string `json:"target_device_id"`
	} `json:"assignments"`
}

Document is the voice projection of the shared home graph wire document. Floors, names and other fields have no bearing on an answer's authority.

func Read

func Read(r io.Reader, spaceID string) (*Document, error)

func (*Document) Resolve

func (d *Document) Resolve(identityKind, identityRef string) (Route, error)

Resolve binds input to a trusted registry identity supplied by the paired host, never to a device id, room or destination supplied in spoken text.

type Route

type Route struct {
	DeviceID   string
	HADeviceID string
	Reason     string
	Local      bool
	Announce   bool
}

Route has one physical destination, never a broadcast or group expansion.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL