From 276532a68910944fb1ef63dcf149c0f0b4f2af9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Tue, 13 Aug 2024 15:52:00 +0200 Subject: [PATCH] PCE: Add serial number as paramter --- pcelectric/integrationpluginpcelectric.cpp | 1 + pcelectric/integrationpluginpcelectric.json | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/pcelectric/integrationpluginpcelectric.cpp b/pcelectric/integrationpluginpcelectric.cpp index 421379f..b20d634 100644 --- a/pcelectric/integrationpluginpcelectric.cpp +++ b/pcelectric/integrationpluginpcelectric.cpp @@ -70,6 +70,7 @@ void IntegrationPluginPcElectric::discoverThings(ThingDiscoveryInfo *info) ParamList params; params << Param(ev11ThingMacAddressParamTypeId, result.networkDeviceInfo.macAddress()); + params << Param(ev11ThingSerialNumberParamTypeId, result.serialNumber); // Note: if we discover also the port and modbusaddress, we must fill them in from the discovery here, for now everywhere the defaults... descriptor.setParams(params); info->addThingDescriptor(descriptor); diff --git a/pcelectric/integrationpluginpcelectric.json b/pcelectric/integrationpluginpcelectric.json index eed7855..678a2dc 100644 --- a/pcelectric/integrationpluginpcelectric.json +++ b/pcelectric/integrationpluginpcelectric.json @@ -23,6 +23,13 @@ "type": "QString", "inputType": "MacAddress", "defaultValue": "" + }, + { + "id": "db834ca7-934a-473b-8bd8-c641ff0ea879", + "name":"serialNumber", + "displayName": "Serial number", + "type": "QString", + "defaultValue": "" } ], "settingsTypes": [