API Reference
Client to the DIO Chacon wifi API. It is mainly a proxy to the chacon's cloud server. It manages authentication, the protocol through the websocket connection and server side callback events.
__init__(login_email, password, service_name='python_generic', callback_device_state=None)
Initialize the client API. Actually do nothing but storing informations. The effective authentication and connection are lazyly achieved.
| Parameters: |
|
|---|
disconnect()
async
Disconnects for the cloud server and properly closes the connection. It must be called at the of API usage or before python program ending.
get_status_details(ids, notifyCallback=False, device_infos=None)
async
Retrieves the status detailed of devices ids given.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_user_id()
async
Search for the user technical id based on its authentification elements.
| Returns: |
|
|---|
move_shutter_direction(shutter_id, direction)
async
Moves the given shutter in the given direction.
| Parameters: |
|
|---|
move_shutter_percentage(shutter_id, openlevel)
async
Moves the given shutter at a given position.
| Parameters: |
|
|---|
search_all_devices(device_type_to_search=None, with_state=False)
async
Search all the known devices with their states : positions for shutters and on/off for switches
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_callback_device_state(callback_device_state)
Register after the constructor the global callback method that will be called for server side events
set_callback_device_state_by_device(target_id, callback_device_state)
Register the per device callback method that will be called for server side events
switch_switch(switch_id, set_on)
async
Switches on or off the given switch.
| Parameters: |
|
|---|