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.18.tar.gz (59.0 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.18-py3-none-any.whl (133.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: heiman_connect-1.0.18.tar.gz
  • Upload date:
  • Size: 59.0 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.18.tar.gz
Algorithm Hash digest
SHA256 a92eabb5e49aec718110165c5056e490c5d3c1b8c4161b69b322aa04a9303274
MD5 744374051efd5a6e4d14191d3ab8f0fe
BLAKE2b-256 a15e5e56f13c445e869fd6cd9cf6c480067929bbf889c618f86c0c73d58a598b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for heiman_connect-1.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 20ca0fd2cbb4d44e27121177f13ff99e1ef125fabb3b5c059a2de39ccd7bf739
MD5 8cdfe40f690fa6b4a3ad46d21f138f9f
BLAKE2b-256 d7b03bf1cffad639cd7a7a6bed43b3c091049a158db19a099e40981ebcf82830

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