From 133f0c7e4df082487673ffb9a7f9b69a2ebc2f08 Mon Sep 17 00:00:00 2001 From: Boernsman Date: Mon, 25 Jan 2021 10:58:34 +0100 Subject: [PATCH 1/2] updated wallbe extendevinterface --- wallbe/integrationpluginwallbe.cpp | 8 ++++---- wallbe/integrationpluginwallbe.json | 11 ++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/wallbe/integrationpluginwallbe.cpp b/wallbe/integrationpluginwallbe.cpp index 68a8158..27bb10b 100644 --- a/wallbe/integrationpluginwallbe.cpp +++ b/wallbe/integrationpluginwallbe.cpp @@ -144,12 +144,12 @@ void IntegrationPluginWallbe::executeAction(ThingActionInfo *info) m_asyncActions.insert(requestId, info); connect(info, &ThingActionInfo::aborted, this, [this, requestId] {m_asyncActions.remove(requestId);}); - } else if(action.actionTypeId() == wallbeEcoChargeCurrentActionTypeId){ + } else if(action.actionTypeId() == wallbeEcoMaxChargingCurrentActionTypeId){ - uint16_t current = action.param(wallbeEcoChargeCurrentEventChargeCurrentParamTypeId).value().toUInt(); + uint16_t current = action.param(wallbeEcoMaxChargingCurrentEventMaxChargingCurrentParamTypeId).value().toUInt(); qCDebug(dcWallbe) << "Charging power set to" << current; QUuid requestId = modbusTcpMaster->writeCoil(0xff, WallbeRegisterAddress::ChargingCurrent, current); - thing->setStateValue(wallbeEcoChargeCurrentStateTypeId, current); + thing->setStateValue(wallbeEcoMaxChargingCurrentStateTypeId, current); m_asyncActions.insert(requestId, info); connect(info, &ThingActionInfo::aborted, this, [this, requestId] {m_asyncActions.remove(requestId);}); @@ -241,7 +241,7 @@ void IntegrationPluginWallbe::onReceivedHoldingRegister(int slaveAddress, int mo } break; case WallbeRegisterAddress::ChargingCurrent: - thing->setStateValue(wallbeEcoChargeCurrentStateTypeId, value[0]); + thing->setStateValue(wallbeEcoMaxChargingCurrentStateTypeId, value[0]); break; case WallbeRegisterAddress::ErrorCode: qCDebug(dcWallbe()) << "Received Error Code modbus register" << value[0]; diff --git a/wallbe/integrationpluginwallbe.json b/wallbe/integrationpluginwallbe.json index 52a2dee..fb0b171 100644 --- a/wallbe/integrationpluginwallbe.json +++ b/wallbe/integrationpluginwallbe.json @@ -13,7 +13,7 @@ "displayName": "Wallbe eco 2.0", "name": "wallbeEco", "createMethods": ["discovery"], - "interfaces": ["evcharger", "connectable"], + "interfaces": ["extendedevcharger", "connectable"], "paramTypes": [ { "id": "95f297a7-56a5-4789-9b14-6735717344b5", @@ -77,14 +77,11 @@ }, { "id": "60b5b6b8-bcd3-4c3f-8501-f15af94bc8c1", - "name": "chargeCurrent", + "name": "maxChargingCurrent", "displayName": "Charging current", - "displayNameAction": "Set charging current", "displayNameEvent": "Charging current changed", - "unit": "Ampere", - "type": "int", - "defaultValue": 0, - "type": "int", + "displayNameAction": "Set charging current", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 80, From 3f285f5b9524d330b8d5e4093293f4fbde417b0d Mon Sep 17 00:00:00 2001 From: Boernsman Date: Mon, 15 Feb 2021 16:46:20 +0100 Subject: [PATCH 2/2] changed extendedevcharger to evcharger interface --- wallbe/integrationpluginwallbe.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallbe/integrationpluginwallbe.json b/wallbe/integrationpluginwallbe.json index fb0b171..e7c5bd0 100644 --- a/wallbe/integrationpluginwallbe.json +++ b/wallbe/integrationpluginwallbe.json @@ -13,7 +13,7 @@ "displayName": "Wallbe eco 2.0", "name": "wallbeEco", "createMethods": ["discovery"], - "interfaces": ["extendedevcharger", "connectable"], + "interfaces": ["evcharger", "connectable"], "paramTypes": [ { "id": "95f297a7-56a5-4789-9b14-6735717344b5",