Skip to main content

Asynchronous API Library to work with Elmax devices

Project description

Python Elmax API client

Elmax Logo

Asynchronous Python API client for interacting with the Elmax Cloud services, via HTTP apis.

Release Build Status Testing Status Documentation


Use the package manager pip to install Python Elmax API client:

$ pip3 install elmax-api --user

or, to install it globally, use the following command

$ pip3 install elmax-api


import asyncio

from elmax_api.http import Elmax
from elmax_api.model.command import SwitchCommand


async def main():
    # Instantiate the Elmax API client
    client = Elmax(username=MY_USERNAME, password=MY_PASSWORD)

    # List panels for your user
    panels = await client.list_control_panels()
    print(f"Found {len(panels)} panels for user {client.get_authenticated_username()}")

    # Get online panels only
    online_panels = []
    for p in panels:
        status = 'ONLINE' if else 'OFFLINE'
        print(f"+ {p.hash}: {status}")

    if len(online_panels) == 0:
        print("Sorry, no panel to work with. Exiting.")

    # Fetch status of first panel
    p = online_panels[0]
    panel_status = await client.get_panel_status(control_panel_id=p.hash)

    # Print some zone status
    for z in panel_status.zones:
        print(f"Zone '{}' open: {z.opened}")

    # Toggle some actuator
    actuator = panel_status.actuators[0]
    old_status = actuator.opened
    print(f"Actuator {} was {'ON' if old_status else 'OFF'}")
    print(f"Switching {'OFF' if old_status else 'ON'} actuator {}")
    await client.execute_command(endpoint_id=actuator.endpoint_id, command=SwitchCommand.TURN_ON if not old_status else SwitchCommand.TURN_OFF)

    print("Waiting a bit...")
    await asyncio.sleep(5)

    print("Reverting back original actuator status")
    await client.execute_command(endpoint_id=actuator.endpoint_id,
                                 command=SwitchCommand.TURN_ON if old_status else SwitchCommand.TURN_OFF)

if __name__ == '__main__':


Full API documentation is available on GitHub pages, here.

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

elmax_api-0.0.5.tar.gz (17.9 kB view hashes)

Uploaded source

Built Distribution

elmax_api-0.0.5-py3-none-any.whl (18.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page