Skip to main content

pygc3

Async client for the 2GIG GC3 panel's local automation API — the same header-authenticated HTTPS API the Elan SC100 used.

Transport + typed models only. HA state mapping, MQTT, and night-mode tracking live in the consumer, not here.

Install

pip install pygc3

Requires Python ≥3.11 and aiohttp.

Use

import asyncio
from pygc3 import GC3Client

async def main():
    async with GC3Client("192.168.1.25", pairing_key="123456",
                         api_key="<issued-token>") as gc3:
        status = await gc3.status()          # PanelStatus
        zones = await gc3.zones()            # list[Zone], console filtered out
        print(status.arm_state, len(zones))

        await gc3.arm(stay=True)             # flags are named for the wire
        await gc3.disarm("1234")

asyncio.run(main())

Pass an existing session to reuse Home Assistant's shared one (it won't be closed for you):

GC3Client(host, pairing_key, api_key, session=hass_session)

Enrolment (no api_key yet)

With the panel in System Pairing mode, enrol without a token — the panel issues one back:

async with GC3Client(host, pairing_key="123456") as gc3:  # no api_key
    issued = await gc3.pair("Home Assistant")

API

Method Endpoint Returns
status() GET /api/v1/status PanelStatus
zones(include_console=False) GET /api/v1/zones list[Zone]
get_pairing() GET /api/v1/pair Pairing
arm(*, stay, no_entry_delay=…, no_exit_delay=…, …) POST …/panel/arm raw dict
disarm(pin) POST …/panel/disarm raw dict
pair(device_name) POST /api/v1/pair raw dict

Errors: GC3AuthError (403 / bad key → reauth), GC3ConnectionError (unreachable / timeout → retry), GC3ResponseError (bad status or non-JSON), all subclasses of GC3Error.

TLS verification is off by default (verify_ssl=False) for the panel's self-signed cert.

There is no push API — poll

The panel exposes GET /api/v1/events as SSE, and it is a stub. Probed against firmware as of 2026-08-03: it accepts any number of concurrent subscribers without evicting any, does not starve the REST endpoints while streams are held, and sends each subscriber the literal 14-byte banner Event stream: — then nothing, ever, including across a full arm cycle that concurrent /status polls captured in full. There is no event:/data: framing and no query argument that changes it. The handler writes a header and was never wired to the panel's event bus.

So this library does not wrap it, and consumers should poll status() and zones(). If a firmware update ever makes it emit, keep a slow poll as a safety net regardless: the panel refuses connections for roughly a minute after it reboots, and a silently dropped stream must not freeze your state.

Develop

python -m venv .venv && . .venv/bin/activate
pip install -e ".[test,dev]"
pytest --cov=pygc3      # 28 tests, ~98% coverage; HTTP faked via the session seam
mypy                    # strict, clean
ruff check src tests

Fixtures under tests/fixtures/ are real panel captures; the pairing fixture's 6-digit code is redacted to 000000.

Release

rm -rf dist build src/*.egg-info
python -m build          # sdist + wheel
twine check --strict dist/*
twine upload dist/*

Version lives in pyproject.toml and pygc3/__init__.__version__; bump both, update CHANGELOG.md, then tag pygc3-v<version>.

Licence

MIT — see LICENSE.

Metadata

Release files for pygc3 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygc3 0.2.0
File Size Uploaded
pygc3-0.2.0.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pygc3 0.2.0
File Interpreter ABI Platform
pygc3-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.8 kB

Release files / pygc3-0.2.0.tar.gz

Download URL pygc3-0.2.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6a41b99279d1914c233a65c6f700eea73d09b5782b89dd98c089f94c1cedc57a
BLAKE2b-256 checksum
How to use checksums
a2c0aa5f2c2f4e0062a8c4b915c08e8a0f3c2d63b567e1a1a4d3956892559ca8
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 Aug 3, 2026.

Transparency log

Release files / pygc3-0.2.0-py3-none-any.whl

Download URL pygc3-0.2.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac166b332c0d6e4914a4f0b6455f82e17a023ecea1fd8f42a895efaea369bd14
BLAKE2b-256 checksum
How to use checksums
bd10cedab9d9bfd5875e298d150998787323cfab674e32ada1e42d29c25e0510
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 Aug 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page