did property

Future<int> did

Get device ID from hello packet if not existed.

Implementation

Future<int> get did async {
  if (_id == null) {
    final hello = await MiIO.instance.hello(address);
    _id = hello.deviceId;
  }
  return _id!;
}