diff --git a/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/adaptors/BackwardCompatibilityAdaptor.java b/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/adaptors/BackwardCompatibilityAdaptor.java index 141332f7a7..55733f7b81 100644 --- a/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/adaptors/BackwardCompatibilityAdaptor.java +++ b/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/adaptors/BackwardCompatibilityAdaptor.java @@ -40,7 +40,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor { try { return protoAdaptor.convertToPostTelemetry(ctx, inbound); } catch (AdaptorException e) { - log.trace("failed to process post telemetry request msg {} due to: ", inbound, e); + log.trace("failed to process post telemetry request msg: {} due to: ", inbound, e); return jsonAdaptor.convertToPostTelemetry(ctx, inbound); } } @@ -50,7 +50,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor { try { return protoAdaptor.convertToPostAttributes(ctx, inbound); } catch (AdaptorException e) { - log.trace("failed to process post attributes request msg {} due to: ", inbound, e); + log.trace("failed to process post attributes request msg: {} due to: ", inbound, e); return jsonAdaptor.convertToPostAttributes(ctx, inbound); } } @@ -60,7 +60,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor { try { return protoAdaptor.convertToGetAttributes(ctx, inbound, topicBase); } catch (AdaptorException e) { - log.trace("failed to process get attributes request msg {} due to: ", inbound, e); + log.trace("failed to process get attributes request msg: {} due to: ", inbound, e); return jsonAdaptor.convertToGetAttributes(ctx, inbound, topicBase); } } @@ -70,7 +70,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor { try { return protoAdaptor.convertToDeviceRpcResponse(ctx, mqttMsg, topicBase); } catch (AdaptorException e) { - log.trace("failed to process to device rpc response msg {} due to: ", mqttMsg, e); + log.trace("failed to process to device rpc response msg: {} due to: ", mqttMsg, e); return jsonAdaptor.convertToDeviceRpcResponse(ctx, mqttMsg, topicBase); } } @@ -80,7 +80,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor { try { return protoAdaptor.convertToServerRpcRequest(ctx, mqttMsg, topicBase); } catch (AdaptorException e) { - log.trace("failed to process to server rpc request msg {} due to: ", mqttMsg, e); + log.trace("failed to process to server rpc request msg: {} due to: ", mqttMsg, e); return jsonAdaptor.convertToServerRpcRequest(ctx, mqttMsg, topicBase); } } @@ -90,7 +90,7 @@ public class BackwardCompatibilityAdaptor implements MqttTransportAdaptor { try { return protoAdaptor.convertToClaimDevice(ctx, inbound); } catch (AdaptorException e) { - log.trace("failed to process claim device request msg {} due to: ", inbound, e); + log.trace("failed to process claim device request msg: {} due to: ", inbound, e); return jsonAdaptor.convertToClaimDevice(ctx, inbound); } } diff --git a/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/session/DeviceSessionCtx.java b/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/session/DeviceSessionCtx.java index 585587d6f0..601018f574 100644 --- a/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/session/DeviceSessionCtx.java +++ b/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/session/DeviceSessionCtx.java @@ -85,7 +85,6 @@ public class DeviceSessionCtx extends MqttDeviceAwareSessionContext { private volatile boolean jsonPayloadFormatCompatibilityEnabled; private volatile boolean useJsonPayloadFormatForDefaultDownlinkTopics; - @Getter @Setter private TransportPayloadType provisionPayloadType = payloadType; diff --git a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts index a8da7cc4e7..61f72f6c60 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts @@ -162,36 +162,6 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control this.propagateChange(configuration); } - private updateTest(type: TransportPayloadType, forceUpdated = false) { - const transportPayloadTypeForm = this.mqttDeviceProfileTransportConfigurationFormGroup - .get('transportPayloadTypeConfiguration') as FormGroup; - if (forceUpdated) { - transportPayloadTypeForm.patchValue({ - deviceTelemetryProtoSchema: defaultTelemetrySchema, - deviceAttributesProtoSchema: defaultAttributesSchema, - deviceRpcRequestProtoSchema: defaultRpcRequestSchema, - deviceRpcResponseProtoSchema: defaultRpcResponseSchema, - enableCompatibilityWithJsonPayloadFormat: false, - useJsonPayloadFormatForDefaultDownlinkTopics: false - }, {emitEvent: false}); - } - if (type === TransportPayloadType.PROTOBUF && !this.disabled) { - transportPayloadTypeForm.get('deviceTelemetryProtoSchema').enable({emitEvent: false}); - transportPayloadTypeForm.get('deviceAttributesProtoSchema').enable({emitEvent: false}); - transportPayloadTypeForm.get('deviceRpcRequestProtoSchema').enable({emitEvent: false}); - transportPayloadTypeForm.get('deviceRpcResponseProtoSchema').enable({emitEvent: false}); - transportPayloadTypeForm.get('enableCompatibilityWithJsonPayloadFormat').enable({emitEvent: false}); - transportPayloadTypeForm.get('useJsonPayloadFormatForDefaultDownlinkTopics').enable({emitEvent: false}); - } else { - transportPayloadTypeForm.get('deviceTelemetryProtoSchema').disable({emitEvent: false}); - transportPayloadTypeForm.get('deviceAttributesProtoSchema').disable({emitEvent: false}); - transportPayloadTypeForm.get('deviceRpcRequestProtoSchema').disable({emitEvent: false}); - transportPayloadTypeForm.get('deviceRpcResponseProtoSchema').disable({emitEvent: false}); - transportPayloadTypeForm.get('enableCompatibilityWithJsonPayloadFormat').disable({emitEvent: false}); - transportPayloadTypeForm.get('useJsonPayloadFormatForDefaultDownlinkTopics').disable({emitEvent: false}); - } - } - private updateTransportPayloadBasedControls(type: TransportPayloadType, forceUpdated = false) { const transportPayloadTypeForm = this.mqttDeviceProfileTransportConfigurationFormGroup .get('transportPayloadTypeConfiguration') as FormGroup;