Skip to main content

Airzone Cloud

Presentation

Abstract

Allow to communicate easily with Airzone Cloud to retrieve information or to send commands (on/off, temperature, HVAC mode, ...)

This library manage the main Airzone Cloud API (try to connect to www.airzonecloud.com to be sure).

Official API documentation is available here : https://developers.airzonecloud.com/docs/web-api/

Module classes

  • AirzoneCloud : represent your AirzoneCloud account. Contains a list of your installations :
    • Installation: represent one of your installation (like your home, an office, ...). Contains a list of its groups :
      • Group : represent a group of devices in the installation
        • Device : represent your thermostat to control

Airzonecloud tree elements

Usage

Install

pip3 install AirzoneCloud

Start API

from AirzoneCloud import AirzoneCloud
api = AirzoneCloud("email@domain.com", "password")

Get installations

for installation in api.installations:
    print(
        "Installation(name={}, access_type={}, ws_ids=[{}], id={})".format(
            installation.name, installation.access_type, ", ".join(installation.ws_ids), installation.id
        )
    )

Output :

Installation(name=Home, access_type=admin, ws_ids=[AA:BB:CC:DD:EE:FF], id=60f5cb990123456789abdcef)

Get installations

for installation in api.installations:
    print(
        "Installation(name={}, access_type={}, ws_ids=[{}], id={})".format(
            installation.name, installation.access_type, ", ".join(installation.ws_ids), installation.id
        )
    )

Output :

Installation(name=Home, access_type=admin, ws_ids=[AA:BB:CC:DD:EE:FF], id=60f5cb990123456789abdcef)

Get groups for each installation

for installation in api.installations:
    print(installation)
    for group in installation.groups:
        print(
            "  Group(name={}, installation={}, id={})".format(
                group.name, group.installation.name, group.id
            )
        )

Output :

Installation(name=Home)
  Group(name=System 1, installation=Home, id=60f5cb990123456789abdce0)

Get devices for each grou of each installation

for installation in api.installations:
    print(installation)
    for group in installation.groups:
        print("  " + str(group))
        for device in group.devices:
            print(
                "    Device(name={}, is_connected={}, is_on={}, mode={}, current_temp={}, target_temp={}, id={}, ws_id={})".format(
                    device.name,
                    device.is_connected,
                    device.is_on,
                    device.mode,
                    device.current_temperature,
                    device.target_temperature,
                    device.id,
                    device.ws_id,
                )
            )

Output :

Installation(name=Home)
  Group(name=System 1, installation=Home)
    Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.9, target_temp=20.0, id=60f5cb990123456789abdce1, ws_id=AA:BB:CC:DD:EE:FF)
    Device(name=Ch parents, is_connected=True, is_on=False, mode=heating, current_temp=17.2, target_temp=18.0, id=60f5cb990123456789abdce2, ws_id=AA:BB:CC:DD:EE:FF)
    Device(name=Ch bebe, is_connected=True, is_on=False, mode=heating, current_temp=18.6, target_temp=19.5, id=60f5cb990123456789abdce3, ws_id=AA:BB:CC:DD:EE:FF)

Get all devices from all installations shortcut

for device in api.all_devices:
    print(
        "Device(name={}, is_on={}, mode={}, current_temp={}, target_temp={}, id={})".format(
            device.name,
            device.is_on,
            device.mode,
            device.current_temperature,
            device.target_temperature,
            device.id,
        )
    )

Output :

Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.9, target_temp=20.0, id=60f5cb990123456789abdce1, ws_id=AA:BB:CC:DD:EE:FF)
Device(name=Ch parents, is_connected=True, is_on=False, mode=heating, current_temp=17.2, target_temp=18.0, id=60f5cb990123456789abdce2, ws_id=AA:BB:CC:DD:EE:FF)
Device(name=Ch bebe, is_connected=True, is_on=False, mode=heating, current_temp=18.6, target_temp=19.5, id=60f5cb990123456789abdce3, ws_id=AA:BB:CC:DD:EE:FF)

Control a device

All actions by default are waiting 1 second then refresh the device. You can disable this behavior by adding auto_refresh=False.

# get first device
device = api.all_devices[0]
print(device)

# start device & set temperature
device.turn_on(auto_refresh=False).set_temperature(22)
print(device)

# stopping device
device.turn_off()
print(device)

Output :

Device(name=Salon, is_connected=True, is_on=False, mode=heating, current_temp=20.8, target_temp=20.0)
Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.8, target_temp=22.0)
Device(name=Salon, is_connected=True, is_on=False, mode=heating, current_temp=20.8, target_temp=22.0)

HVAC mode

Available modes

  • stop : Stop mode
  • auto : Automatic mode
  • cooling : Cooling mode
  • heating : Heating mode
  • ventilation : Ventilation mode
  • dehumidify : Dehumidifier / Dry mode
  • emergency-heating : Emergency heat mode
  • air-heating : Heat air mode (only compatible systems)
  • radiant-heating : Heat radiant mode (only compatible systems)
  • combined-heating : Heat combined mode (only compatible systems)
  • air-cooling : Cooling air mode (only compatible systems)
  • radiant-cooling : Cooling radiant mode (only compatible systems)
  • combined-cooling : Cooling combined mode (only compatible systems)

Only master thermostat device can update the mode.

List supported modes for each devices

for device in api.all_devices:
    print(
        "Device(name={}, mode={}, modes_availables={})".format(
            device.name,
            device.mode,
            device.modes_availables,
        )
    )

Output :

Device(name=Salon, mode=heating, modes_availables=['cooling', 'heating', 'ventilation', 'dehumidify', 'stop'])
Device(name=Ch parents, mode=heating, modes_availables=[])
Device(name=Ch bebe, mode=heating, modes_availables=[])

If modes_availables is an empty list, your device is not the master thermostat.

Set HVAC mode on a master thermostat device (and all linked thermostats)

device = api.all_devices[0]
print(device)

# set mode to cooling
device.set_mode("cooling")
print(device)

Output :

Device(name=Salon, is_connected=True, is_on=True, mode=heating, current_temp=20.8, target_temp=20.0)
Device(name=Salon, is_connected=True, is_on=True, mode=cooling, current_temp=20.8, target_temp=20.0)

API documentation

API full doc

Tests

Update configuration in config_test.json

  • email : used to log-in to you AirzoneCloud account (default to changeme@example.com)
  • password : used to log-in to you AirzoneCloud account (default to changeme)
  • log_level : minimum level of log to display : DEBUG | INFO | WARNING | ERROR | CRITICIAL (default to INFO)
  • display_group_properties : display all properties for each group (default to true).
  • display_device_properties : display all properties for each device (default to true).
  • display_api_token : ask to display token used to connect to the AirzoneCloud API (default to false). Useful for https://developers.airzonecloud.com/docs/web-api/
  • refresh_before_display : ask to call all refresh functions before displaying for test purpose (default to false).

Run test script

./test.py

Release files for AirzoneCloud 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AirzoneCloud 1.2.2
File Size Uploaded
AirzoneCloud-1.2.2.tar.gz 11.2 kB Details

Release files / AirzoneCloud-1.2.2.tar.gz

Download URL AirzoneCloud-1.2.2.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9cd04626495819df3709b65b72bed8381a4c946487a289e8c34d140e489b9f53
BLAKE2b-256 checksum
How to use checksums
e06b7d41c51c0fc3c683840b084ca87c792554fc1eacbbb7d5e083375ca27bc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.26.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.2.2 This release

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page