Skip to main content

aioindiallsky

Asynchronous Python client library for communicating with indi-allsky over HTTP and WebSocket event streams. Designed for Home Assistant custom components and Python automation scripts.

Installation

pip install aioindiallsky

Quick Start Example

import asyncio
from aioindiallsky import IndiAllSkyClient, ExposureData, SensorData

async def main():
    async with IndiAllSkyClient(host="192.168.1.100", port=8080) as client:
        # Register event callbacks (returns an unregister function)
        async def on_exposure(exposure: ExposureData):
            print(f"New Exposure! File: {exposure.filename}, Duration: {exposure.exposure}s, SQM: {exposure.sqm}")
            # Fetch image bytes for Home Assistant Camera / Image entity
            image_bytes = await client.fetch_image(exposure.filename)
            print(f"Downloaded {len(image_bytes)} bytes")

        def on_sensors(sensors: SensorData):
            print("Sensor Update:")
            for key, info in sensors.sensors.items():
                print(f"  {info['name']}: {info['value']} {info['unit']}")

        unsub_exposure = client.register_callback("exposure_complete", on_exposure)
        unsub_sensors = client.register_callback("sensor_update", on_sensors)

        # Connect and start listener
        await client.connect()
        try:
            await client.listen()
        finally:
            unsub_exposure()
            unsub_sensors()

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

Image & Media API

  • await client.fetch_image(filename): Fetch raw binary image bytes (JPEG/PNG) for a given filename or relative path. Perfect for Home Assistant ImageEntity or Camera snapshot methods.
  • await client.fetch_latest_image(): Fetch raw binary bytes for the latest static snapshot (public/latest.jpg).
  • client.get_image_url(filename): Generate the full HTTP URL for an image filename.

Supported Commands

  • client.pause(): Pause image capture loop
  • client.unpause(): Resume image capture loop
  • client.reboot(): Reboot host system
  • client.shutdown(): Shutdown host system
  • client.restart_service(service_name): Restart service (indi-allsky, indiserver, gunicorn)
  • client.generate_keogram(): Trigger keogram compilation
  • client.generate_timelapse(): Trigger timelapse compilation
  • client.generate_startrail(): Trigger star trail compilation
  • client.trigger_darks(): Initiate dark frame capture sequence

Download files

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

Source Distribution

aioindiallsky-0.1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

aioindiallsky-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aioindiallsky-0.1.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aioindiallsky-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b0cf0ae47d85e8e2bd4252cbb357656f7d55d0c55e9388af5513be7447199d8b
MD5 e006a3747948ec0cbf6bd7b06540aba3
BLAKE2b-256 4c882dacccf2b940770df6542078707fa6889761daa3db6b00a9cedd16ee682d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioindiallsky-0.1.0.tar.gz:

Publisher: publish.yml on TN-1/aioindiallsky

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: aioindiallsky-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aioindiallsky-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f279a4321c134c22c807bfb6638f31d4f59af91c2b9e6f45250a634630364869
MD5 820457aa624fe1f339a8eb4b55d24ea0
BLAKE2b-256 18797abe794d75f640fb84e839ad39522d7c91095ec27230bf7175fa7e214820

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioindiallsky-0.1.0-py3-none-any.whl:

Publisher: publish.yml on TN-1/aioindiallsky

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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