MiIODevice class

Device based API that handles MiIO protocol easier.

Constructors

MiIODevice({required InternetAddress address, required List<int> token, int? id})

Properties

address InternetAddress
final
did Future<int>
Get device ID from hello packet if not existed.
no setter
hashCode int
The hash code for this object.
no setterinherited
id int?
Get device ID.
no setter
info Future<Map<String, dynamic>>
Get MiIO info.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token List<int>
final

Methods

action(int siid, int aiid, {String? did, List input = const <dynamic>[]}) Future<bool>
Trigger action on device.
call<T>(String method, [dynamic params = const <dynamic>[]]) Future<T>
Call method on device.
getProp<T>(String prop) Future<T>
Get a property using legacy MiIO profile.
getProperties(List<GetPropertyReq> properties) Future<List<GetPropertyResp>>
Get a set of properties using MIoT spec.
getProperty<T>(int siid, int piid, [String? did]) Future<T>
Get a property using MIoT spec.
getProps(List<String> props) Future<List>
Get a set of properties using legacy MiIO profile.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setProperties(List<SetPropertyReq> properties) Future<List<SetPropertyResp>>
Set a set of properties using MIoT spec.
setProperty<T>(int siid, int piid, T value, [String? did]) Future<bool>
Set a property using MIoT spec.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited