Keba: Add support for P30 PV Edition

This commit is contained in:
Simon Stürz 2024-07-26 11:35:37 +02:00
parent 7bc0f4c314
commit 053d5410e7
4 changed files with 20 additions and 14 deletions

View File

@ -9,6 +9,7 @@ This plugin allows to control Keba KeContact EV-Charging stations.
* P30
* c-series
* x-series
* PV Edition
* BMW (certain models)
* [Keba Deutschland Edition](https://a.storyblok.com/f/40131/x/fc59dc7bf7/datenblatt_deutschland_edition.pdf) (DE440)
(by March 2022)

View File

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Copyright 2013 - 2022, nymea GmbH
* Copyright 2013 - 2024, nymea GmbH
* Contact: contact@nymea.io
*
* This file is part of nymea.
@ -38,10 +38,11 @@
IntegrationPluginKeba::IntegrationPluginKeba()
{
// KebaProductInfo bmw("BMW-10-EC240522-E1R");
// KebaProductInfo ke("KC-P30-EC240122-E0R");
// KebaProductInfo ge("KC-P30-EC220112-000-DE");
// KebaProductInfo n("KC-P30-EC2404B2-M0A-GE");
// KebaProductInfo bmw("BMW-10-EC240522-E1R");
// KebaProductInfo ke("KC-P30-EC240122-E0R");
// KebaProductInfo ge("KC-P30-EC220112-000-DE");
// KebaProductInfo n("KC-P30-EC2404B2-M0A-GE");
// KebaProductInfo pv("KC-P30-EC2204U2-E00-PV");
}
void IntegrationPluginKeba::init()
@ -146,7 +147,7 @@ void IntegrationPluginKeba::setupThing(ThingSetupInfo *info)
qCDebug(dcKeba()) << "Setting up" << thing->name() << thing->params();
if (!m_kebaDataLayer){
qCDebug(dcKeba()) << "Creating new Keba data layer...";
m_kebaDataLayer= new KeContactDataLayer(this);
m_kebaDataLayer = new KeContactDataLayer(this);
if (!m_kebaDataLayer->init()) {
m_kebaDataLayer->deleteLater();
m_kebaDataLayer = nullptr;
@ -421,6 +422,7 @@ void IntegrationPluginKeba::setupKeba(ThingSetupInfo *info, const QHostAddress &
case KebaProductInfo::SeriesXWlan4G:
case KebaProductInfo::SeriesX3G:
case KebaProductInfo::SeriesX4G:
case KebaProductInfo::SeriesSpecial:
qCDebug(dcKeba()) << "The keba" << productInformation.series() << "is capable of communicating using UDP";
supported = true;
break;

View File

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Copyright 2013 - 2022, nymea GmbH
* Copyright 2013 - 2024, nymea GmbH
* Contact: contact@nymea.io
*
* This file is part of nymea.
@ -40,6 +40,7 @@ KebaProductInfo::KebaProductInfo(const QString &productString) :
// KC-P30-EC240122-E0R
// KC-P30-EC220112-000-DE
// KC-P30-EC2404B2-M0A-GE
// KC-P30-EC2204U2-E00-PV
qCDebug(dcKeba()) << "Parsing product information from" << productString.count() << productString;
if (m_productString.count() < 19) {
@ -69,7 +70,6 @@ KebaProductInfo::KebaProductInfo(const QString &productString) :
m_model = subStrings.at(1);
qCDebug(dcKeba()) << "Model:" << m_model;
QString descriptor = subStrings.at(2); // EC240522
m_countryCode = descriptor.at(0); // E
qCDebug(dcKeba()) << "Country:" << m_countryCode;
@ -117,8 +117,7 @@ KebaProductInfo::KebaProductInfo(const QString &productString) :
qCDebug(dcKeba()) << "Current:" << m_current;
// KC-P30-EC24 01 22-E0R
QString cableValue = descriptor.mid(4, 2)/*m_productString.mid(11, 2)*/;
QString cableValue = descriptor.mid(4, 2);
if (cableValue == "00") {
m_cable = NoCable;
qCDebug(dcKeba()) << "Cable: No cable";
@ -168,12 +167,16 @@ KebaProductInfo::KebaProductInfo(const QString &productString) :
} else if (seriesValue.toLower() == QChar('h')) {
m_series = SeriesX4G;
qCDebug(dcKeba()) << "Series: X (4G)";
} else if (seriesValue.toLower() == QChar('u')) {
m_series = SeriesSpecial;
qCDebug(dcKeba()) << "Series: Special" + m_productString.right(2);
} else {
qCWarning(dcKeba()) << "Series: Unknown" << productString << "value:" << seriesValue;
m_isValid = false;
return;
}
// KC-P30-EC24012 2 -E0R
QChar phaseCountValue = descriptor.at(7);
if (phaseCountValue == QChar('1')) {
m_phaseCount = 1;
@ -207,7 +210,6 @@ KebaProductInfo::KebaProductInfo(const QString &productString) :
return;
}
QChar authValue = meterInfos.at(2);
if (authValue == QChar('0')) {
m_authorization = NoAuthorization;

View File

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Copyright 2013 - 2022, nymea GmbH
* Copyright 2013 - 2024, nymea GmbH
* Contact: contact@nymea.io
*
* This file is part of nymea.
@ -77,7 +77,8 @@ public:
SeriesXWlan3G,
SeriesXWlan4G,
SeriesX3G,
SeriesX4G
SeriesX4G,
SeriesSpecial
};
Q_ENUM(Series)