Async client for the Ridder HortOS Automation API (HortiMaX greenhouse controllers)
Project description
aiohortos
Async Python client for the Ridder HortOS Automation API, the cloud API behind HortiMaX greenhouse process controllers.
The library is read-only: it authenticates with an API key and reads controllers, their health, and their readouts. It never writes setpoints.
pip install aiohortos
Usage
import asyncio
from aiohortos import HortosClient
async def main() -> None:
async with HortosClient("your-api-key") as client:
for device in await client.get_devices():
print(device.name, device.label)
for readout in await client.get_latest_readouts(device.name):
print(
f" {readout.source.display_name}: "
f"{readout.identifier} = {readout.value} {readout.unit or ''}"
)
asyncio.run(main())
Pass an existing session to share a connection pool — which is what you want inside an application that already has one:
async with aiohttp.ClientSession() as session:
client = HortosClient("your-api-key", session=session)
The client also accepts a base_url, for on-premise HortOS installations that
serve the same API from your own network.
API surface
| Method | Returns |
|---|---|
authenticate() |
TokenPair — normally not needed; every call authenticates on demand |
get_device_names() |
list[str] of controller identifiers |
get_devices() |
list[Device] with the friendly label |
get_devices_health() |
list[DeviceHealth] — online state, sync state |
get_readout_definitions(device) |
list[ReadoutDefinition] |
get_latest_readouts(device) |
list[Readout] with the newest value each |
get_readout_history(...) |
list[ReadoutValue] over a window of ≤ 24 hours |
Errors all derive from HortosError:
HortosAuthenticationError— the API key or token was rejected (HTTP 401/403)HortosConnectionError— the API could not be reached, or timed outHortosResponseError— an unexpected status or payload, with.status
Notes on the API
- Tokens live 15 minutes and are renewed with a refresh token valid 7 days. The client handles both, and re-authenticates when a token is rejected.
- The API allows 100 requests per 15 seconds per key. The library does not throttle; pace your own polling.
- Unchanged readouts are refreshed at most every 5 minutes, so polling faster than that gains nothing.
- Readout identifiers follow
<CamelCaseSubject>-<Kind>, e.g.VentPositionLeewardSide-Measured. One upstream typo exists in the wild:IrrigationVolume-Measuered. - Some readouts have
unitIdentifier: "Scalar"and a numeric value that is really an enumeration member id from a table the API does not expose. They are returned as-is; decoding them is the caller's problem. Readout.nameembeds the source's user-defined name and is a poor label on its own — build names fromidentifierandsourceinstead.
Ridder's Swagger UI documents the API at
https://hortos.ridder.com/api/process-control/index.html. The OpenAPI
document lives at {base_url}/v1/swagger.json and needs a bearer token.
Development
uv venv && uv pip install -e . --group dev
pytest
ruff check . && ruff format --check . && mypy src
Disclaimer
Unofficial and not affiliated with Ridder. "HortOS" and "HortiMaX" are their trademarks.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiohortos-0.1.0.tar.gz.
File metadata
- Download URL: aiohortos-0.1.0.tar.gz
- Upload date:
- Size: 62.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb7595570552c83070abb5ef042d6a796fe6658bccb4a60f8192be16ca7a8856
|
|
| MD5 |
cf336e53dd9759fd26d26ff66e56d9da
|
|
| BLAKE2b-256 |
815bc198fb0c99b31c5bf220434e417852360b99d1912e07645a8949019972c8
|
Provenance
The following attestation bundles were made for aiohortos-0.1.0.tar.gz:
Publisher:
release.yml on wildekek/aiohortos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiohortos-0.1.0.tar.gz -
Subject digest:
cb7595570552c83070abb5ef042d6a796fe6658bccb4a60f8192be16ca7a8856 - Sigstore transparency entry: 2254784346
- Sigstore integration time:
-
Permalink:
wildekek/aiohortos@0aaa4f756d457ded5adddde4318062c184d0b924 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/wildekek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0aaa4f756d457ded5adddde4318062c184d0b924 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aiohortos-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aiohortos-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d5756d4d4dee61e2ce93f65fbeec8955379e91c90880c8aff6506046a20924c
|
|
| MD5 |
4a92404c26a6f0b25346002bd95d2c54
|
|
| BLAKE2b-256 |
b568bfbe8220899d992aecbaf168f21ee144ff1d79b4f8f756f6d0d39288baf8
|
Provenance
The following attestation bundles were made for aiohortos-0.1.0-py3-none-any.whl:
Publisher:
release.yml on wildekek/aiohortos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiohortos-0.1.0-py3-none-any.whl -
Subject digest:
6d5756d4d4dee61e2ce93f65fbeec8955379e91c90880c8aff6506046a20924c - Sigstore transparency entry: 2254784413
- Sigstore integration time:
-
Permalink:
wildekek/aiohortos@0aaa4f756d457ded5adddde4318062c184d0b924 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/wildekek
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0aaa4f756d457ded5adddde4318062c184d0b924 -
Trigger Event:
release
-
Statement type: