Developer Interface

This part of the documentation covers all the interfaces of Libpurecoollink.

Classes

Common

DysonAccount

class libpurecoollink.dyson.DysonAccount(email, password, country)[source]

Dyson account.

devices()[source]

Return all devices linked to the account.

logged

Return True if user is logged, else False.

login()[source]

Login to dyson web services.

NetworkDevice

class libpurecoollink.dyson_device.NetworkDevice(name, address, port)[source]

Network device.

address

Device address.

name

Device name.

port

Device port.

Fan/Purifier devices

DysonPureCoolState

class libpurecoollink.dyson_pure_state.DysonPureCoolState(payload)[source]

Dyson device state.

fan_mode

Fan mode.

fan_state

Fan state.

filter_life

Filter life.

static is_state_message(payload)[source]

Return true if this message is a Dyson Pure state message.

night_mode

Night mode.

oscillation

Oscillation mode.

quality_target

Air quality target.

speed

Fan speed.

standby_monitoring

Monitor when inactive (standby).

DysonEnvironmentalSensorState

class libpurecoollink.dyson_pure_state.DysonEnvironmentalSensorState(payload)[source]

Environmental sensor state.

dust

Dust level.

humidity

Humidity in percent.

static is_environmental_state_message(payload)[source]

Return true if this message is a state message.

sleep_timer

Sleep timer.

temperature

Temperature in Kelvin.

volatil_organic_compounds

Volatil organic compounds level.

DysonPureHotCoolState

class libpurecoollink.dyson_pure_state.DysonPureHotCoolState(payload)[source]

Dyson device state.

fan_mode

Fan mode.

fan_state

Fan state.

filter_life

Filter life.

focus_mode

Focus the fan on one stream or spread.

heat_mode

Heat mode on or off.

heat_state

Return heat state.

heat_target

Heat target of the temperature.

is_state_message(payload)

Return true if this message is a Dyson Pure state message.

night_mode

Night mode.

oscillation

Oscillation mode.

quality_target

Air quality target.

speed

Fan speed.

standby_monitoring

Monitor when inactive (standby).

tilt

Return tilt status.

Eye 360 robot vacuum device

Dyson360Eye

class libpurecoollink.dyson_360_eye.Dyson360Eye(json_body)[source]

Dyson 360 Eye device.

abort()[source]

Abort cleaning.

active

Active status.

add_message_listener(callback_message)

Add message listener.

auto_update

Auto update configuration.

static call_callback_functions(functions, message)[source]

Call callback functions.

callback_message

Return callback functions when message are received.

clear_message_listener()

Clear all message listener.

command_topic

MQTT command topic.

connect(device_ip, device_port=1883)[source]

Try to connect to device.

Parameters:
  • device_ip – Device IP address
  • device_port – Device Port (default: 1883)
Returns:

True if connected, else False

connection_callback(connected)

Set function called when device is connected.

credentials

Device encrypted credentials.

device_available

Return True if device is fully available, else false.

name

Device name.

network_device

Network device.

new_version_available

Return if new version available.

on_connect(client, userdata, flags, return_code)

Set function callback when connected.

static on_message(client, userdata, msg)[source]

Set function Callback when message received.

pause()[source]

Pause cleaning.

product_type

Product type.

remove_message_listener(callback_message)

Remove a message listener.

request_current_state()

Request new state message.

resume()[source]

Resume cleaning.

serial

Device serial.

set_power_mode(power_mode)[source]

Set power mode.

:param power_mode Power mode (const.PowerMode)

start()[source]

Start cleaning.

state

Device state.

state_data_available()

Call when first state data are available. Internal method.

status_topic

MQTT status topic.

version

Device version.

Dyson360EyeState

class libpurecoollink.dyson_360_eye.Dyson360EyeState(json_body)[source]

Dyson 360 Eye state.

battery_level

Return battery level.

clean_id

Return clean id.

full_clean_type

Return full clean type.

static is_state_message(payload)[source]

Return true if this message is a Dyson 360 Eye state message.

position

Return position.

power_mode

Return power mode.

state

Return state status.

Dyson360EyeTelemetryData

class libpurecoollink.dyson_360_eye.Dyson360EyeTelemetryData(json_body)[source]

Dyson 360 Eye Telemetry Data.

field1

Return field 1.

field2

Return field 2.

field3

Return field 3.

field4

Return field 4.

static is_telemetry_data(payload)[source]

Return true if this message is a telemetry data message.

telemetry_data_id

Return Telemetry data id.

time

Return time.

Dyson360EyeMapData

class libpurecoollink.dyson_360_eye.Dyson360EyeMapData(json_body)[source]

Dyson 360 Eye map data.

clean_id

Return Clean Id.

content

Return content.

content_encoding

Return content encoding.

content_type

Return content type.

grid_id

Return Grid id.

static is_map_data(payload)[source]

Return true if this message is a map data message.

time

Return time.

Dyson360EyeMapGrid

class libpurecoollink.dyson_360_eye.Dyson360EyeMapGrid(json_body)[source]

Dyson 360 Eye map grid.

anchor

Return Anchor.

clean_id

Return clean id.

grid_id

Return grid id.

height

Return height.

static is_map_grid(payload)[source]

Return true if this message is a map grid message.

resolution

Return resolution.

time

Return time.

width

Return width.

Dyson360EyeMapGlobal

class libpurecoollink.dyson_360_eye.Dyson360EyeMapGlobal(json_body)[source]

Dyson 360Eye map global.

angle

Return angle.

clean_id

Return clean id.

grid_id

Return grid id.

static is_map_global(payload)[source]

Return true if this message is a map global message.

position_x

Return x.

position_y

Return y.

time

Return time.

Exceptions

DysonNotLoggedException

exception libpurecoollink.exceptions.DysonNotLoggedException[source]

Not logged to Dyson Web Services Exception.

DysonInvalidTargetTemperatureException

exception libpurecoollink.exceptions.DysonInvalidTargetTemperatureException(temperature_unit, current_value)[source]

Invalid target temperature Exception.