actron-neo-api 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Kurt Chrisford
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: actron-neo-api
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Actron Neo API
|
|
5
|
+
Home-page: https://github.com/kclif9/actronneoapi
|
|
6
|
+
Author: Kurt Chrisford
|
|
7
|
+
Author-email: Kurt Chrisford <soft.year7030@fastmail.com>
|
|
8
|
+
Project-URL: Homepage, https://github.com/kclif9/actronneoapi
|
|
9
|
+
Project-URL: Issues, https://github.com/kclif9/actronneoapi/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
17
|
+
|
|
18
|
+
ActronNeoAPI
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
Features
|
|
22
|
+
Authentication: Authenticate with the Actron Air API using your account credentials.
|
|
23
|
+
AC System Management:
|
|
24
|
+
List all AC systems in your account.
|
|
25
|
+
Retrieve detailed status for a specific AC system.
|
|
26
|
+
Fetch system events, including latest, newer, or older events.
|
|
27
|
+
Fully asynchronous, built using aiohttp.
|
|
28
|
+
Installation
|
|
29
|
+
Install the library via pip:
|
|
30
|
+
|
|
31
|
+
bash
|
|
32
|
+
Copy code
|
|
33
|
+
pip install actronneoapi
|
|
34
|
+
Usage
|
|
35
|
+
1. Authentication
|
|
36
|
+
To authenticate with the Actron Air API, you need your username, password, a device name, and a unique device identifier.
|
|
37
|
+
|
|
38
|
+
2. Fetch AC Systems
|
|
39
|
+
Retrieve the list of AC systems associated with your account.
|
|
40
|
+
|
|
41
|
+
3. Get AC System Status
|
|
42
|
+
Get the full status of a specific AC system by its serial number.
|
|
43
|
+
|
|
44
|
+
4. Get AC System Events
|
|
45
|
+
Retrieve events for a specific AC system, including the latest, newer, or older events based on an event ID.
|
|
46
|
+
|
|
47
|
+
Example Code
|
|
48
|
+
python
|
|
49
|
+
Copy code
|
|
50
|
+
import asyncio
|
|
51
|
+
from actronneoapi import ActronNeoAPI, ActronNeoAuthError, ActronNeoAPIError
|
|
52
|
+
|
|
53
|
+
async def main():
|
|
54
|
+
username = "your_email@example.com"
|
|
55
|
+
password = "your_password"
|
|
56
|
+
device_name = "my_device"
|
|
57
|
+
device_unique_id = "unique_device_id"
|
|
58
|
+
|
|
59
|
+
api = ActronNeoAPI(username, password)
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
# Step 1: Authenticate
|
|
63
|
+
await api.request_pairing_token(device_name, device_unique_id)
|
|
64
|
+
await api.request_bearer_token()
|
|
65
|
+
|
|
66
|
+
# Step 2: Fetch AC systems
|
|
67
|
+
systems = await api.get_ac_systems()
|
|
68
|
+
print("AC Systems:", systems)
|
|
69
|
+
|
|
70
|
+
# Get the serial number of the first system
|
|
71
|
+
if systems:
|
|
72
|
+
serial = systems[0].get("serial")
|
|
73
|
+
if serial:
|
|
74
|
+
# Fetch system status
|
|
75
|
+
status = await api.get_ac_status(serial)
|
|
76
|
+
print(f"Status for {serial}:", status)
|
|
77
|
+
|
|
78
|
+
# Fetch latest events
|
|
79
|
+
events = await api.get_ac_events(serial, event_type="latest")
|
|
80
|
+
print(f"Latest events for {serial}:", events)
|
|
81
|
+
except ActronNeoAuthError as auth_error:
|
|
82
|
+
print(f"Authentication failed: {auth_error}")
|
|
83
|
+
except ActronNeoAPIError as api_error:
|
|
84
|
+
print(f"API error: {api_error}")
|
|
85
|
+
except Exception as e:
|
|
86
|
+
print(f"Unexpected error: {e}")
|
|
87
|
+
|
|
88
|
+
# Run the async example
|
|
89
|
+
asyncio.run(main())
|
|
90
|
+
API Methods
|
|
91
|
+
Authentication
|
|
92
|
+
request_pairing_token(device_name: str, device_unique_id: str)
|
|
93
|
+
Requests a pairing token using your Actron Neo credentials and device details.
|
|
94
|
+
|
|
95
|
+
request_bearer_token()
|
|
96
|
+
Exchanges the pairing token for a bearer token required for subsequent API calls.
|
|
97
|
+
|
|
98
|
+
AC Systems
|
|
99
|
+
get_ac_systems()
|
|
100
|
+
Retrieves a list of all AC systems associated with your account.
|
|
101
|
+
AC System Status
|
|
102
|
+
get_ac_status(serial_number: str)
|
|
103
|
+
Retrieves the full status of a specific AC system, including temperature, humidity, zone details, and more.
|
|
104
|
+
AC System Events
|
|
105
|
+
get_ac_events(serial_number: str, event_type: str, event_id: str = None)
|
|
106
|
+
Fetches events for a specific AC system:
|
|
107
|
+
latest: Retrieves the latest events.
|
|
108
|
+
newer: Retrieves events newer than the provided event ID.
|
|
109
|
+
older: Retrieves events older than the provided event ID.
|
|
110
|
+
Requirements
|
|
111
|
+
Python 3.8 or higher
|
|
112
|
+
aiohttp
|
|
113
|
+
Installation Notes
|
|
114
|
+
Ensure you have access to the Actron Neo API by using valid credentials from your Actron Air account.
|
|
115
|
+
|
|
116
|
+
License
|
|
117
|
+
This project is licensed under the MIT License. See the LICENSE file for details.
|
|
118
|
+
|
|
119
|
+
Disclaimer
|
|
120
|
+
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.
|
|
121
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
actron_neo_api-0.0.1.dist-info/LICENSE,sha256=wWy74e0WR-l53svI5o8w_SdlI-DUs4-7CG0PBGAm0Gc,1071
|
|
2
|
+
actron_neo_api-0.0.1.dist-info/METADATA,sha256=KCuJVfthiFb5c-8jk4_3bLpTiVieEjlRq7cpXvSbnZc,4254
|
|
3
|
+
actron_neo_api-0.0.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
4
|
+
actron_neo_api-0.0.1.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
5
|
+
actron_neo_api-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|