Skip to main content

Python library for Heiman smart home devices

Project description

Heiman Connect Library

Python library for communicating with Heiman smart home devices.

Installation

pip install heiman-connect

Usage

import asyncio
from heimanconnect import HeimanHttpClient, HeimanCloudClient

async def main():
    # Initialize HTTP client with access token
    http_client = HeimanHttpClient(
        api_url="https://api.heiman.cn",
        access_token="your_access_token",
    )
    
    # Create cloud client
    cloud_client = HeimanCloudClient(http_client)
    
    # Get homes
    homes = await cloud_client.async_get_homes()
    
    # Get devices
    devices = await cloud_client.async_get_devices(home_id=homes[0].home_id)
    
    # Control device
    await cloud_client.async_control_device(
        device_id=device_id,
        property_identifier="Switch",
        value=True,
    )

asyncio.run(main())

Features

  • HTTP API client
  • MQTT real-time communication
  • Device management
  • Property control
  • Simplified authentication (bring your own token)

License

MIT 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

heiman_connect-1.0.2.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

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

heiman_connect-1.0.2-py3-none-any.whl (120.3 kB view details)

Uploaded Python 3

File details

Details for the file heiman_connect-1.0.2.tar.gz.

File metadata

  • Download URL: heiman_connect-1.0.2.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for heiman_connect-1.0.2.tar.gz
Algorithm Hash digest
SHA256 191b0a1c2f13da2fc88c7ffc7be934d5d3f779dbe2fe8dab918554df567adbe3
MD5 f3cfccffa5883bddc4aa89cbc3bd7382
BLAKE2b-256 2fa0466d576b09c8b2ab93fcfc975fc713b1f28bf694e03c87ffec3ccd19ae97

See more details on using hashes here.

File details

Details for the file heiman_connect-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: heiman_connect-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 120.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for heiman_connect-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc5f823faa6e3206e311e53decf369964028944f5dd710f807b600f2d1003a45
MD5 0ca85b637aec42f5cd28c2988ae614d4
BLAKE2b-256 d522510e491b225ac57b7bfe83b2e43617511b0c906d28dde277c91bfeda42a8

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