miio.integrations.roidmi.vacuum.roidmivacuum_miot module

Vacuum Eve Plus (roidmi.vacuum.v60)

class miio.integrations.roidmi.vacuum.roidmivacuum_miot.ChargingState(value)[source]

Bases: Enum

An enumeration.

Charging = 1
Discharging = 2
NotChargeable = 4
Unknown = -1
class miio.integrations.roidmi.vacuum.roidmivacuum_miot.FanSpeed(value)[source]

Bases: Enum

An enumeration.

Basic = 2
FullSpeed = 4
Silent = 1
Strong = 3
Sweep = 0
Unknown = -1
class miio.integrations.roidmi.vacuum.roidmivacuum_miot.PathMode(value)[source]

Bases: Enum

An enumeration.

Normal = 0
RepeatMopping = 2
Unknown = -1
YMopping = 1
class miio.integrations.roidmi.vacuum.roidmivacuum_miot.RoidmiCleaningSummary(data)[source]

Bases: DeviceStatus

Contains summarized information about available cleaning runs.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property count: int

Number of cleaning runs.

property total_area: int

Total cleaned area.

property total_duration: timedelta

Total cleaning duration.

class miio.integrations.roidmi.vacuum.roidmivacuum_miot.RoidmiConsumableStatus(data)[source]

Bases: DeviceStatus

Container for consumable status information, including information about brushes and duration until they should be changed.

The methods returning time left are based values returned from the device.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property filter: timedelta

Filter usage time.

property filter_left: timedelta

How long until the filter should be changed.

property main_brush: timedelta

Main brush usage time.

property main_brush_left: timedelta

How long until the main brush should be changed.

property sensor_dirty: timedelta

Return time since last sensor clean.

property sensor_dirty_left: timedelta

How long until the sensors should be cleaned.

property side_brush: timedelta

Main brush usage time.

property side_brush_left: timedelta

How long until the side brushes should be changed.

class miio.integrations.roidmi.vacuum.roidmivacuum_miot.RoidmiState(value)[source]

Bases: Enum

An enumeration.

Charging = 6
Dormant = 1
Error = 7
FindChargerPause = 11
Fullcharge = 9
GoCharging = 5
Idle = 2
Paused = 3
Rfctrl = 8
Shutdown = 10
Sweeping = 4
Unknown = -1
class miio.integrations.roidmi.vacuum.roidmivacuum_miot.RoidmiVacuumMiot(ip: str | None = None, token: str | None = None, start_id: int = 0, debug: int = 0, lazy_discover: bool = True, timeout: int | None = None, *, model: str | None = None, mapping: Dict[str, Dict[str, Any]] | None = None)[source]

Bases: MiotDevice

Interface for Vacuum Eve Plus (roidmi.vacuum.v60)

actions() DescriptorCollection[ActionDescriptor]

Return device actions.

call_action(name: str, params=None)

Call action by name.

call_action_by(siid, aiid, params=None)

Call an action.

call_action_from_mapping(name: str, params=None)

Call an action by a name in the mapping.

change_setting(name: str, params=None)

Change setting value.

cleaning_summary() RoidmiCleaningSummary[source]

Return information about cleaning runs.

configure_wifi(ssid, password, uid=0, extra_params=None)

Configure the wifi settings.

consumable_status() RoidmiConsumableStatus[source]

Return information about consumables.

descriptors() DescriptorCollection[Descriptor]

Return a collection containing all descriptors for the device.

disable_dnd()[source]

Disable do-not-disturb.

fan_speed_presets() Dict[str, int][source]

Return available fan speed presets.

classmethod get_device_group()
get_properties(properties, *, property_getter='get_prop', max_properties=None)

Request properties in slices based on given max_properties.

This is necessary as some devices have limitation on how many properties can be queried at once.

If max_properties is None, all properties are requested at once.

Parameters:
  • properties (list) – List of properties to query from the device.

  • max_properties (int) – Number of properties that can be requested at once.

Returns:

List of property values.

get_properties_for_mapping(*, max_properties=15) list

Retrieve raw properties based on mapping.

get_property_by(siid: int, piid: int)

Get a single property (siid/piid).

home() None[source]

Return to home.

identify() None[source]

Locate the device (i am here).

info(*, skip_cache=False) DeviceInfo

Get (and cache) miIO protocol information from the device.

This includes information about connected wlan network, and hardware and software versions.

Parameters:

bool (skip_cache) – Skip the cache

raw_command(command, parameters)

Send a raw command to the device. This is mostly useful when trying out commands which are not implemented by a given device instance.

Parameters:
  • command (str) – Command to send

  • parameters (dict) – Parameters to send

reset_filter_life() None[source]

Reset filter life.

reset_mainbrush_life() None[source]

Reset main brush life.

reset_sensor_dirty_life() None[source]

Reset sensor dirty life.

reset_sidebrush_life() None[source]

Reset side brushes life.

send(command: str, parameters: Any | None = None, retry_count: int | None = None, *, extra_parameters=None) Any

Send a command to the device.

Basic format of the request: {“id”: 1234, “method”: command, “parameters”: parameters}

extra_parameters allows passing elements to the top-level of the request. This is necessary for some devices, such as gateway devices, which expect the sub-device identifier to be on the top-level.

Parameters:
  • command (str) – Command to send

  • parameters (dict) – Parameters to send

  • retry_count (int) – How many times to retry on error

  • extra_parameters (dict) – Extra top-level parameters

  • model (str) – Force model to avoid autodetection

send_handshake()

Send initial handshake to the device.

sensors() DescriptorCollection[PropertyDescriptor]

Return read-only properties.

set_carpet_mode(auto_boost: bool)[source]

Set auto boost on carpet.

set_dnd(start_hr: int, start_min: int, end_hr: int, end_min: int)[source]

Set do-not-disturb.

Parameters:
  • start_hr (int) – Start hour

  • start_min (int) – Start minute

  • end_hr (int) – End hour

  • end_min (int) – End minute

set_double_clean(double_clean: bool)[source]

Set double clean (True/False).

set_dust_collection_frequency(dust_collection_frequency: int)[source]

Set frequency for emptying the dust bin.

Example: 2 means the dust bin is emptied every second cleaning.

set_fan_speed_preset(speed_preset: int) None[source]

Set fan speed preset speed.

set_fanspeed(fanspeed_mode: FanSpeed)[source]

Set fan speed.

set_led(on: bool)[source]

Enable vacuum led.

set_lidar_collision_sensor(lidar_collision: bool)[source]

When ON, the robot will use lidar as the main detection sensor to help reduce collisions.

set_path_mode(path_mode: PathMode)[source]

Set path_mode.

set_property(property_key: str, value)

Sets property value using the existing mapping.

set_property_by(siid: int, piid: int, value: int | float | str | bool, *, value_type: Any | None = None, name: str | None = None)

Set a single property (siid/piid) to given value.

value_type can be given to convert the value to wanted type, allowed types are: int, float, bool, str

set_sound_muted(value: bool)[source]

Set sound volume muted.

set_sound_volume(vol: int)[source]

Set sound volume [0-100].

set_station_led(on: bool)[source]

Enable station led display.

set_sweep_type(sweep_type: SweepType)[source]

Set sweep_type.

set_timing(timing: str)[source]

Set repeated clean timing.

Set timing to 9:00 Monday-Friday, rooms:[12,10] timing = ‘{“time”:[[32400,1,3,0,[1,2,3,4,5],0,[12,10],null]],”tz”:2,”tzs”:7200}’ See also RoidmiVacuumStatus.timing()

NOTE: setting timing will override existing settings

set_water_level(water_level: WaterLevel)[source]

Set water_level.

settings() DescriptorCollection[PropertyDescriptor]

Return settable properties.

start() None[source]

Start cleaning.

start_dust() None[source]

Start base dust collection.

status() RoidmiVacuumStatus[source]

State of the vacuum.

stop() None[source]

Stop cleaning.

supports_miot() bool

Return True if the device supports miot commands.

This requests a single property (siid=1, piid=1) and returns True on success.

update(url: str, md5: str)

Start an OTA update.

update_progress() int

Return current update progress [0-100].

update_state()

Return current update state.

property device_id: int

Return the device id (did).

mapping: Dict[str, Dict[str, Any]]
property model: str

Return device model.

property raw_id: int

Return the last used protocol sequence id.

retry_count = 3
supported_models = ['roidmi.vacuum.v60']
timeout = 5
token: str | None
class miio.integrations.roidmi.vacuum.roidmivacuum_miot.RoidmiVacuumStatus(data)[source]

Bases: DeviceStatus

Container for status reports from the vacuum.

descriptors() DescriptorCollection[PropertyDescriptor]

Return the dict of sensors exposed by the status container.

Use @sensor and @setting decorators to define properties.

embed(name: str, other: DeviceStatus)

Embed another status container to current one.

This makes it easy to provide a single status response for cases where responses from multiple I/O calls is wanted to provide a simple interface for downstreams.

Internally, this will prepend the name of the other class to the attribute names, and override the __getattribute__ to lookup attributes in the embedded containers.

property battery: int

Remaining battery in percentage.

property carpet_mode: bool

Auto boost on carpet.

property charging_state: ChargingState

Charging state (Charging/Discharging)

property clean_area: int

Cleaned area in m2.

property clean_time: timedelta

Time used for cleaning (if finished, shows how long it took).

property current_audio: str

Current voice setting.

E.g. ‘girl_en’

property dnd_status: DNDStatus

Returns do-not-disturb status.

property double_clean: bool

Is double clean enabled.

property dust_collection_frequency: int

Frequency for emptying the dust bin.

Example: 2 means the dust bin is emptied every second cleaning.

property error: str

Human readable error description, see also error_code().

property error_code: int

Error code as returned by the device.

property fan_speed: FanSpeed

Current fan speed.

property got_error: bool

True if an error has occurred.

property is_lidar_collision_sensor: bool

When ON, the robot will use lidar as the main detection sensor to help reduce collisions.

property is_mop_attached: bool

Return True if mop is attached.

property is_muted: bool

True if device is muted.

property is_on: bool

True if device is currently cleaning in any mode.

property is_paused: bool

Return True if vacuum is paused.

property led: bool

Return True if led/display on vaccum is on.

property path_mode: PathMode

Current path-mode: normal/y-mopping etc.

property state: RoidmiState

Human readable state description, see also state_code().

property state_code: int

State code as returned by the device.

property station_key: bool

When ON: long press the display will turn on dust collection.

property station_led: bool

Return if station display is on.

property sweep_mode: SweepMode

Sweep mode point/area/total etc.

property sweep_type: SweepType

Current sweep type sweep/mop/sweep&mop.

property timing: str

Repeated cleaning.

Example:

{"time":[
    [32400,1,3,0,[1,2,3,4,5],0,[12,10],null],
    [57600,0,1,2,[1,2,3,4,5,6,0],2,[],null]
 ],
 "tz":2,"tzs":7200
}
Cleaning 1::

32400 = startTime(9:00) 1=Enabled 3=FanSpeed.Strong 0=SweepType.Sweep [1,2,3,4,5]=Monday-Friday 0=WaterLevel [12,10]=List of rooms null: ?Might be related to “Customize”?

Cleaning 2::

57600 = startTime(16:00) 0=Disabled 1=FanSpeed.Silent 2=SweepType.MopAndSweep [1,2,3,4,5,6,0]=Monday-Sunday 2=WaterLevel.Second []=All rooms null: ?Might be related to “Customize”?

tz/tzs= time-zone

property volume: int

Return device sound volumen level.

property water_level: WaterLevel

Get current water level.

class miio.integrations.roidmi.vacuum.roidmivacuum_miot.SweepMode(value)[source]

Bases: Enum

An enumeration.

AlongWall = 10
AmartArea = 8
Area = 2
Curpoint = 3
DepthTotal = 9
Idle = 0
Point = 4
Smart = 7
Total = 1
Unknown = -1
class miio.integrations.roidmi.vacuum.roidmivacuum_miot.SweepType(value)[source]

Bases: Enum

An enumeration.

Mop = 1
MopAndSweep = 2
Sweep = 0
Unknown = -1
class miio.integrations.roidmi.vacuum.roidmivacuum_miot.WaterLevel(value)[source]

Bases: Enum

An enumeration.

First = 1
Fourth = 4
Mop = 0
Second = 2
Three = 3
Unknown = -1