offlineStateMessage method

Future offlineStateMessage()

注销设备

Implementation

Future offlineStateMessage() async {
  stateMessage.value.state = StateMessageState.offline;
  try {
    client.publish(
        "${deviceType.value}/${MessageAction.state}/${deviceId.value}",
        jsonEncode(stateMessage.value.toJson()),
        retain: true);
  } catch (e, st) {
    log("注销设备失败", stackTrace: st, error: e);
  }
}