Skip to main content

Async Python client for the Verisure Italy alarm API

Project description

verisure-italy

Async Python client for the Verisure Italy alarm API.

Talks directly to customers.verisure.it/owa-api/graphql. Typed, async, Pydantic models for all request/response types. No Any, no dict soup. Pyright strict, zero errors.

Not affiliated with Verisure Group or Securitas Direct.

Installation

pip install verisure-italy

Usage

import aiohttp
from verisure_italy import VerisureClient, generate_device_id, generate_uuid

async with aiohttp.ClientSession() as session:
    client = VerisureClient(
        username="your@email.com",
        password="your-password",
        http_session=session,
        device_id=generate_device_id(),
        uuid=generate_uuid(),
        id_device_indigitall="",
    )

    # Login (may raise TwoFactorRequiredError)
    await client.login()

    # List installations
    installations = await client.list_installations()
    inst = installations[0]
    await client.get_services(inst)

    # Get alarm status (passive — no panel ping, no timeline entry)
    status = await client.get_general_status(inst)
    print(f"Alarm: {status.status}")  # D, B, A, E, P, T

    # Arm / disarm
    from verisure_italy import AlarmState, InteriorMode, PerimeterMode

    target = AlarmState(interior=InteriorMode.PARTIAL, perimeter=PerimeterMode.ON)
    result = await client.arm(inst, target)

    # Force-arm (bypassing open zones — admin users only)
    from verisure_italy.exceptions import ArmingExceptionError

    try:
        await client.arm(inst, target)
    except ArmingExceptionError as exc:
        print(f"Open zones: {[e.alias for e in exc.exceptions]}")
        await client.arm(
            inst, target,
            force_arming_remote_id=exc.reference_id,
            suid=exc.suid,
        )

    await client.disarm(inst)
    await client.logout()

Alarm States

State Interior Perimeter Proto
Disarmed OFF OFF D
Partial + Perimeter PARTIAL ON B
Total + Perimeter TOTAL ON A
Perimeter only OFF ON E
Partial PARTIAL OFF P
Total TOTAL OFF T

Home Assistant

Looking for the Home Assistant integration? See ha-verisure-italy on GitHub, or install via HACS.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verisure_italy-0.8.5.tar.gz (54.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verisure_italy-0.8.5-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file verisure_italy-0.8.5.tar.gz.

File metadata

  • Download URL: verisure_italy-0.8.5.tar.gz
  • Upload date:
  • Size: 54.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for verisure_italy-0.8.5.tar.gz
Algorithm Hash digest
SHA256 90fa65f36c6563121360445753bd48ccb2039bc15cf6cd27fc4050188a408c9c
MD5 c834144cd09496a15376b64d87090d8b
BLAKE2b-256 54af7dc84b7615e883ad56a8460e74c5119fef73f6c8b7cf25efdb1739e124b8

See more details on using hashes here.

File details

Details for the file verisure_italy-0.8.5-py3-none-any.whl.

File metadata

  • Download URL: verisure_italy-0.8.5-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for verisure_italy-0.8.5-py3-none-any.whl
Algorithm Hash digest
SHA256 556b26aeef482f51cd6b4502bde905460381ef02f806356051568ddc5700eadc
MD5 6c449687b0c03679c8bedf2aecd184a9
BLAKE2b-256 d662684e81310d59e186dc475c2a9eb9d6a9c3d71e05044163f04a0f8e3b374a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page