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, night=True) # night = stay + instant entry
        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, night=…, …) 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.

Develop

python -m venv .venv && . .venv/bin/activate
pip install -e ".[test,dev]"
pytest --cov=pygc3      # 27 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.1.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.1.0
File Size Uploaded
pygc3-0.1.0.tar.gz 13.2 kB Details

Built distribution (wheel)

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

Total release size: 23.0 kB

Release files / pygc3-0.1.0.tar.gz

Download URL pygc3-0.1.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
02a42c24d63d800f34c89b44fa6a9cca43643ef28e19d05fed3708afdeca0a8f
BLAKE2b-256 checksum
How to use checksums
7a0823de65990b1c782504bef24577a6b0a471444f60c9cfc1853ca99a0a09ee
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.1.0-py3-none-any.whl

Download URL pygc3-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4045d9af0efa034c01de5af8405f32f1f14aec08cafbd10f50d49efe994dd15
BLAKE2b-256 checksum
How to use checksums
46adb00e49e7f61b1500b3bb805e228f23f927056d4cdd654669633af2cd7928
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

0.2.0

2 release files

This release

0.1.0 This release

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