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.15.tar.gz (56.7 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.15-py3-none-any.whl (131.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: heiman_connect-1.0.15.tar.gz
  • Upload date:
  • Size: 56.7 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.15.tar.gz
Algorithm Hash digest
SHA256 7f98edb8c9972b4955603e6d5c560a0863218dc42a0cee204107dec1f4bc6710
MD5 4c6ba7cd0c486d36e83bba076390519c
BLAKE2b-256 e1fca82c7f8604e6e8974f3d114b33dc7721e75fd1f78e7bf65d66905d6136e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for heiman_connect-1.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 9e26b2ff159d022d878d9254fdad82f53e4a1f3bc5bec06ea362819ea36ac226
MD5 2f016a5ddcdd72d7700d0d21a49ba5a0
BLAKE2b-256 9c1ba3f7220ee4f98d173f95f0bfb69fabb73278fe5ec8d15eda2368342e07b1

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