Google Home Foyer API
With this package, multiple libraries can use Foyer API without having to deal with Protobuf version conflicts.
- Only one version of stubs can be loaded by Protobuf at the same time even if stubs are coming from different libraries and modules have different names. Using this package ensures that only one version is installed at any given time.
- The package defines dependencies on Protobuf and GRPC, ensuring compatibility of generated files.
- Type hints are generated and exported as well.
Files can be regenerated using scripts/generate.sh.
Reading every home
GetHomeGraphResponse holds a single home. If an account has several homes, protobuf merges them into that field, so you get the last home's name and ID with the rooms and devices of every home. HomeGraph reads the same response with one entry per home in homes, and lists devices that belong to no home, such as speaker groups, in unassigned_devices.
Use HomeGraph in new code. GetHomeGraphResponse and the generated StructuresServiceStub, which returns it, stay as they are for code written against them. To get a HomeGraph, pass your authenticated channel to get_home_graph:
from ghome_foyer_api.home_graph import get_home_graph
home_graph = get_home_graph(channel, timeout=10)
for home in home_graph.homes:
print(home.display_name, len(home.devices))
To read one response as both messages, get it unparsed with get_home_graph_bytes, then parse it with HomeGraph.FromString and GetHomeGraphResponse.FromString. Both functions take an optional GetHomeGraphRequest and raise grpc.RpcError if the call fails.
Mapping more fields
api.proto maps only part of what Google returns. To see which fields of your own home graph it does not map yet:
uv run --with 'glocaltokens>=1.0.0' scripts/inspect_homegraph.py fetch ~/homegraph.bin
uv run scripts/inspect_homegraph.py summary ~/homegraph.bin
fetch asks for your Google master token, or reads it from GOOGLE_MASTER_TOKEN, and saves the raw GetHomeGraph response to a file only you can read. The file holds the local auth tokens of your devices: keep it outside the repository and never share it.
summary lists every field of every message with sample values, and marks fields that api.proto does not map (UNMAPPED) or declares with the wrong type. It shows only the length of local auth tokens, email addresses and anything in your homes' locations, such as their addresses and coordinates. Wherever they appear, it masks parts of those addresses, token-like strings, UUIDs, URL paths, long digit runs and numbers with a fractional part. Device, room and home names and other short text stay visible. The masking matches patterns, so read the summary before you share it.
Credits
The proto file is taken from here. Thanks @rithvikvibhu for extracting it.
The reverse-engineered foyer.proto in homebridge-nest-accfactory also lists homes as a repeated field and names device field 39, which HomeGraph reads as other_ids.
Metadata
Release files for ghome-foyer-api 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ghome_foyer_api-3.1.0.tar.gz | 31.9 kB | With provenance | Details for ghome_foyer_api-3.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ghome_foyer_api-3.1.0-py3-none-any.whl | Python 3 | none | any | Details for ghome_foyer_api-3.1.0-py3-none-any.whl |
Total release size: 66.0 kB
Release files / ghome_foyer_api-3.1.0.tar.gz
| Download URL | ghome_foyer_api-3.1.0.tar.gz |
|---|---|
| Size | 31.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
926a3632dbe8c4c570780a3eb561251b3d4c1f5a471c981c90ac6eddfa351e66
|
|
BLAKE2b-256 checksum How to use checksums |
11aec62dacbe5e7a8bf65d4ed30d88e684b1c9d391d47381c88559e0726843f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logRelease files / ghome_foyer_api-3.1.0-py3-none-any.whl
| Download URL | ghome_foyer_api-3.1.0-py3-none-any.whl |
|---|---|
| Size | 34.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c34740e42f327ebdc33ec1062f064aa5d62e2b8fc0c4fce819aad750160e081
|
|
BLAKE2b-256 checksum How to use checksums |
649a2f61a3c36643d40b08f5c5e7ae2d080c8e65f9a8c121abc7a92062f8b991
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logSecurity for ghome-foyer-api 3.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ghome_foyer_api-3.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.