From 9122fc5144f83110a9434ca0505d62c6a70f68f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 22 Dec 2025 14:42:43 +0100 Subject: [PATCH 1/8] Amperfied: Update EV charger interface and add full charging current resolution --- amperfied/integrationpluginamperfied.cpp | 26 +++++++++++------------ amperfied/integrationpluginamperfied.json | 12 +++++++---- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/amperfied/integrationpluginamperfied.cpp b/amperfied/integrationpluginamperfied.cpp index 7d0ed19..3d0b23a 100644 --- a/amperfied/integrationpluginamperfied.cpp +++ b/amperfied/integrationpluginamperfied.cpp @@ -201,7 +201,7 @@ void IntegrationPluginAmperfied::executeAction(ThingActionInfo *info) if (info->action().actionTypeId() == energyControlPowerActionTypeId) { bool power = info->action().paramValue(energyControlPowerActionPowerParamTypeId).toBool(); - ModbusRtuReply *reply = connection->setChargingCurrent(power ? info->thing()->stateValue(energyControlMaxChargingCurrentStateTypeId).toUInt() * 10 : 0); + ModbusRtuReply *reply = connection->setChargingCurrent(power ? static_cast(qRound(info->thing()->stateValue(energyControlMaxChargingCurrentStateTypeId).toDouble() * 10)) : 0); connect(reply, &ModbusRtuReply::finished, info, [info, reply, power](){ if (reply->error() == ModbusRtuReply::NoError) { info->thing()->setStateValue(energyControlPowerStateTypeId, power); @@ -216,11 +216,11 @@ void IntegrationPluginAmperfied::executeAction(ThingActionInfo *info) if (info->action().actionTypeId() == energyControlMaxChargingCurrentActionTypeId) { bool power = info->thing()->stateValue(energyControlPowerStateTypeId).toBool(); - uint max = info->action().paramValue(energyControlMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt() * 10; - ModbusRtuReply *reply = connection->setChargingCurrent(power ? max : 0); - connect(reply, &ModbusRtuReply::finished, info, [info, reply, max](){ + double current = qRound(info->action().paramValue(energyControlMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble() * 10) / 10.0; + ModbusRtuReply *reply = connection->setChargingCurrent(power ? static_cast(qRound(current * 10)) : 0); + connect(reply, &ModbusRtuReply::finished, info, [info, reply, current](){ if (reply->error() == ModbusRtuReply::NoError) { - info->thing()->setStateValue(energyControlMaxChargingCurrentStateTypeId, max / 10); + info->thing()->setStateValue(energyControlMaxChargingCurrentStateTypeId, current); info->finish(Thing::ThingErrorNoError); } else { qCWarning(dcAmperfied()) << "Error setting power:" << reply->error() << reply->errorString(); @@ -241,8 +241,8 @@ void IntegrationPluginAmperfied::executeAction(ThingActionInfo *info) if (actionType.name() == "power") { bool power = info->action().paramValue(actionType.paramTypes().findByName("power").id()).toBool(); - uint max = info->thing()->stateValue("maxChargingCurrent").toUInt(); - QModbusReply *reply = connection->setChargingCurrent(power ? max * 10 : 0); + double current = info->thing()->stateValue("maxChargingCurrent").toDouble(); + QModbusReply *reply = connection->setChargingCurrent(power ? static_cast(qRound(current * 10)) : 0); connect(reply, &QModbusReply::finished, info, [info, reply, power](){ if (reply->error() == QModbusDevice::NoError) { info->thing()->setStateValue("power", power); @@ -254,11 +254,11 @@ void IntegrationPluginAmperfied::executeAction(ThingActionInfo *info) }); } else if (actionType.name() == "maxChargingCurrent") { bool power = info->thing()->stateValue("power").toBool(); - uint max = info->action().paramValue(actionType.paramTypes().findByName("maxChargingCurrent").id()).toUInt(); - QModbusReply *reply = connection->setChargingCurrent(power ? max * 10 : 0); - connect(reply, &QModbusReply::finished, info, [info, reply, max](){ + double current = info->action().paramValue(actionType.paramTypes().findByName("maxChargingCurrent").id()).toDouble(); + QModbusReply *reply = connection->setChargingCurrent(power ?static_cast(qRound(current * 10)): 0); + connect(reply, &QModbusReply::finished, info, [info, reply, current](){ if (reply->error() == QModbusDevice::NoError) { - info->thing()->setStateValue("maxChargingCurrent", max / 10); + info->thing()->setStateValue("maxChargingCurrent", current); info->finish(Thing::ThingErrorNoError); } else { qCWarning(dcAmperfied()) << "Error setting power:" << reply->error() << reply->errorString(); @@ -357,7 +357,7 @@ void IntegrationPluginAmperfied::setupRtuConnection(ThingSetupInfo *info) thing->setStateValue(energyControlPowerStateTypeId, false); } else { thing->setStateValue(energyControlPowerStateTypeId, true); - thing->setStateValue(energyControlMaxChargingCurrentStateTypeId, connection->chargingCurrent() / 10); + thing->setStateValue(energyControlMaxChargingCurrentStateTypeId, connection->chargingCurrent() / 10.0); } thing->setStateMinMaxValues(energyControlMaxChargingCurrentStateTypeId, connection->minChargingCurrent(), connection->maxChargingCurrent()); thing->setStateValue(energyControlCurrentPowerStateTypeId, connection->currentPower()); @@ -446,7 +446,7 @@ void IntegrationPluginAmperfied::setupTcpConnection(ThingSetupInfo *info) thing->setStateValue("power", false); } else { thing->setStateValue("power", true); - thing->setStateValue("maxChargingCurrent", connection->chargingCurrent() / 10); + thing->setStateValue("maxChargingCurrent", connection->chargingCurrent() / 10.0); } thing->setStateMinMaxValues("maxChargingCurrent", connection->minChargingCurrent(), connection->maxChargingCurrent()); thing->setStateValue("currentPower", connection->currentPower()); diff --git a/amperfied/integrationpluginamperfied.json b/amperfied/integrationpluginamperfied.json index b124444..e39d407 100644 --- a/amperfied/integrationpluginamperfied.json +++ b/amperfied/integrationpluginamperfied.json @@ -98,10 +98,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, @@ -212,10 +213,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, @@ -337,10 +339,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, @@ -462,10 +465,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, From c525b33d4466a15275745e3641cbb205f40cfdbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 22 Dec 2025 15:07:50 +0100 Subject: [PATCH 2/8] Mennekes: Update EV charger interface and add full charging current resolution --- mennekes/integrationpluginmennekes.cpp | 10 +++++----- mennekes/integrationpluginmennekes.json | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/mennekes/integrationpluginmennekes.cpp b/mennekes/integrationpluginmennekes.cpp index b854dd8..df1d530 100644 --- a/mennekes/integrationpluginmennekes.cpp +++ b/mennekes/integrationpluginmennekes.cpp @@ -320,8 +320,8 @@ void IntegrationPluginMennekes::executeAction(ThingActionInfo *info) if (info->action().actionTypeId() == amtronECUPowerActionTypeId) { bool power = info->action().paramValue(amtronECUPowerActionPowerParamTypeId).toBool(); - int maxChargingCurrent = info->thing()->stateValue(amtronECUMaxChargingCurrentStateTypeId).toUInt(); - int effectiveCurrent = power ? maxChargingCurrent : 0; + double maxChargingCurrent = info->thing()->stateValue(amtronECUMaxChargingCurrentStateTypeId).toDouble(); + int effectiveCurrent = power ? qRound(maxChargingCurrent) : 0; qCInfo(dcMennekes()) << "Executing power action:" << power << "max current:" << maxChargingCurrent << "-> effective current" << effectiveCurrent; QModbusReply *reply = amtronECUConnection->setHemsCurrentLimit(effectiveCurrent); if (!reply) { @@ -344,7 +344,7 @@ void IntegrationPluginMennekes::executeAction(ThingActionInfo *info) if (info->action().actionTypeId() == amtronECUMaxChargingCurrentActionTypeId) { bool power = info->thing()->stateValue(amtronECUPowerStateTypeId).toBool(); - int maxChargingCurrent = info->action().paramValue(amtronECUMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toInt(); + int maxChargingCurrent = qRound(info->action().paramValue(amtronECUMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble()); int effectiveCurrent = power ? maxChargingCurrent : 0; qCInfo(dcMennekes()) << "Executing max current action:" << maxChargingCurrent << "Power is" << power << "-> effective:" << effectiveCurrent; QModbusReply *reply = amtronECUConnection->setHemsCurrentLimit(effectiveCurrent); @@ -443,8 +443,8 @@ void IntegrationPluginMennekes::executeAction(ThingActionInfo *info) }); } if (info->action().actionTypeId() == amtronCompact20MaxChargingCurrentActionTypeId) { - int maxChargingCurrent = info->action().paramValue(amtronCompact20MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toInt(); - float value = maxChargingCurrent; + double maxChargingCurrent = info->action().paramValue(amtronCompact20MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble(); + float value = static_cast(maxChargingCurrent); // Note: in firmwares up to 1.0.2 there's an issue that it cannot be exactly 6A, must be 6.01 or so if (maxChargingCurrent == 6) { diff --git a/mennekes/integrationpluginmennekes.json b/mennekes/integrationpluginmennekes.json index bd3057f..2a644f6 100644 --- a/mennekes/integrationpluginmennekes.json +++ b/mennekes/integrationpluginmennekes.json @@ -107,10 +107,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 1.0, "defaultValue": 6, "writable": true }, @@ -244,10 +245,11 @@ "displayName": "Maximum charging current", "displayNameEvent": "Maximum charging current changed", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 1.0, "defaultValue": 6, "writable": true } @@ -360,10 +362,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 0.01, "defaultValue": 6, "writable": true }, From 4bcfe7c029712073ff9804915813bf6ae3cd9ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 22 Dec 2025 15:18:41 +0100 Subject: [PATCH 3/8] PCE: Update EV charger interface and add full charging current resolution --- pcelectric/integrationpluginpcelectric.cpp | 2 +- pcelectric/integrationpluginpcelectric.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pcelectric/integrationpluginpcelectric.cpp b/pcelectric/integrationpluginpcelectric.cpp index 630c35e..19a9f89 100644 --- a/pcelectric/integrationpluginpcelectric.cpp +++ b/pcelectric/integrationpluginpcelectric.cpp @@ -223,7 +223,7 @@ void IntegrationPluginPcElectric::executeAction(ThingActionInfo *info) } else if (info->action().actionTypeId() == ev11MaxChargingCurrentActionTypeId) { - uint desiredChargingCurrent = info->action().paramValue(ev11MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt(); + double desiredChargingCurrent = info->action().paramValue(ev11MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble(); qCDebug(dcPcElectric()) << "Set max charging current to" << desiredChargingCurrent << "A"; // Update buffer diff --git a/pcelectric/integrationpluginpcelectric.json b/pcelectric/integrationpluginpcelectric.json index 1003faf..97b477d 100644 --- a/pcelectric/integrationpluginpcelectric.json +++ b/pcelectric/integrationpluginpcelectric.json @@ -126,11 +126,12 @@ "displayName": "Maximum charging current", "displayNameEvent": "Maximum charging current changed", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "defaultValue": 6, "minValue": 6, "maxValue": 16, + "stepSize": 0.01, "writable": true }, { From 42f3e82c6635323552db8c76399966c772fd02eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 22 Dec 2025 15:24:50 +0100 Subject: [PATCH 4/8] PhoenixConnect: Update EV charger interface and add full charging current resolution --- .../integrationpluginphoenixconnect.cpp | 5 +++-- .../integrationpluginphoenixconnect.json | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/phoenixconnect/integrationpluginphoenixconnect.cpp b/phoenixconnect/integrationpluginphoenixconnect.cpp index 4879dee..0cc505f 100644 --- a/phoenixconnect/integrationpluginphoenixconnect.cpp +++ b/phoenixconnect/integrationpluginphoenixconnect.cpp @@ -186,7 +186,7 @@ void IntegrationPluginPhoenixConnect::setupThing(ThingSetupInfo *info) connect(connection, &PhoenixModbusTcpConnection::maximumChargingCurrentChanged, thing, [thing](quint16 maxChargingCurrent) { qCDebug(dcPhoenixConnect()) << "Max charging current changed" << maxChargingCurrent; - thing->setStateValue("maxChargingCurrent", 1.0 * maxChargingCurrent / 10); // 100mA -> 1A + thing->setStateValue("maxChargingCurrent", maxChargingCurrent / 10.0); // 100mA -> 1A }); connect(connection, &PhoenixModbusTcpConnection::activePowerChanged, thing, [thing](quint32 activePower) { @@ -262,7 +262,8 @@ void IntegrationPluginPhoenixConnect::executeAction(ThingActionInfo *info) }); } else if (actionType.name() == "maxChargingCurrent") { - uint16_t current = action.param(actionType.id()).value().toUInt(); + double current = qRound(action.param(actionType.id()).value().toDouble() * 10) / 10.0; + qCDebug(dcPhoenixConnect()) << "Charging power set to" << current; QModbusReply *reply = connection->setMaximumChargingCurrent(current * 10); connect(reply, &QModbusReply::finished, info, [info, thing, reply, current](){ diff --git a/phoenixconnect/integrationpluginphoenixconnect.json b/phoenixconnect/integrationpluginphoenixconnect.json index ad92279..ed6a3a1 100644 --- a/phoenixconnect/integrationpluginphoenixconnect.json +++ b/phoenixconnect/integrationpluginphoenixconnect.json @@ -104,10 +104,11 @@ "displayName": "Charging current", "displayNameEvent": "Charging current changed", "displayNameAction": "Set charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 16, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, @@ -217,10 +218,11 @@ "displayName": "Charging current", "displayNameEvent": "Charging current changed", "displayNameAction": "Set charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, @@ -366,10 +368,11 @@ "displayName": "Charging current", "displayNameEvent": "Charging current changed", "displayNameAction": "Set charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 16, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, @@ -479,10 +482,11 @@ "displayName": "Charging current", "displayNameEvent": "Charging current changed", "displayNameAction": "Set charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, @@ -628,10 +632,11 @@ "displayName": "Charging current", "displayNameEvent": "Charging current changed", "displayNameAction": "Set charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 16, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, @@ -731,10 +736,11 @@ "displayName": "Charging current", "displayNameEvent": "Charging current changed", "displayNameAction": "Set charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 0.1, "defaultValue": 6, "writable": true }, From 94a3c31a3a00c782ea417afeb179db83c65ffe77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 22 Dec 2025 15:37:15 +0100 Subject: [PATCH 5/8] Schrack: Update EV charger interface and add full charging current resolution --- schrack/integrationpluginschrack.cpp | 6 +++--- schrack/integrationpluginschrack.json | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/schrack/integrationpluginschrack.cpp b/schrack/integrationpluginschrack.cpp index 1b9a9cb..7874980 100644 --- a/schrack/integrationpluginschrack.cpp +++ b/schrack/integrationpluginschrack.cpp @@ -139,7 +139,7 @@ void IntegrationPluginSchrack::setupThing(ThingSetupInfo *info) qCDebug(dcSchrack()) << "Charge control enabled changed:" << charging; // If this register goes 0->1 it means charging has been started. This could be because of an RFID tag. // As we have may set charging current to 0 ourselves, we'll want to activate it again here - uint maxSetPoint = thing->stateValue(cionMaxChargingCurrentStateTypeId).toUInt(); + quint16 maxSetPoint = static_cast(qRound(thing->stateValue(cionMaxChargingCurrentStateTypeId).toDouble())); if (cionConnection->chargingCurrentSetpoint() != maxSetPoint) { cionConnection->setChargingCurrentSetpoint(maxSetPoint); } @@ -293,7 +293,7 @@ void IntegrationPluginSchrack::executeAction(ThingActionInfo *info) CionModbusRtuConnection *cionConnection = m_cionConnections.value(info->thing()); if (info->action().actionTypeId() == cionPowerActionTypeId) { bool enabled = info->action().paramValue(cionPowerActionPowerParamTypeId).toBool(); - int maxChargingCurrent = enabled ? info->thing()->stateValue(cionMaxChargingCurrentStateTypeId).toUInt() : 0; + int maxChargingCurrent = enabled ? static_cast(qRound(info->thing()->stateValue(cionMaxChargingCurrentStateTypeId).toDouble())) : 0; qCDebug(dcSchrack()) << "Setting charging enabled:" << (enabled ? 1 : 0) << "(charging current setpoint:" << maxChargingCurrent << ")"; // Note: If the wallbox has an RFID reader connected, writing register 100 (chargingEnabled) won't work as the RFID @@ -321,7 +321,7 @@ void IntegrationPluginSchrack::executeAction(ThingActionInfo *info) } else if (info->action().actionTypeId() == cionMaxChargingCurrentActionTypeId) { // If charging is set to enabled, we'll write the value to the wallbox - uint maxChargingCurrent = info->action().paramValue(cionMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt(); + quint16 maxChargingCurrent = static_cast(qRound(info->action().paramValue(cionMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble())); if (info->thing()->stateValue(cionPowerStateTypeId).toBool()) { qCDebug(dcSchrack) << "Charging is enabled. Applying max charging current setpoint of" << maxChargingCurrent << "to wallbox"; ModbusRtuReply *reply = cionConnection->setChargingCurrentSetpoint(maxChargingCurrent); diff --git a/schrack/integrationpluginschrack.json b/schrack/integrationpluginschrack.json index 62550d6..77c3fc4 100644 --- a/schrack/integrationpluginschrack.json +++ b/schrack/integrationpluginschrack.json @@ -68,11 +68,12 @@ "displayName": "Maximum charging current", "displayNameEvent": "Maximum charging current changed", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "defaultValue": 6, "minValue": 1, "maxValue": 32, + "stepSize": 1.0, "writable": true }, { From a7d900e516f2d6f1889019468adb5d89ce248caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 22 Dec 2025 15:40:56 +0100 Subject: [PATCH 6/8] Vestel: Update EV charger interface and add full charging current resolution --- vestel/integrationpluginvestel.cpp | 2 +- vestel/integrationpluginvestel.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vestel/integrationpluginvestel.cpp b/vestel/integrationpluginvestel.cpp index 6c62a82..052b17f 100644 --- a/vestel/integrationpluginvestel.cpp +++ b/vestel/integrationpluginvestel.cpp @@ -187,7 +187,7 @@ void IntegrationPluginVestel::executeAction(ThingActionInfo *info) // Note: only write the register if power is true, otherwise we would start charging. The state represents the desired current, // once the power is true, the current will be written to the corresponding current. - int maxChargingCurrent = info->action().paramValue(evc04MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toInt(); + quint16 maxChargingCurrent = static_cast(qRound(info->action().paramValue(evc04MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble())); if (info->thing()->stateValue(evc04PowerStateTypeId).toBool()) { qCDebug(dcVestel()) << "Write max charging current" << maxChargingCurrent; diff --git a/vestel/integrationpluginvestel.json b/vestel/integrationpluginvestel.json index 496f31c..2acb0b8 100644 --- a/vestel/integrationpluginvestel.json +++ b/vestel/integrationpluginvestel.json @@ -107,10 +107,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 1.0, "defaultValue": 6, "writable": true }, From 2aed3d0f613ee5fd501fb820cc16ab7ba916fe69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 22 Dec 2025 16:01:12 +0100 Subject: [PATCH 7/8] Webasto: Update EV charger interface and add full charging current resolution --- webasto/integrationpluginwebasto.cpp | 6 +++--- webasto/integrationpluginwebasto.json | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/webasto/integrationpluginwebasto.cpp b/webasto/integrationpluginwebasto.cpp index 33b8879..4c7d389 100644 --- a/webasto/integrationpluginwebasto.cpp +++ b/webasto/integrationpluginwebasto.cpp @@ -513,7 +513,7 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info) m_asyncActions.insert(requestId, info); } } else if (action.actionTypeId() == webastoLiveMaxChargingCurrentActionTypeId) { - int ampere = action.paramValue(webastoLiveMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt(); + quint16 ampere = static_cast(qRound(action.paramValue(webastoLiveMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble())); thing->setStateValue(webastoLiveMaxChargingCurrentStateTypeId, ampere); QUuid requestId = connection->setChargeCurrent(ampere); if (requestId.isNull()) { @@ -571,7 +571,7 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info) executeWebastoNextPowerAction(info, power); } } else if (action.actionTypeId() == webastoNextMaxChargingCurrentActionTypeId) { - quint16 chargingCurrent = action.paramValue(webastoNextMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt(); + quint16 chargingCurrent = static_cast(qRound(action.paramValue(webastoNextMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble())); qCDebug(dcWebasto()) << "Set max charging current of" << thing << "to" << chargingCurrent << "ampere"; QModbusReply *reply = connection->setChargeCurrent(chargingCurrent); connect(reply, &QModbusReply::finished, reply, &QModbusReply::deleteLater); @@ -620,7 +620,7 @@ void IntegrationPluginWebasto::executeAction(ThingActionInfo *info) }); } if (info->action().actionTypeId() == webastoUniteMaxChargingCurrentActionTypeId) { - int maxChargingCurrent = info->action().paramValue(webastoUniteMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toInt(); + quint16 maxChargingCurrent = static_cast(qRound(info->action().paramValue(webastoUniteMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble())); QModbusReply *reply = evc04Connection->setChargingCurrent(maxChargingCurrent); connect(reply, &QModbusReply::finished, info, [info, reply, maxChargingCurrent](){ if (reply->error() == QModbusDevice::NoError) { diff --git a/webasto/integrationpluginwebasto.json b/webasto/integrationpluginwebasto.json index 571f4b5..15cab92 100644 --- a/webasto/integrationpluginwebasto.json +++ b/webasto/integrationpluginwebasto.json @@ -96,10 +96,11 @@ "name": "maxChargingCurrent", "displayName": "Charging current", "displayNameAction": "Set charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 80, + "stepSize": 1.0, "defaultValue": 6, "writable": true }, @@ -297,10 +298,11 @@ "name": "maxChargingCurrent", "displayName": "Charging current", "displayNameAction": "Set charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 1.0, "defaultValue": 6, "writable": true }, @@ -569,10 +571,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 32, + "stepSize": 1.0, "defaultValue": 6, "writable": true }, From 81454f8b6dfbbc2f94c3b00a15953ee09985c3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 22 Dec 2025 16:14:41 +0100 Subject: [PATCH 8/8] Inro: Update EV charger interface and add full charging current resolution --- inro/integrationplugininro.cpp | 2 +- inro/integrationplugininro.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inro/integrationplugininro.cpp b/inro/integrationplugininro.cpp index 69ebd71..a043338 100644 --- a/inro/integrationplugininro.cpp +++ b/inro/integrationplugininro.cpp @@ -217,7 +217,7 @@ void IntegrationPluginInro::executeAction(ThingActionInfo *info) } if (info->action().actionTypeId() == pantaboxMaxChargingCurrentActionTypeId) { - quint16 chargingCurrent = info->action().paramValue(pantaboxMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toUInt(); + quint16 chargingCurrent = static_cast(qRound(info->action().paramValue(pantaboxMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble())); qCDebug(dcInro()) << "PANTABOX: Set max charging current" << chargingCurrent << "A"; QModbusReply *reply = connection->setMaxChargingCurrent(chargingCurrent); diff --git a/inro/integrationplugininro.json b/inro/integrationplugininro.json index 0176106..b131b0d 100644 --- a/inro/integrationplugininro.json +++ b/inro/integrationplugininro.json @@ -108,10 +108,11 @@ "name": "maxChargingCurrent", "displayName": "Maximum charging current", "displayNameAction": "Set maximum charging current", - "type": "uint", + "type": "double", "unit": "Ampere", "minValue": 6, "maxValue": 16, + "stepSize": 1.0, "defaultValue": 6, "writable": true },