Merge PR #12: Wallbe: Updated extendevcharger interface
commit
68c32ab26e
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue