Skip to main content

Actron Neo API

Project description

ActronNeoAPI

ActronNeoAPI is a Python library for interacting with Actron Air Neo API. It allows you to manage and monitor your Actron Air systems programmatically, including retrieving AC system status, events, and more.

Features

Authentication: Authenticate with the Actron Air API using your account credentials.
AC System Management:
List all AC systems in your account.
Retrieve detailed status for a specific AC system.
Fetch system events, including latest, newer, or older events.
Fully asynchronous, built using aiohttp.
Installation
Install the library via pip:
pip install actron-neo-api

Usage

  1. Authentication:
    To authenticate with the Actron Air API, you need your username, password, a device name, and a unique device identifier.

  2. Fetch AC Systems:
    Retrieve the list of AC systems associated with your account.

  3. Get AC System Status:
    Get the full status of a specific AC system by its serial number.

  4. Get AC System Events:
    Retrieve events for a specific AC system, including the latest, newer, or older events based on an event ID.

Example Code

import asyncio
from actron_neo_api import ActronNeoAPI, ActronNeoAuthError, ActronNeoAPIError

async def main():
    username = "your_email@example.com"
    password = "your_password"
    device_name = "my_device"
    device_unique_id = "unique_device_id"

    api = ActronNeoAPI(username, password)

    try:
        # Step 1: Authenticate
        await api.request_pairing_token(device_name, device_unique_id)
        await api.request_bearer_token()

        # Step 2: Fetch AC systems
        systems = await api.get_ac_systems()
        print("AC Systems:", systems)

        # Get the serial number of the first system
        if systems:
            serial = systems[0].get("serial")
            if serial:
                # Fetch system status
                status = await api.get_ac_status(serial)
                print(f"Status for {serial}:", status)

                # Fetch latest events
                events = await api.get_ac_events(serial, event_type="latest")
                print(f"Latest events for {serial}:", events)
    except ActronNeoAuthError as auth_error:
        print(f"Authentication failed: {auth_error}")
    except ActronNeoAPIError as api_error:
        print(f"API error: {api_error}")
    except Exception as e:
        print(f"Unexpected error: {e}")

# Run the async example
asyncio.run(main())

API Methods

Authentication

request_pairing_token(device_name: str, device_unique_id: str)
Requests a pairing token using your Actron Neo credentials and device details.

request_bearer_token()
Exchanges the pairing token for a bearer token required for subsequent API calls.

AC Systems

get_ac_systems()
Retrieves a list of all AC systems associated with your account.

AC System Status

get_ac_status(serial_number: str)
Retrieves the full status of a specific AC system, including temperature, humidity, zone details, and more.

AC System Events

get_ac_events(serial_number: str, event_type: str, event_id: str = None)
Fetches events for a specific AC system:
latest: Retrieves the latest events.
newer: Retrieves events newer than the provided event ID.
older: Retrieves events older than the provided event ID.

Requirements

Python 3.8 or higher
aiohttp

Installation Notes

Ensure you have access to the Actron Neo API by using valid credentials from your Actron Air account.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Disclaimer

This is an unofficial library for the Actron Air API. It is not affiliated, endorsed, or supported by Actron Air. Use at your own risk.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

actron_neo_api-0.0.6.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

actron_neo_api-0.0.6-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file actron_neo_api-0.0.6.tar.gz.

File metadata

  • Download URL: actron_neo_api-0.0.6.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.7

File hashes

Hashes for actron_neo_api-0.0.6.tar.gz
Algorithm Hash digest
SHA256 511b9a8ab8a1be43987b12e7c1ced7c6a8639179dcbb0394c46c1cf7742185c8
MD5 7755561928956872363a7ae85a9267cd
BLAKE2b-256 428f1a8e24a07871e85af4c023bbcfd3feb941c1e7c159b38ca4f97f2e763823

See more details on using hashes here.

File details

Details for the file actron_neo_api-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: actron_neo_api-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.7

File hashes

Hashes for actron_neo_api-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 db80aed13c3568b1dde3bcf495e1a6d0946955abedb57d679ee68338964b01e0
MD5 2a0248d7228a1e6b5e56d38a741700d1
BLAKE2b-256 008151d0c1b5cc5b6a24013727905ed0e6668e3e1c6fbe071cffe8761596d41c

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