Developer Interface¶
This part of the documentation covers all the interfaces of Libpurecoollink.
Classes¶
Fan/Purifier devices¶
DysonPureCoolLink¶
-
class
libpurecoollink.dyson_pure_cool_link.
DysonPureCoolLink
(json_body)[source]¶ Dyson device (fan).
-
class
DysonDeviceListener
(serial, add_device_function)[source]¶ Message listener.
-
DysonPureCoolLink.
active
¶ Active status.
-
DysonPureCoolLink.
add_message_listener
(callback_message)¶ Add message listener.
-
DysonPureCoolLink.
auto_connect
(timeout=5, retry=15)[source]¶ Try to connect to device using mDNS.
Parameters: - timeout – Timeout
- retry – Max retry
Returns: True if connected, else False
-
DysonPureCoolLink.
auto_update
¶ Auto update configuration.
-
DysonPureCoolLink.
callback_message
¶ Return callback functions when message are received.
-
DysonPureCoolLink.
clear_message_listener
()¶ Clear all message listener.
-
DysonPureCoolLink.
command_topic
¶ MQTT command topic.
-
DysonPureCoolLink.
connect
(device_ip, device_port=1883)[source]¶ Connect to the device using ip address.
Parameters: - device_ip – Device IP address
- device_port – Device Port (default: 1883)
Returns: True if connected, else False
-
DysonPureCoolLink.
connected
¶ Device connected.
-
DysonPureCoolLink.
connection_callback
(connected)¶ Set function called when device is connected.
-
DysonPureCoolLink.
credentials
¶ Device encrypted credentials.
-
DysonPureCoolLink.
device_available
¶ Return True if device is fully available, else false.
-
DysonPureCoolLink.
environmental_state
¶ Environmental Device state.
-
DysonPureCoolLink.
name
¶ Device name.
-
DysonPureCoolLink.
network_device
¶ Network device.
-
DysonPureCoolLink.
new_version_available
¶ Return if new version available.
-
DysonPureCoolLink.
on_connect
(client, userdata, flags, return_code)¶ Set function callback when connected.
-
static
DysonPureCoolLink.
on_message
(client, userdata, msg)[source]¶ Set function Callback when message received.
-
DysonPureCoolLink.
product_type
¶ Product type.
-
DysonPureCoolLink.
remove_message_listener
(callback_message)¶ Remove a message listener.
-
DysonPureCoolLink.
request_current_state
()¶ Request new state message.
-
DysonPureCoolLink.
sensor_data_available
()[source]¶ Call when first sensor data are available. Internal method.
-
DysonPureCoolLink.
serial
¶ Device serial.
-
DysonPureCoolLink.
set_configuration
(**kwargs)[source]¶ Configure fan.
Parameters: kwargs – Parameters
-
DysonPureCoolLink.
set_fan_configuration
(data)[source]¶ Configure Fan.
Parameters: data – Data to send
-
DysonPureCoolLink.
state
¶ Device state.
-
DysonPureCoolLink.
state_data_available
()¶ Call when first state data are available. Internal method.
-
DysonPureCoolLink.
status_topic
¶ MQTT status topic.
-
DysonPureCoolLink.
version
¶ Device version.
-
class
DysonPureHotCoolLink¶
-
class
libpurecoollink.dyson_pure_hotcool_link.
DysonPureHotCoolLink
(json_body)[source]¶ Dyson Pure Hot+Cool device.
-
class
DysonDeviceListener
(serial, add_device_function)¶ Message listener.
-
add_service
(zeroconf, device_type, name)¶ Add device.
Parameters: - zeroconf – MSDNS object
- device_type – Service type
- name – Device name
-
remove_service
(zeroconf, device_type, name)¶ Remove listener.
-
-
DysonPureHotCoolLink.
active
¶ Active status.
-
DysonPureHotCoolLink.
add_message_listener
(callback_message)¶ Add message listener.
-
DysonPureHotCoolLink.
auto_connect
(timeout=5, retry=15)¶ Try to connect to device using mDNS.
Parameters: - timeout – Timeout
- retry – Max retry
Returns: True if connected, else False
-
DysonPureHotCoolLink.
auto_update
¶ Auto update configuration.
-
DysonPureHotCoolLink.
callback_message
¶ Return callback functions when message are received.
-
DysonPureHotCoolLink.
clear_message_listener
()¶ Clear all message listener.
-
DysonPureHotCoolLink.
command_topic
¶ MQTT command topic.
-
DysonPureHotCoolLink.
connect
(device_ip, device_port=1883)¶ Connect to the device using ip address.
Parameters: - device_ip – Device IP address
- device_port – Device Port (default: 1883)
Returns: True if connected, else False
-
DysonPureHotCoolLink.
connected
¶ Device connected.
-
DysonPureHotCoolLink.
connection_callback
(connected)¶ Set function called when device is connected.
-
DysonPureHotCoolLink.
credentials
¶ Device encrypted credentials.
-
DysonPureHotCoolLink.
device_available
¶ Return True if device is fully available, else false.
-
DysonPureHotCoolLink.
disconnect
()¶ Disconnect from the device.
-
DysonPureHotCoolLink.
environmental_state
¶ Environmental Device state.
-
DysonPureHotCoolLink.
name
¶ Device name.
-
DysonPureHotCoolLink.
network_device
¶ Network device.
-
DysonPureHotCoolLink.
new_version_available
¶ Return if new version available.
-
DysonPureHotCoolLink.
on_connect
(client, userdata, flags, return_code)¶ Set function callback when connected.
-
DysonPureHotCoolLink.
on_message
(client, userdata, msg)¶ Set function Callback when message received.
-
DysonPureHotCoolLink.
product_type
¶ Product type.
-
DysonPureHotCoolLink.
remove_message_listener
(callback_message)¶ Remove a message listener.
-
DysonPureHotCoolLink.
request_current_state
()¶ Request new state message.
-
DysonPureHotCoolLink.
request_environmental_state
()¶ Request new state message.
-
DysonPureHotCoolLink.
sensor_data_available
()¶ Call when first sensor data are available. Internal method.
-
DysonPureHotCoolLink.
serial
¶ Device serial.
-
DysonPureHotCoolLink.
set_configuration
(**kwargs)[source]¶ Configure fan.
Parameters: kwargs – Parameters
-
DysonPureHotCoolLink.
set_fan_configuration
(data)¶ Configure Fan.
Parameters: data – Data to send
-
DysonPureHotCoolLink.
state
¶ Device state.
-
DysonPureHotCoolLink.
state_data_available
()¶ Call when first state data are available. Internal method.
-
DysonPureHotCoolLink.
status_topic
¶ MQTT status topic.
-
DysonPureHotCoolLink.
version
¶ Device version.
-
class
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.
-
active
¶ Active status.
-
add_message_listener
(callback_message)¶ Add message listener.
-
auto_update
¶ Auto update configuration.
-
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.
-
product_type
¶ Product type.
-
remove_message_listener
(callback_message)¶ Remove a message listener.
-
request_current_state
()¶ Request new state message.
-
serial
¶ Device serial.
-
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.
-