Add new mqtt option & update deps

This commit is contained in:
Sacha Weatherstone
2022-09-07 12:45:04 +09:30
parent 4e33ef6af3
commit 47b34a8f27
5 changed files with 273 additions and 253 deletions
@@ -100,6 +100,21 @@ export const MQTT = (): JSX.Element => {
)}
/>
</FormField>
<FormField
label="JSON Output Enabled"
description="Description"
disabled={!moduleEnabled}
isInvalid={!!errors.jsonEnabled?.message}
validationMessage={errors.jsonEnabled?.message}
>
<Controller
name="jsonEnabled"
control={control}
render={({ field: { value, ...field } }) => (
<Switch height={24} marginLeft="auto" checked={value} {...field} />
)}
/>
</FormField>
</Form>
);
};
@@ -42,7 +42,6 @@ export const Serial = ({ close }: CloseProps): JSX.Element => {
const connection = new ISerialConnection(id);
await connection.connect({
port,
baudRate: 115200,
});
device.addConnection(connection);
subscribeAll(device, connection);
+3
View File
@@ -17,4 +17,7 @@ export class MQTTValidation implements Protobuf.ModuleConfig_MQTTConfig {
@IsBoolean()
encryptionEnabled: boolean;
@IsBoolean()
jsonEnabled: boolean;
}