From 58fa2ca870edc11eb0c987c022869ca890681002 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Tue, 14 Mar 2023 12:25:09 +0100 Subject: [PATCH] Amperfied/Heidelberg: Smaller fixes in README and max current setting --- amperfied/README.md | 11 ++++++----- amperfied/amperfied-registers.json | 2 +- amperfied/integrationpluginamperfied.cpp | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/amperfied/README.md b/amperfied/README.md index 0dea547..dd11073 100644 --- a/amperfied/README.md +++ b/amperfied/README.md @@ -2,18 +2,19 @@ Connects nymea to a Amperfied/Heidelberg wallboxes. Currently supported models are: -* Amperfeid Energy Control -* Amperfeid connect.home +* Amperfied Energy Control +* Amperfied connect.home # Requirements nymea requires the use of a firmware greator or equal version 1.0.7 on the wallbox. -## Amperfeid Energy Control -The Amperfeid Energy Control is a Modbus RTU device. This means it must be connected to the nymea system using an RS485 port. +## Amperfied Energy Control +The Amperfied Energy Control is a Modbus RTU device. This means it must be connected to the nymea system using an RS485 port. +The Modbus RTU must be configured with a baud rate of 19200, even parity, 8 data bits and 1 stop bit. In order to allow nymea to automatically discover the wallbox on the bus, the Modbus slave ID must be in the range of 1 - 20. If a higher slave ID number is required, the manual setup is to be used. ## Amperfied connect.home -The Amperfeid connect.home is a Modbus TCP device. This means it must be connected to the same network the nymea system is in. +The Amperfied connect.home is a Modbus TCP device. This means it must be connected to the same network the nymea system is in. diff --git a/amperfied/amperfied-registers.json b/amperfied/amperfied-registers.json index f93a92f..daa8092 100644 --- a/amperfied/amperfied-registers.json +++ b/amperfied/amperfied-registers.json @@ -242,7 +242,7 @@ "readSchedule": "update", "registerType": "holdingRegister", "description": "Charging current", - "unit": "A", + "unit": "1/10 A", "defaultValue": "0", "access": "RW" } diff --git a/amperfied/integrationpluginamperfied.cpp b/amperfied/integrationpluginamperfied.cpp index da6fe21..2af8cba 100644 --- a/amperfied/integrationpluginamperfied.cpp +++ b/amperfied/integrationpluginamperfied.cpp @@ -203,7 +203,7 @@ void IntegrationPluginAmperfied::executeAction(ThingActionInfo *info) ModbusRtuReply *reply = connection->setChargingCurrent(power ? max : 0); connect(reply, &ModbusRtuReply::finished, info, [info, reply, max](){ if (reply->error() == ModbusRtuReply::NoError) { - info->thing()->setStateValue(energyControlMaxChargingCurrentStateTypeId, max); + info->thing()->setStateValue(energyControlMaxChargingCurrentStateTypeId, max / 10); info->finish(Thing::ThingErrorNoError); } else { qCWarning(dcAmperfied()) << "Error setting power:" << reply->error() << reply->errorString(); @@ -237,7 +237,7 @@ void IntegrationPluginAmperfied::executeAction(ThingActionInfo *info) QModbusReply *reply = connection->setChargingCurrent(power ? max : 0); connect(reply, &QModbusReply::finished, info, [info, reply, max](){ if (reply->error() == QModbusDevice::NoError) { - info->thing()->setStateValue(connectHomeMaxChargingCurrentStateTypeId, max); + info->thing()->setStateValue(connectHomeMaxChargingCurrentStateTypeId, max / 10); info->finish(Thing::ThingErrorNoError); } else { qCWarning(dcAmperfied()) << "Error setting power:" << reply->error() << reply->errorString();