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 * P30
* c-series * c-series
* x-series * x-series
* PV Edition
* BMW (certain models) * BMW (certain models)
* [Keba Deutschland Edition](https://a.storyblok.com/f/40131/x/fc59dc7bf7/datenblatt_deutschland_edition.pdf) (DE440) * [Keba Deutschland Edition](https://a.storyblok.com/f/40131/x/fc59dc7bf7/datenblatt_deutschland_edition.pdf) (DE440)
(by March 2022) (by March 2022)

View File

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright 2013 - 2022, nymea GmbH * Copyright 2013 - 2024, nymea GmbH
* Contact: contact@nymea.io * Contact: contact@nymea.io
* *
* This file is part of nymea. * This file is part of nymea.
@ -42,6 +42,7 @@ IntegrationPluginKeba::IntegrationPluginKeba()
// KebaProductInfo ke("KC-P30-EC240122-E0R"); // KebaProductInfo ke("KC-P30-EC240122-E0R");
// KebaProductInfo ge("KC-P30-EC220112-000-DE"); // KebaProductInfo ge("KC-P30-EC220112-000-DE");
// KebaProductInfo n("KC-P30-EC2404B2-M0A-GE"); // KebaProductInfo n("KC-P30-EC2404B2-M0A-GE");
// KebaProductInfo pv("KC-P30-EC2204U2-E00-PV");
} }
void IntegrationPluginKeba::init() void IntegrationPluginKeba::init()
@ -421,6 +422,7 @@ void IntegrationPluginKeba::setupKeba(ThingSetupInfo *info, const QHostAddress &
case KebaProductInfo::SeriesXWlan4G: case KebaProductInfo::SeriesXWlan4G:
case KebaProductInfo::SeriesX3G: case KebaProductInfo::SeriesX3G:
case KebaProductInfo::SeriesX4G: case KebaProductInfo::SeriesX4G:
case KebaProductInfo::SeriesSpecial:
qCDebug(dcKeba()) << "The keba" << productInformation.series() << "is capable of communicating using UDP"; qCDebug(dcKeba()) << "The keba" << productInformation.series() << "is capable of communicating using UDP";
supported = true; supported = true;
break; break;

View File

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

View File

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