updated wallbe extendevinterface

master
Boernsman 2021-01-25 10:58:34 +01:00
parent a6d41012e4
commit 133f0c7e4d
2 changed files with 8 additions and 11 deletions

View File

@ -144,12 +144,12 @@ void IntegrationPluginWallbe::executeAction(ThingActionInfo *info)
m_asyncActions.insert(requestId, info); m_asyncActions.insert(requestId, info);
connect(info, &ThingActionInfo::aborted, this, [this, requestId] {m_asyncActions.remove(requestId);}); 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; qCDebug(dcWallbe) << "Charging power set to" << current;
QUuid requestId = modbusTcpMaster->writeCoil(0xff, WallbeRegisterAddress::ChargingCurrent, current); QUuid requestId = modbusTcpMaster->writeCoil(0xff, WallbeRegisterAddress::ChargingCurrent, current);
thing->setStateValue(wallbeEcoChargeCurrentStateTypeId, current); thing->setStateValue(wallbeEcoMaxChargingCurrentStateTypeId, current);
m_asyncActions.insert(requestId, info); m_asyncActions.insert(requestId, info);
connect(info, &ThingActionInfo::aborted, this, [this, requestId] {m_asyncActions.remove(requestId);}); connect(info, &ThingActionInfo::aborted, this, [this, requestId] {m_asyncActions.remove(requestId);});
@ -241,7 +241,7 @@ void IntegrationPluginWallbe::onReceivedHoldingRegister(int slaveAddress, int mo
} }
break; break;
case WallbeRegisterAddress::ChargingCurrent: case WallbeRegisterAddress::ChargingCurrent:
thing->setStateValue(wallbeEcoChargeCurrentStateTypeId, value[0]); thing->setStateValue(wallbeEcoMaxChargingCurrentStateTypeId, value[0]);
break; break;
case WallbeRegisterAddress::ErrorCode: case WallbeRegisterAddress::ErrorCode:
qCDebug(dcWallbe()) << "Received Error Code modbus register" << value[0]; qCDebug(dcWallbe()) << "Received Error Code modbus register" << value[0];

View File

@ -13,7 +13,7 @@
"displayName": "Wallbe eco 2.0", "displayName": "Wallbe eco 2.0",
"name": "wallbeEco", "name": "wallbeEco",
"createMethods": ["discovery"], "createMethods": ["discovery"],
"interfaces": ["evcharger", "connectable"], "interfaces": ["extendedevcharger", "connectable"],
"paramTypes": [ "paramTypes": [
{ {
"id": "95f297a7-56a5-4789-9b14-6735717344b5", "id": "95f297a7-56a5-4789-9b14-6735717344b5",
@ -77,14 +77,11 @@
}, },
{ {
"id": "60b5b6b8-bcd3-4c3f-8501-f15af94bc8c1", "id": "60b5b6b8-bcd3-4c3f-8501-f15af94bc8c1",
"name": "chargeCurrent", "name": "maxChargingCurrent",
"displayName": "Charging current", "displayName": "Charging current",
"displayNameAction": "Set charging current",
"displayNameEvent": "Charging current changed", "displayNameEvent": "Charging current changed",
"unit": "Ampere", "displayNameAction": "Set charging current",
"type": "int", "type": "double",
"defaultValue": 0,
"type": "int",
"unit": "Ampere", "unit": "Ampere",
"minValue": 6, "minValue": 6,
"maxValue": 80, "maxValue": 80,