aiovantage
¶
Asynchronous Python library for controlling Vantage InFusion controllers.
Modules:
-
command_client–Clients for the Vantage Host Command (HC) service.
-
config_client–Client for the Vantage Application Communication Interface (ACI) service.
-
controllers–Controllers for managing collections of objects from the Vantage system.
-
discovery–Helper functions for discovering details about Vantage controllers.
-
errors–Client exceptions.
-
events–Event classes for Vantage controller events.
-
object_interfaces–Object interfaces classes.
-
objects–Vantage object definitions.
Classes:
-
Vantage–Main client for interacting with Vantage systems.
Vantage
¶
Vantage(host: str, username: str | None = None, password: str | None = None, *, ssl: SSLContext | bool = True, ssl_context_factory: Callable[[], SSLContext] | None = None, config_port: int | None = None, command_port: int | None = None)
Main client for interacting with Vantage systems.
The Vantage class manages the various connections to a Vantage system, as well as exposing "controllers" for fetching and interacting with objects in the system.
Parameters:
-
host(str) –The hostname or IP address of the Vantage controller.
-
username(str | None, default:None) –The username to use for authentication.
-
password(str | None, default:None) –The password to use for authentication.
-
ssl(SSLContext | bool, default:True) –The SSL context to use. True will use the default context, False will disable SSL.
-
ssl_context_factory(Callable[[], SSLContext] | None, default:None) –A factory function to create an SSL context.
-
config_port(int | None, default:None) –The port to use for the config client.
-
command_port(int | None, default:None) –The port to use for the command client.
Methods:
-
get–Return the item with the given Vantage ID.
-
close–Close all client connections.
-
initialize–Initialize all controllers.
-
discover_masters–Find the masters in the system. Later calls return at once.
-
fetch_state–Fetch the state properties of all objects.
-
enable_state_monitoring–Monitor for state changes on all objects.
-
disable_state_monitoring–Stop monitoring for state changes on all objects.
-
subscribe–Subscribe to events from every controller.
Attributes:
-
host(str) –The hostname or IP address of the Vantage controller.
-
config_client(ConfigClient) –The config client instance.
-
command_client(CommandClient) –The command client instance.
-
event_stream(EventStream) –The event stream instance.
-
master_number(int | None) –Master number of the master the clients connect to, None before discover_masters.
-
peers(list[int]) –Master numbers of the other running masters, known after discover_masters.
-
anemo_sensors(AnemoSensorsController) –Controller for interacting with wind speed sensors.
-
areas(AreasController) –Controller for interacting with areas.
-
back_boxes(BackBoxesController) –Controller for interacting with back boxes.
-
blinds(BlindsController) –Controller for interacting with blinds.
-
blind_groups(BlindGroupsController) –Controller for interacting with groups of blinds.
-
buttons(ButtonsController) –Controller for interacting with keypad buttons.
-
dry_contacts(DryContactsController) –Controller for interacting with dry contacts.
-
gmem(GMemController) –Controller for interacting with variables.
-
light_sensors(LightSensorsController) –Controller for interacting with light sensors.
-
loads(LoadsController) –Controller for interacting with loads (lights, fans, etc).
-
load_groups(LoadGroupsController) –Controller for interacting with groups of loads.
-
masters(MastersController) –Controller for interacting with Vantage Controllers.
-
modules(ModulesController) –Controller for interacting with dimmer modules.
-
omni_sensors(OmniSensorsController) –Controller for interacting with "omni" sensors.
-
port_devices(PortDevicesController) –Controller for interacting with port devices.
-
power_profiles(PowerProfilesController) –Controller for interacting with power profiles.
-
rgb_loads(RGBLoadsController) –Controller for interacting with RGB loads.
-
stations(StationsController) –Controller for interacting with stations (keypads, etc).
-
tasks(TasksController) –Controller for interacting with tasks.
-
temperatures(TemperaturesController) –Controller for interacting with temperature sensors.
-
thermostats(ThermostatsController) –Controller for interacting with thermostats.
master_number
property
¶
master_number: int | None
Master number of the master the clients connect to, None before discover_masters.
peers
property
¶
Master numbers of the other running masters, known after discover_masters.
anemo_sensors
property
¶
anemo_sensors: AnemoSensorsController
Controller for interacting with wind speed sensors.
blind_groups
property
¶
blind_groups: BlindGroupsController
Controller for interacting with groups of blinds.
dry_contacts
property
¶
dry_contacts: DryContactsController
Controller for interacting with dry contacts.
light_sensors
property
¶
light_sensors: LightSensorsController
Controller for interacting with light sensors.
load_groups
property
¶
load_groups: LoadGroupsController
Controller for interacting with groups of loads.
omni_sensors
property
¶
omni_sensors: OmniSensorsController
Controller for interacting with "omni" sensors.
port_devices
property
¶
port_devices: PortDevicesController
Controller for interacting with port devices.
power_profiles
property
¶
power_profiles: PowerProfilesController
Controller for interacting with power profiles.
stations
property
¶
stations: StationsController
Controller for interacting with stations (keypads, etc).
temperatures
property
¶
temperatures: TemperaturesController
Controller for interacting with temperature sensors.
thermostats
property
¶
thermostats: ThermostatsController
Controller for interacting with thermostats.
get
¶
get(vid: int) -> SystemObject | None
Return the item with the given Vantage ID.
Parameters:
-
vid(int) –The Vantage ID of the object.
Returns:
-
SystemObject | None–The object if it exists and has been fetched by a controller, or None.
initialize
async
¶
discover_masters
async
¶
discover_masters() -> None
Find the masters in the system. Later calls return at once.
enable_state_monitoring
async
¶
enable_state_monitoring() -> None
Monitor for state changes on all objects.
disable_state_monitoring
async
¶
disable_state_monitoring() -> None
Stop monitoring for state changes on all objects.