Skip to main content

An async API client for HYXi Cloud.

Project description

hyxi-cloud-api

An asynchronous Python client for interacting with the HYXi Cloud API.

This library was primarily built to power the HYXi Cloud Home Assistant Integration, but it can be used in any Python 3.11+ project to fetch telemetry data from HYXi solar inverters and battery systems.

📦 Installation

You can install the package directly from PyPI:

pip install hyxi-cloud-api

🚀 Quick Start

This library uses aiohttp for non-blocking network requests. You will need to provide your HYXi Cloud Access Key and Secret Key, along with an active aiohttp.ClientSession.

import asyncio
import aiohttp
from hyxi_cloud_api import HyxiApiClient

async def main():
    # Replace with your actual HYXi Cloud credentials
    ACCESS_KEY = "your_access_key"
    SECRET_KEY = "your_secret_key"
    BASE_URL = "[https://open.hyxicloud.com](https://open.hyxicloud.com)"

    async with aiohttp.ClientSession() as session:
        # 1. Initialize the client
        client = HyxiApiClient(
            access_key=ACCESS_KEY,
            secret_key=SECRET_KEY,
            base_url=BASE_URL,
            session=session
        )

        # 2. Fetch device data
        try:
            device_data = await client.get_all_device_data()
            print("Successfully fetched HYXi data:")
            print(device_data)
        except Exception as e:
            print(f"Error communicating with HYXi Cloud: {e}")

if __name__ == "__main__":
    asyncio.run(main())

🛠️ Requirements

  • Python 3.11 or newer
  • aiohttp >= 3.8.0

⚠️ Disclaimer

This is an unofficial, community-driven project. It is not affiliated with, endorsed by, or connected to HYXiPower in any official capacity. Use this software at your own risk.

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

hyxi_cloud_api-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

hyxi_cloud_api-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file hyxi_cloud_api-0.1.0.tar.gz.

File metadata

  • Download URL: hyxi_cloud_api-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for hyxi_cloud_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10c3b8b9f30f25bd913ea96840fdb2902c5ba87b55e60fb7555da9db9db9a183
MD5 a66c4f8b202f89d56d5ca9291c07b258
BLAKE2b-256 f6c9fa69edf8c4910cc3d1bf9785baaf4d3276d96d914f19f1969e5239235451

See more details on using hashes here.

File details

Details for the file hyxi_cloud_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hyxi_cloud_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df2a9d29d8c60f6cd7a26de615db514b99fe350d9a38af83ad2a15ca848e7205
MD5 dad13e40c4c6c4131869cb7b6dcb175a
BLAKE2b-256 84298c9900d0356681866b512c46fafed169005c966a8b88ae9cdc400c3ffb63

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