devices to things

This commit is contained in:
bernhard.trinnes 2020-03-24 13:28:04 +01:00
parent aa77de0115
commit 75274ef327
4 changed files with 279 additions and 264 deletions

View File

@ -28,7 +28,7 @@
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "devicepluginkeba.h" #include "integrationpluginkeba.h"
#include "plugininfo.h" #include "plugininfo.h"
#include <QUrl> #include <QUrl>
@ -42,9 +42,9 @@ IntegrationPluginKeba::IntegrationPluginKeba()
} }
void DevicePluginKeba::discoverDevices(DeviceDiscoveryInfo *info) void IntegrationPluginKeba::discoverThings(ThingDiscoveryInfo *info)
{ {
if (info->deviceClassId() == wallboxDeviceClassId) { if (info->thingClassId() == wallboxThingClassId) {
Discovery *discovery = new Discovery(info); Discovery *discovery = new Discovery(info);
discovery->discoverHosts(25); discovery->discoverHosts(25);
@ -54,25 +54,25 @@ void DevicePluginKeba::discoverDevices(DeviceDiscoveryInfo *info)
if (!host.hostName().contains("keba", Qt::CaseSensitivity::CaseInsensitive)) if (!host.hostName().contains("keba", Qt::CaseSensitivity::CaseInsensitive))
continue; continue;
DeviceDescriptor descriptor(wallboxDeviceClassId, "Wallbox", host.address() + " (" + host.macAddress() + ")"); ThingDescriptor descriptor(wallboxThingClassId, "Wallbox", host.address() + " (" + host.macAddress() + ")");
foreach (Device *existingDevice, myDevices()) { foreach (Thing *existingThing, myThings()) {
if (existingDevice->paramValue(wallboxDeviceMacAddressParamTypeId).toString() == host.macAddress()) { if (existingThing->paramValue(wallboxThingMacAddressParamTypeId).toString() == host.macAddress()) {
descriptor.setDeviceId(existingDevice->id()); descriptor.setThingId(existingThing->id());
break; break;
} }
} }
ParamList params; ParamList params;
params << Param(wallboxDeviceMacAddressParamTypeId, host.macAddress()); params << Param(wallboxThingMacAddressParamTypeId, host.macAddress());
params << Param(wallboxDeviceIpAddressParamTypeId, host.address()); params << Param(wallboxThingIpAddressParamTypeId, host.address());
descriptor.setParams(params); descriptor.setParams(params);
info->addDeviceDescriptor(descriptor); info->addThingDescriptor(descriptor);
} }
info->finish(Device::DeviceErrorNoError); info->finish(Thing::ThingErrorNoError);
}); });
} else { } else {
qCWarning(dcKebaKeContact()) << "Discover device, unhandled device class" << info->deviceClassId(); qCWarning(dcKebaKeContact()) << "Discover device, unhandled device class" << info->thingClassId();
info->finish(Device::DeviceErrorDeviceClassNotFound); info->finish(Thing::ThingErrorThingClassNotFound);
} }
} }
@ -82,41 +82,41 @@ void IntegrationPluginKeba::setupThing(ThingSetupInfo *info)
qCDebug(dcKebaKeContact()) << "Setting up a new thing:" << thing->name() << thing->params(); qCDebug(dcKebaKeContact()) << "Setting up a new thing:" << thing->name() << thing->params();
if (device->deviceClassId() == wallboxDeviceClassId) { if (thing->thingClassId() == wallboxThingClassId) {
QHostAddress address = QHostAddress(device->paramValue(wallboxDeviceIpAddressParamTypeId).toString()); QHostAddress address = QHostAddress(thing->paramValue(wallboxThingIpAddressParamTypeId).toString());
KeContact *keba = new KeContact(address, this); KeContact *keba = new KeContact(address, this);
connect(keba, &KeContact::connectionChanged, this, &DevicePluginKeba::onConnectionChanged); connect(keba, &KeContact::connectionChanged, this, &IntegrationPluginKeba::onConnectionChanged);
connect(keba, &KeContact::commandExecuted, this, &DevicePluginKeba::onCommandExecuted); connect(keba, &KeContact::commandExecuted, this, &IntegrationPluginKeba::onCommandExecuted);
connect(keba, &KeContact::reportOneReceived, this, &DevicePluginKeba::onReportOneReceived); connect(keba, &KeContact::reportOneReceived, this, &IntegrationPluginKeba::onReportOneReceived);
connect(keba, &KeContact::reportTwoReceived, this, &DevicePluginKeba::onReportTwoReceived); connect(keba, &KeContact::reportTwoReceived, this, &IntegrationPluginKeba::onReportTwoReceived);
connect(keba, &KeContact::reportThreeReceived, this, &DevicePluginKeba::onReportThreeReceived); connect(keba, &KeContact::reportThreeReceived, this, &IntegrationPluginKeba::onReportThreeReceived);
connect(keba, &KeContact::broadcastReceived, this, &DevicePluginKeba::onBroadcastReceived); connect(keba, &KeContact::broadcastReceived, this, &IntegrationPluginKeba::onBroadcastReceived);
if (!keba->init()){ if (!keba->init()){
qCWarning(dcKebaKeContact()) << "Cannot bind to port" << 7090; qCWarning(dcKebaKeContact()) << "Cannot bind to port" << 7090;
keba->deleteLater(); keba->deleteLater();
return info->finish(Device::DeviceErrorHardwareNotAvailable, QT_TR_NOOP("Error opening network port.")); return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("Error opening network port."));
} }
DeviceId id = device->id(); ThingId id = thing->id();
m_kebaDevices.insert(id, keba); m_kebaDevices.insert(id, keba);
m_asyncSetup.insert(keba, info); m_asyncSetup.insert(keba, info);
keba->getReport1(); keba->getReport1();
connect(info, &DeviceSetupInfo::aborted, this, [id, keba, this]{ connect(info, &ThingSetupInfo::aborted, this, [id, keba, this]{
m_asyncSetup.remove(keba); m_asyncSetup.remove(keba);
m_kebaDevices.remove(id); m_kebaDevices.remove(id);
keba->deleteLater(); keba->deleteLater();
}); });
} else { } else {
qCWarning(dcKebaKeContact()) << "setupDevice, unhandled device class" << device->deviceClass(); qCWarning(dcKebaKeContact()) << "setupDevice, unhandled device class" << thing->thingClass();
info->finish(Device::DeviceErrorDeviceClassNotFound); info->finish(Thing::ThingErrorThingClassNotFound);
} }
} }
void IntegrationPluginKeba::postSetupThing(Thing *thing) void IntegrationPluginKeba::postSetupThing(Thing *thing)
{ {
qCDebug(dcKebaKeContact()) << "Post setup" << device->name(); qCDebug(dcKebaKeContact()) << "Post setup" << thing->name();
KeContact *keba = m_kebaDevices.value(device->id()); KeContact *keba = m_kebaDevices.value(thing->id());
if (!keba) { if (!keba) {
return; return;
} }
@ -125,18 +125,18 @@ void IntegrationPluginKeba::postSetupThing(Thing *thing)
if (!m_pluginTimer) { if (!m_pluginTimer) {
m_pluginTimer = hardwareManager()->pluginTimerManager()->registerTimer(60); m_pluginTimer = hardwareManager()->pluginTimerManager()->registerTimer(60);
connect(m_pluginTimer, &PluginTimer::timeout, this, &DevicePluginKeba::updateData); connect(m_pluginTimer, &PluginTimer::timeout, this, &IntegrationPluginKeba::updateData);
} }
} }
void DevicePluginKeba::deviceRemoved(Device *device) void IntegrationPluginKeba::thingRemoved(Thing *thing)
{ {
if (device->deviceClassId() == wallboxDeviceClassId) { if (thing->thingClassId() == wallboxThingClassId) {
KeContact *keba = m_kebaDevices.take(device->id()); KeContact *keba = m_kebaDevices.take(thing->id());
keba->deleteLater(); keba->deleteLater();
} }
if (myDevices().empty()) { if (myThings().empty()) {
// last device has been removed the plug in timer can be stopped again // last device has been removed the plug in timer can be stopped again
hardwareManager()->pluginTimerManager()->unregisterTimer(m_pluginTimer); hardwareManager()->pluginTimerManager()->unregisterTimer(m_pluginTimer);
m_pluginTimer = nullptr; m_pluginTimer = nullptr;
@ -150,41 +150,41 @@ void IntegrationPluginKeba::updateData()
keba->getReport3(); keba->getReport3();
} }
foreach (Device *device, myDevices().filterByDeviceClassId(wallboxDeviceClassId)) { foreach (Thing *thing, myThings().filterByThingClassId(wallboxThingClassId)) {
if (m_chargingSessionStartTime.contains(device->id())) { if (m_chargingSessionStartTime.contains(thing->id())) {
QDateTime startTime = m_chargingSessionStartTime.value(device->id()); QDateTime startTime = m_chargingSessionStartTime.value(thing->id());
QTimeZone tz = QTimeZone(QTimeZone::systemTimeZoneId()); QTimeZone tz = QTimeZone(QTimeZone::systemTimeZoneId());
QDateTime currentTime = QDateTime::currentDateTime().toTimeZone(tz); QDateTime currentTime = QDateTime::currentDateTime().toTimeZone(tz);
int minutes = (currentTime.toMSecsSinceEpoch()) - startTime.toMSecsSinceEpoch())/60000; int minutes = (currentTime.toMSecsSinceEpoch() - startTime.toMSecsSinceEpoch())/60000;
device->setStateValue(wallboxSessionTimeStateTypeId, minutes); thing->setStateValue(wallboxSessionTimeStateTypeId, minutes);
} else { } else {
device->setStateValue(wallboxSessionTimeStateTypeId, 0); thing->setStateValue(wallboxSessionTimeStateTypeId, 0);
} }
} }
} }
void DevicePluginKeba::setDeviceState(Device *device, KeContact::State state) void IntegrationPluginKeba::setDeviceState(Thing *thing, KeContact::State state)
{ {
switch (state) { switch (state) {
case KeContact::StateStarting: case KeContact::StateStarting:
device->setStateValue(wallboxActivityStateTypeId, "Starting"); thing->setStateValue(wallboxActivityStateTypeId, "Starting");
break; break;
case KeContact::StateNotReady: case KeContact::StateNotReady:
device->setStateValue(wallboxActivityStateTypeId, "Not ready for charging"); thing->setStateValue(wallboxActivityStateTypeId, "Not ready for charging");
break; break;
case KeContact::StateReady: case KeContact::StateReady:
device->setStateValue(wallboxActivityStateTypeId, "Ready for charging"); thing->setStateValue(wallboxActivityStateTypeId, "Ready for charging");
break; break;
case KeContact::StateCharging: case KeContact::StateCharging:
device->setStateValue(wallboxActivityStateTypeId, "Charging"); thing->setStateValue(wallboxActivityStateTypeId, "Charging");
break; break;
case KeContact::StateError: case KeContact::StateError:
device->setStateValue(wallboxActivityStateTypeId, "Error"); thing->setStateValue(wallboxActivityStateTypeId, "Error");
break; break;
case KeContact::StateAuthorizationRejected: case KeContact::StateAuthorizationRejected:
device->setStateValue(wallboxActivityStateTypeId, "Authorization rejected"); thing->setStateValue(wallboxActivityStateTypeId, "Authorization rejected");
break; break;
} }
@ -192,172 +192,172 @@ void DevicePluginKeba::setDeviceState(Device *device, KeContact::State state)
//Set charging session //Set charging session
QTimeZone tz = QTimeZone(QTimeZone::systemTimeZoneId()); QTimeZone tz = QTimeZone(QTimeZone::systemTimeZoneId());
QDateTime startedChargingSession = QDateTime::currentDateTime().toTimeZone(tz); QDateTime startedChargingSession = QDateTime::currentDateTime().toTimeZone(tz);
m_chargingSessionStartTime.insert(device->id(), startedChargingSession); m_chargingSessionStartTime.insert(thing->id(), startedChargingSession);
} else { } else {
m_chargingSessionStartTime.remove(device->id()); m_chargingSessionStartTime.remove(thing->id());
device->setStateValue(wallboxSessionTimeStateTypeId, 0); thing->setStateValue(wallboxSessionTimeStateTypeId, 0);
} }
} }
void DevicePluginKeba::setDevicePlugState(Device *device, KeContact::PlugState plugState) void IntegrationPluginKeba::setDevicePlugState(Thing *thing, KeContact::PlugState plugState)
{ {
switch (plugState) { switch (plugState) {
case KeContact::PlugStateUnplugged: case KeContact::PlugStateUnplugged:
device->setStateValue(wallboxPlugStateStateTypeId, "Unplugged"); thing->setStateValue(wallboxPlugStateStateTypeId, "Unplugged");
break; break;
case KeContact::PlugStatePluggedOnChargingStation: case KeContact::PlugStatePluggedOnChargingStation:
device->setStateValue(wallboxPlugStateStateTypeId, "Plugged in charging station"); thing->setStateValue(wallboxPlugStateStateTypeId, "Plugged in charging station");
break; break;
case KeContact::PlugStatePluggedOnChargingStationAndPluggedOnEV: case KeContact::PlugStatePluggedOnChargingStationAndPluggedOnEV:
device->setStateValue(wallboxPlugStateStateTypeId, "Plugged in on EV"); thing->setStateValue(wallboxPlugStateStateTypeId, "Plugged in on EV");
break; break;
case KeContact::PlugStatePluggedOnChargingStationAndPlugLocked: case KeContact::PlugStatePluggedOnChargingStationAndPlugLocked:
device->setStateValue(wallboxPlugStateStateTypeId, "Plugged in and locked"); thing->setStateValue(wallboxPlugStateStateTypeId, "Plugged in and locked");
break; break;
case KeContact::PlugStatePluggedOnChargingStationAndPlugLockedAndPluggedOnEV: case KeContact::PlugStatePluggedOnChargingStationAndPlugLockedAndPluggedOnEV:
device->setStateValue(wallboxPlugStateStateTypeId, "Plugged in on EV and locked"); thing->setStateValue(wallboxPlugStateStateTypeId, "Plugged in on EV and locked");
break; break;
} }
} }
void DevicePluginKeba::onConnectionChanged(bool status) void IntegrationPluginKeba::onConnectionChanged(bool status)
{ {
KeContact *keba = static_cast<KeContact *>(sender()); KeContact *keba = static_cast<KeContact *>(sender());
Device *device = myDevices().findById(m_kebaDevices.key(keba)); Thing *thing = myThings().findById(m_kebaDevices.key(keba));
if (!device) { if (!thing) {
qCWarning(dcKebaKeContact()) << "On connection changed: missing device object"; qCWarning(dcKebaKeContact()) << "On connection changed: missing device object";
return; return;
} }
device->setStateValue(wallboxConnectedStateTypeId, status); thing->setStateValue(wallboxConnectedStateTypeId, status);
if (!status) { if (!status) {
//TODO start rediscovery //TODO start rediscovery
} }
} }
void DevicePluginKeba::onCommandExecuted(QUuid requestId, bool success) void IntegrationPluginKeba::onCommandExecuted(QUuid requestId, bool success)
{ {
updateData(); updateData();
if (m_asyncActions.contains(requestId)) { if (m_asyncActions.contains(requestId)) {
KeContact *keba = static_cast<KeContact *>(sender()); KeContact *keba = static_cast<KeContact *>(sender());
Device *device = myDevices().findById(m_kebaDevices.key(keba)); Thing *thing = myThings().findById(m_kebaDevices.key(keba));
if (!device) { if (!thing) {
qCWarning(dcKebaKeContact()) << "On command executed: missing device object"; qCWarning(dcKebaKeContact()) << "On command executed: missing device object";
return; return;
} }
DeviceActionInfo *info = m_asyncActions.take(requestId); ThingActionInfo *info = m_asyncActions.take(requestId);
if (success) { if (success) {
info->finish(Device::DeviceErrorNoError); info->finish(Thing::ThingErrorNoError);
} else { } else {
info->finish(Device::DeviceErrorHardwareFailure); info->finish(Thing::ThingErrorHardwareFailure);
} }
} }
} }
void DevicePluginKeba::onReportOneReceived(const KeContact::ReportOne &reportOne) void IntegrationPluginKeba::onReportOneReceived(const KeContact::ReportOne &reportOne)
{ {
Q_UNUSED(reportOne); Q_UNUSED(reportOne);
KeContact *keba = static_cast<KeContact *>(sender()); KeContact *keba = static_cast<KeContact *>(sender());
if (m_asyncSetup.contains(keba)) { if (m_asyncSetup.contains(keba)) {
DeviceSetupInfo *info = m_asyncSetup.value(keba); ThingSetupInfo *info = m_asyncSetup.value(keba);
info->finish(Device::DeviceErrorNoError); info->finish(Thing::ThingErrorNoError);
} else { } else {
qCDebug(dcKebaKeContact()) << "Report one received without an associated async setup"; qCDebug(dcKebaKeContact()) << "Report one received without an associated async setup";
} }
} }
void DevicePluginKeba::onReportTwoReceived(const KeContact::ReportTwo &reportTwo) void IntegrationPluginKeba::onReportTwoReceived(const KeContact::ReportTwo &reportTwo)
{ {
KeContact *keba = static_cast<KeContact *>(sender()); KeContact *keba = static_cast<KeContact *>(sender());
Device *device = myDevices().findById(m_kebaDevices.key(keba)); Thing *thing = myThings().findById(m_kebaDevices.key(keba));
if (!device) if (!thing)
return; return;
device->setStateValue(wallboxPowerStateTypeId, reportTwo.enableUser); thing->setStateValue(wallboxPowerStateTypeId, reportTwo.enableUser);
device->setStateValue(wallboxMaxChargingCurrentPercentStateTypeId, reportTwo.MaxCurrentPercentage); thing->setStateValue(wallboxMaxChargingCurrentPercentStateTypeId, reportTwo.MaxCurrentPercentage);
setDeviceState(device, reportTwo.state); setDeviceState(thing, reportTwo.state);
setDevicePlugState(device, reportTwo.plugState); setDevicePlugState(thing, reportTwo.plugState);
} }
void DevicePluginKeba::onReportThreeReceived(const KeContact::ReportThree &reportThree) void IntegrationPluginKeba::onReportThreeReceived(const KeContact::ReportThree &reportThree)
{ {
KeContact *keba = static_cast<KeContact *>(sender()); KeContact *keba = static_cast<KeContact *>(sender());
Device *device = myDevices().findById(m_kebaDevices.key(keba)); Thing *thing = myThings().findById(m_kebaDevices.key(keba));
if (!device) if (!thing)
return; return;
device->setStateValue(wallboxI1EventTypeId, reportThree.CurrentPhase1); thing->setStateValue(wallboxI1EventTypeId, reportThree.CurrentPhase1);
device->setStateValue(wallboxI2EventTypeId, reportThree.CurrentPhase2); thing->setStateValue(wallboxI2EventTypeId, reportThree.CurrentPhase2);
device->setStateValue(wallboxI3EventTypeId, reportThree.CurrentPhase3); thing->setStateValue(wallboxI3EventTypeId, reportThree.CurrentPhase3);
device->setStateValue(wallboxU1EventTypeId, reportThree.VoltagePhase1); thing->setStateValue(wallboxU1EventTypeId, reportThree.VoltagePhase1);
device->setStateValue(wallboxU2EventTypeId, reportThree.VoltagePhase2); thing->setStateValue(wallboxU2EventTypeId, reportThree.VoltagePhase2);
device->setStateValue(wallboxU3EventTypeId, reportThree.VoltagePhase3); thing->setStateValue(wallboxU3EventTypeId, reportThree.VoltagePhase3);
device->setStateValue(wallboxPStateTypeId, reportThree.Power); thing->setStateValue(wallboxPStateTypeId, reportThree.Power);
device->setStateValue(wallboxEPStateTypeId, reportThree.EnergySession); thing->setStateValue(wallboxEPStateTypeId, reportThree.EnergySession);
device->setStateValue(wallboxTotalEnergyConsumedStateTypeId, reportThree.EnergyTotal); thing->setStateValue(wallboxTotalEnergyConsumedStateTypeId, reportThree.EnergyTotal);
} }
void DevicePluginKeba::onBroadcastReceived(KeContact::BroadcastType type, const QVariant &content) void IntegrationPluginKeba::onBroadcastReceived(KeContact::BroadcastType type, const QVariant &content)
{ {
KeContact *keba = static_cast<KeContact *>(sender()); KeContact *keba = static_cast<KeContact *>(sender());
Device *device = myDevices().findById(m_kebaDevices.key(keba)); Thing *thing = myThings().findById(m_kebaDevices.key(keba));
if (!device) if (!thing)
return; return;
switch (type) { switch (type) {
case KeContact::BroadcastTypePlug: case KeContact::BroadcastTypePlug:
setDevicePlugState(device, KeContact::PlugState(content.toInt())); setDevicePlugState(thing, KeContact::PlugState(content.toInt()));
break; break;
case KeContact::BroadcastTypeInput: case KeContact::BroadcastTypeInput:
break; break;
case KeContact::BroadcastTypeEPres: case KeContact::BroadcastTypeEPres:
device->setStateValue(wallboxEPStateTypeId, content.toInt()); thing->setStateValue(wallboxEPStateTypeId, content.toInt());
break; break;
case KeContact::BroadcastTypeState: case KeContact::BroadcastTypeState:
setDeviceState(device, KeContact::State(content.toInt())); setDeviceState(thing, KeContact::State(content.toInt()));
break; break;
case KeContact::BroadcastTypeMaxCurr: case KeContact::BroadcastTypeMaxCurr:
device->setStateValue(wallboxMaxChargingCurrentStateTypeId, content.toInt()); thing->setStateValue(wallboxMaxChargingCurrentStateTypeId, content.toInt());
break; break;
case KeContact::BroadcastTypeEnableSys: case KeContact::BroadcastTypeEnableSys:
break; break;
} }
} }
void DevicePluginKeba::executeAction(DeviceActionInfo *info) void IntegrationPluginKeba::executeAction(ThingActionInfo *info)
{ {
Device *device = info->device(); Thing *thing = info->thing();
Action action = info->action(); Action action = info->action();
if (device->deviceClassId() == wallboxDeviceClassId) { if (thing->thingClassId() == wallboxThingClassId) {
KeContact *keba = m_kebaDevices.value(device->id()); KeContact *keba = m_kebaDevices.value(thing->id());
if (!keba) { if (!keba) {
qCWarning(dcKebaKeContact()) << "Device not properly initialized, Keba object missing"; qCWarning(dcKebaKeContact()) << "Device not properly initialized, Keba object missing";
return info->finish(Device::DeviceErrorHardwareNotAvailable); return info->finish(Thing::ThingErrorHardwareNotAvailable);
} }
if(action.actionTypeId() == wallboxMaxChargingCurrentActionTypeId){ if(action.actionTypeId() == wallboxMaxChargingCurrentActionTypeId){
int milliAmpere = action.param(wallboxMaxChargingCurrentActionMaxChargingCurrentParamTypeId).value().toInt(); int milliAmpere = action.param(wallboxMaxChargingCurrentActionMaxChargingCurrentParamTypeId).value().toInt();
QUuid requestId = keba->setMaxAmpere(milliAmpere); QUuid requestId = keba->setMaxAmpere(milliAmpere);
m_asyncActions.insert(requestId, info); m_asyncActions.insert(requestId, info);
connect(info, &DeviceActionInfo::aborted, this, [requestId, this]{m_asyncActions.remove(requestId);}); connect(info, &ThingActionInfo::aborted, this, [requestId, this]{m_asyncActions.remove(requestId);});
} else if(action.actionTypeId() == wallboxPowerActionTypeId){ } else if(action.actionTypeId() == wallboxPowerActionTypeId){
QUuid requestId = keba->enableOutput(action.param(wallboxPowerActionTypeId).value().toBool()); QUuid requestId = keba->enableOutput(action.param(wallboxPowerActionTypeId).value().toBool());
m_asyncActions.insert(requestId, info); m_asyncActions.insert(requestId, info);
connect(info, &DeviceActionInfo::aborted, this, [requestId, this]{m_asyncActions.remove(requestId);}); connect(info, &ThingActionInfo::aborted, this, [requestId, this]{m_asyncActions.remove(requestId);});
} else if(action.actionTypeId() == wallboxDisplayActionTypeId){ } else if(action.actionTypeId() == wallboxDisplayActionTypeId){
QUuid requestId = keba->displayMessage(action.param(wallboxDisplayActionMessageParamTypeId).value().toByteArray()); QUuid requestId = keba->displayMessage(action.param(wallboxDisplayActionMessageParamTypeId).value().toByteArray());
m_asyncActions.insert(requestId, info); m_asyncActions.insert(requestId, info);
connect(info, &DeviceActionInfo::aborted, this, [requestId, this]{m_asyncActions.remove(requestId);}); connect(info, &ThingActionInfo::aborted, this, [requestId, this]{m_asyncActions.remove(requestId);});
} else { } else {
qCWarning(dcKebaKeContact()) << "Unhandled ActionTypeId:" << action.actionTypeId(); qCWarning(dcKebaKeContact()) << "Unhandled ActionTypeId:" << action.actionTypeId();
info->finish(Device::DeviceErrorActionTypeNotFound); info->finish(Thing::ThingErrorActionTypeNotFound);
} }
} else { } else {
qCWarning(dcKebaKeContact()) << "Execute action, unhandled device class" << device->deviceClass(); qCWarning(dcKebaKeContact()) << "Execute action, unhandled device class" << thing->thingClass();
info->finish(Device::DeviceErrorDeviceClassNotFound); info->finish(Thing::ThingErrorThingClassNotFound);
} }
} }

View File

@ -50,10 +50,10 @@ class IntegrationPluginKeba : public IntegrationPlugin
Q_INTERFACES(IntegrationPlugin) Q_INTERFACES(IntegrationPlugin)
public: public:
explicit DevicePluginKeba(); explicit IntegrationPluginKeba();
void discoverDevices(DeviceDiscoveryInfo *info) override; void discoverThings(ThingDiscoveryInfo *info) override;
void setupDevice(DeviceSetupInfo *info) override; void setupThing(ThingSetupInfo *info) override;
void postSetupThing(Thing* thing) override; void postSetupThing(Thing* thing) override;
void thingRemoved(Thing* thing) override; void thingRemoved(Thing* thing) override;
@ -63,13 +63,13 @@ public:
private: private:
PluginTimer *m_pluginTimer = nullptr; PluginTimer *m_pluginTimer = nullptr;
QHash<DeviceId, KeContact *> m_kebaDevices; QHash<ThingId, KeContact *> m_kebaDevices;
QHash<KeContact *, DeviceSetupInfo *> m_asyncSetup; QHash<KeContact *, ThingSetupInfo *> m_asyncSetup;
QHash<QUuid, DeviceActionInfo *> m_asyncActions; QHash<QUuid, ThingActionInfo *> m_asyncActions;
QHash<DeviceId, QDateTime> m_chargingSessionStartTime; QHash<ThingId, QDateTime> m_chargingSessionStartTime;
void setDeviceState(Device *device, KeContact::State state); void setDeviceState(Thing *device, KeContact::State state);
void setDevicePlugState(Device *device, KeContact::PlugState plugState); void setDevicePlugState(Thing *device, KeContact::PlugState plugState);
private slots: private slots:
void onConnectionChanged(bool status); void onConnectionChanged(bool status);

View File

@ -5,13 +5,13 @@ QT += network
TARGET = $$qtLibraryTarget(nymea_integrationpluginkeba) TARGET = $$qtLibraryTarget(nymea_integrationpluginkeba)
SOURCES += \ SOURCES += \
devicepluginkeba.cpp \ integrationpluginkeba.cpp \
kecontact.cpp \ kecontact.cpp \
discovery.cpp \ discovery.cpp \
host.cpp \ host.cpp \
HEADERS += \ HEADERS += \
devicepluginkeba.h \ integrationpluginkeba.h \
kecontact.h \ kecontact.h \
discovery.h \ discovery.h \
host.h \ host.h \

View File

@ -4,7 +4,7 @@
<context> <context>
<name>IntegrationPluginKeba</name> <name>IntegrationPluginKeba</name>
<message> <message>
<location filename="../devicepluginkeba.cpp" line="97"/> <location filename="../integrationpluginkeba.cpp" line="98"/>
<source>Error opening network port.</source> <source>Error opening network port.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -12,300 +12,315 @@
<context> <context>
<name>KebaKeContact</name> <name>KebaKeContact</name>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="145"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="148"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="148"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="151"/>
<source>Keba KeContact</source> <source>Keba KeContact</source>
<extracomment>The name of the DeviceClass ({900dacec-cae7-4a37-95ba-501846368ea2}) <extracomment>The name of the ThingClass ({900dacec-cae7-4a37-95ba-501846368ea2})
---------- ----------
The name of the plugin KebaKeContact ({9142b09f-30a9-43d0-9ede-2f8debe075ac})</extracomment> The name of the plugin KebaKeContact ({9142b09f-30a9-43d0-9ede-2f8debe075ac})</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="142"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="145"/>
<source>Keba</source> <source>Keba</source>
<extracomment>The name of the vendor ({f7cda40b-829a-4675-abaa-485697430f5f})</extracomment> <extracomment>The name of the vendor ({f7cda40b-829a-4675-abaa-485697430f5f})</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="85"/>
<source>Activity changed</source>
<extracomment>The name of the EventType ({539e5602-6dd9-465d-9705-3bb59bcf8982}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="79"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="82"/>
<source>Activity</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: activity, ID: {539e5602-6dd9-465d-9705-3bb59bcf8982})
----------
The name of the StateType ({539e5602-6dd9-465d-9705-3bb59bcf8982}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="88"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="88"/>
<source>Activity changed</source>
<extracomment>The name of the EventType ({539e5602-6dd9-465d-9705-3bb59bcf8982}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="82"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="85"/>
<source>Activity</source>
<extracomment>The name of the ParamType (ThingClass: wallbox, EventType: activity, ID: {539e5602-6dd9-465d-9705-3bb59bcf8982})
----------
The name of the StateType ({539e5602-6dd9-465d-9705-3bb59bcf8982}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="91"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="91"/>
<source>Connected</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: connected, ID: {ce813458-d7d8-4f40-9648-dba4c41e92f0})
----------
The name of the StateType ({ce813458-d7d8-4f40-9648-dba4c41e92f0}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="94"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="94"/>
<source>Connected</source>
<extracomment>The name of the ParamType (ThingClass: wallbox, EventType: connected, ID: {ce813458-d7d8-4f40-9648-dba4c41e92f0})
----------
The name of the StateType ({ce813458-d7d8-4f40-9648-dba4c41e92f0}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="97"/>
<source>Connection changed</source> <source>Connection changed</source>
<extracomment>The name of the EventType ({ce813458-d7d8-4f40-9648-dba4c41e92f0}) of DeviceClass wallbox</extracomment> <extracomment>The name of the EventType ({ce813458-d7d8-4f40-9648-dba4c41e92f0}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="103"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="106"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="106"/>
<source>Current Phase 1</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: I1, ID: {31ec17b0-11e3-4332-92b0-fea821cf024f})
----------
The name of the StateType ({31ec17b0-11e3-4332-92b0-fea821cf024f}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="109"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="109"/>
<source>Current Phase 1</source>
<extracomment>The name of the ParamType (ThingClass: wallbox, EventType: I1, ID: {31ec17b0-11e3-4332-92b0-fea821cf024f})
----------
The name of the StateType ({31ec17b0-11e3-4332-92b0-fea821cf024f}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="112"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="112"/>
<source>Current Phase 2</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: I2, ID: {cdc7e10a-0d0a-4e93-ad2c-d34ffca45c97})
----------
The name of the StateType ({cdc7e10a-0d0a-4e93-ad2c-d34ffca45c97}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="115"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="115"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="118"/> <source>Current Phase 2</source>
<source>Current Phase 3</source> <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: I2, ID: {cdc7e10a-0d0a-4e93-ad2c-d34ffca45c97})
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: I3, ID: {da838dc8-85f0-4e55-b4b5-cb93a43b373d})
---------- ----------
The name of the StateType ({da838dc8-85f0-4e55-b4b5-cb93a43b373d}) of DeviceClass wallbox</extracomment> The name of the StateType ({cdc7e10a-0d0a-4e93-ad2c-d34ffca45c97}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="124"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="118"/>
<source>Current phase 1 changed</source> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="121"/>
<extracomment>The name of the EventType ({31ec17b0-11e3-4332-92b0-fea821cf024f}) of DeviceClass wallbox</extracomment> <source>Current Phase 3</source>
<extracomment>The name of the ParamType (ThingClass: wallbox, EventType: I3, ID: {da838dc8-85f0-4e55-b4b5-cb93a43b373d})
----------
The name of the StateType ({da838dc8-85f0-4e55-b4b5-cb93a43b373d}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="127"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="127"/>
<source>Current phase 2 changed</source> <source>Current phase 1 changed</source>
<extracomment>The name of the EventType ({cdc7e10a-0d0a-4e93-ad2c-d34ffca45c97}) of DeviceClass wallbox</extracomment> <extracomment>The name of the EventType ({31ec17b0-11e3-4332-92b0-fea821cf024f}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="130"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="130"/>
<source>Current phase 3 changed</source> <source>Current phase 2 changed</source>
<extracomment>The name of the EventType ({da838dc8-85f0-4e55-b4b5-cb93a43b373d}) of DeviceClass wallbox</extracomment> <extracomment>The name of the EventType ({cdc7e10a-0d0a-4e93-ad2c-d34ffca45c97}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="133"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="133"/>
<source>Display</source> <source>Current phase 3 changed</source>
<extracomment>The name of the ActionType ({158b1a8f-fde9-4191-bf42-4ece5fe582e6}) of DeviceClass wallbox</extracomment> <extracomment>The name of the EventType ({da838dc8-85f0-4e55-b4b5-cb93a43b373d}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="136"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="136"/>
<source>Display message</source> <source>Display</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, ActionType: display, ID: {4e69a761-f4f1-42d0-83db-380894a86ebc})</extracomment> <extracomment>The name of the ActionType ({158b1a8f-fde9-4191-bf42-4ece5fe582e6}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="139"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="139"/>
<source>IPv4 Address</source> <source>Display message</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, Type: device, ID: {730cd3d3-5f0e-4028-a8c2-ced7574f13f3})</extracomment> <extracomment>The name of the ParamType (ThingClass: wallbox, ActionType: display, ID: {4e69a761-f4f1-42d0-83db-380894a86ebc})</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="151"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="142"/>
<source>MAC Address</source> <source>IPv4 Address</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, Type: device, ID: {c2df921d-ff8b-411c-9b1d-04a437d7dfa6})</extracomment> <extracomment>The name of the ParamType (ThingClass: wallbox, Type: thing, ID: {730cd3d3-5f0e-4028-a8c2-ced7574f13f3})</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="154"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="154"/>
<source>MAC Address</source>
<extracomment>The name of the ParamType (ThingClass: wallbox, Type: thing, ID: {c2df921d-ff8b-411c-9b1d-04a437d7dfa6})</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="157"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="157"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="160"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="160"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="163"/>
<source>Maximal charging current</source> <source>Maximal charging current</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, ActionType: maxChargingCurrent, ID: {593656f0-babf-4308-8767-68f34e10fb15}) <extracomment>The name of the ParamType (ThingClass: wallbox, ActionType: maxChargingCurrent, ID: {593656f0-babf-4308-8767-68f34e10fb15})
---------- ----------
The name of the ParamType (DeviceClass: wallbox, EventType: maxChargingCurrent, ID: {593656f0-babf-4308-8767-68f34e10fb15}) The name of the ParamType (ThingClass: wallbox, EventType: maxChargingCurrent, ID: {593656f0-babf-4308-8767-68f34e10fb15})
---------- ----------
The name of the StateType ({593656f0-babf-4308-8767-68f34e10fb15}) of ThingClass wallbox</extracomment> The name of the StateType ({593656f0-babf-4308-8767-68f34e10fb15}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="163"/>
<source>Maximal charging current changed</source>
<extracomment>The name of the EventType ({593656f0-babf-4308-8767-68f34e10fb15}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="166"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="166"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="169"/> <source>Maximal charging current changed</source>
<source>Maximal charging current in Percent</source> <extracomment>The name of the EventType ({593656f0-babf-4308-8767-68f34e10fb15}) of ThingClass wallbox</extracomment>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: maxChargingCurrentPercent, ID: {3c7b83a0-0e42-47bf-9788-dde6aab5ceea})
----------
The name of the StateType ({3c7b83a0-0e42-47bf-9788-dde6aab5ceea}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="169"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="172"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="172"/>
<source>Maximal charging current percentage changed</source> <source>Maximal charging current in Percent</source>
<extracomment>The name of the EventType ({3c7b83a0-0e42-47bf-9788-dde6aab5ceea}) of DeviceClass wallbox</extracomment> <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: maxChargingCurrentPercent, ID: {3c7b83a0-0e42-47bf-9788-dde6aab5ceea})
----------
The name of the StateType ({3c7b83a0-0e42-47bf-9788-dde6aab5ceea}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="175"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="175"/>
<source>Maximal charging current percentage changed</source>
<extracomment>The name of the EventType ({3c7b83a0-0e42-47bf-9788-dde6aab5ceea}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="178"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="178"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="181"/>
<source>Plug State</source> <source>Plug State</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: plugState, ID: {3b4d29f3-3101-47ad-90fd-269b6348783b}) <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: plugState, ID: {3b4d29f3-3101-47ad-90fd-269b6348783b})
---------- ----------
The name of the StateType ({3b4d29f3-3101-47ad-90fd-269b6348783b}) of DeviceClass wallbox</extracomment> The name of the StateType ({3b4d29f3-3101-47ad-90fd-269b6348783b}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="196"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="199"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="199"/>
<source>Power consumption</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: P, ID: {7af9e93b-099d-4d9d-a480-9c0f66aecd8b})
----------
The name of the StateType ({7af9e93b-099d-4d9d-a480-9c0f66aecd8b}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="202"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="202"/>
<source>Power consumtion changed</source> <source>Power consumption</source>
<extracomment>The name of the EventType ({7af9e93b-099d-4d9d-a480-9c0f66aecd8b}) of DeviceClass wallbox</extracomment> <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: P, ID: {7af9e93b-099d-4d9d-a480-9c0f66aecd8b})
----------
The name of the StateType ({7af9e93b-099d-4d9d-a480-9c0f66aecd8b}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="205"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="205"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="208"/> <source>Power consumtion changed</source>
<source>Present energy</source> <extracomment>The name of the EventType ({7af9e93b-099d-4d9d-a480-9c0f66aecd8b}) of ThingClass wallbox</extracomment>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: EP, ID: {8e277efe-21ef-4536-bfc0-901b32d44d7c})
----------
The name of the StateType ({8e277efe-21ef-4536-bfc0-901b32d44d7c}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="208"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="211"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="211"/>
<source>Present energy changed</source> <source>Present energy</source>
<extracomment>The name of the EventType ({8e277efe-21ef-4536-bfc0-901b32d44d7c}) of DeviceClass wallbox</extracomment> <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: EP, ID: {8e277efe-21ef-4536-bfc0-901b32d44d7c})
----------
The name of the StateType ({8e277efe-21ef-4536-bfc0-901b32d44d7c}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="214"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="214"/>
<source>Set Power</source> <source>Present energy changed</source>
<extracomment>The name of the ActionType ({83ed0774-2a91-434d-b03c-d920d02f2981}) of DeviceClass wallbox</extracomment> <extracomment>The name of the EventType ({8e277efe-21ef-4536-bfc0-901b32d44d7c}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="217"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="217"/>
<source>Set maximal charging current</source> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="220"/>
<extracomment>The name of the ActionType ({593656f0-babf-4308-8767-68f34e10fb15}) of DeviceClass wallbox</extracomment> <source>Session time</source>
<extracomment>The name of the ParamType (ThingClass: wallbox, EventType: sessionTime, ID: {a6f35ea0-aaea-438b-b818-6d161762611e})
----------
The name of the StateType ({a6f35ea0-aaea-438b-b818-6d161762611e}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="220"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="223"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="223"/>
<source>Total energy consumed</source> <source>Session time changed</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: totalEnergyConsumed, ID: {41e179b3-29a2-43ec-b537-023a527081e8}) <extracomment>The name of the EventType ({a6f35ea0-aaea-438b-b818-6d161762611e}) of ThingClass wallbox</extracomment>
----------
The name of the StateType ({41e179b3-29a2-43ec-b537-023a527081e8}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="226"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="226"/>
<source>Total energy consumption changed</source> <source>Set Power</source>
<extracomment>The name of the EventType ({41e179b3-29a2-43ec-b537-023a527081e8}) of DeviceClass wallbox</extracomment> <extracomment>The name of the ActionType ({83ed0774-2a91-434d-b03c-d920d02f2981}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="229"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="229"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="232"/> <source>Set maximal charging current</source>
<source>Voltage Phase 2</source> <extracomment>The name of the ActionType ({593656f0-babf-4308-8767-68f34e10fb15}) of ThingClass wallbox</extracomment>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: U2, ID: {c8344ca5-21ac-4cd1-8f4b-e5ed202c5862})
----------
The name of the StateType ({c8344ca5-21ac-4cd1-8f4b-e5ed202c5862}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="232"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="235"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="235"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="238"/> <source>Total energy consumed</source>
<source>Voltage Phase 3</source> <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: totalEnergyConsumed, ID: {41e179b3-29a2-43ec-b537-023a527081e8})
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: U3, ID: {5f01e86c-0943-4849-a01a-db441916ebd5})
---------- ----------
The name of the StateType ({5f01e86c-0943-4849-a01a-db441916ebd5}) of DeviceClass wallbox</extracomment> The name of the StateType ({41e179b3-29a2-43ec-b537-023a527081e8}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="238"/>
<source>Total energy consumption changed</source>
<extracomment>The name of the EventType ({41e179b3-29a2-43ec-b537-023a527081e8}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="241"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="241"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="244"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="244"/>
<source>Voltage phase 1</source> <source>Voltage Phase 2</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: U1, ID: {4a2d75d8-a3a0-4b40-9ca7-e8b6f11d0ef9}) <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: U2, ID: {c8344ca5-21ac-4cd1-8f4b-e5ed202c5862})
---------- ----------
The name of the StateType ({4a2d75d8-a3a0-4b40-9ca7-e8b6f11d0ef9}) of DeviceClass wallbox</extracomment> The name of the StateType ({c8344ca5-21ac-4cd1-8f4b-e5ed202c5862}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="247"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="247"/>
<source>Voltage phase 1 changed</source>
<extracomment>The name of the EventType ({4a2d75d8-a3a0-4b40-9ca7-e8b6f11d0ef9}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="250"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="250"/>
<source>Voltage phase 2 changed</source> <source>Voltage Phase 3</source>
<extracomment>The name of the EventType ({c8344ca5-21ac-4cd1-8f4b-e5ed202c5862}) of DeviceClass wallbox</extracomment> <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: U3, ID: {5f01e86c-0943-4849-a01a-db441916ebd5})
----------
The name of the StateType ({5f01e86c-0943-4849-a01a-db441916ebd5}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="253"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="253"/>
<source>Voltage phase 3 changed</source> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="256"/>
<extracomment>The name of the EventType ({5f01e86c-0943-4849-a01a-db441916ebd5}) of DeviceClass wallbox</extracomment> <source>Voltage phase 1</source>
<extracomment>The name of the ParamType (ThingClass: wallbox, EventType: U1, ID: {4a2d75d8-a3a0-4b40-9ca7-e8b6f11d0ef9})
----------
The name of the StateType ({4a2d75d8-a3a0-4b40-9ca7-e8b6f11d0ef9}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="259"/>
<source>Voltage phase 1 changed</source>
<extracomment>The name of the EventType ({4a2d75d8-a3a0-4b40-9ca7-e8b6f11d0ef9}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="262"/>
<source>Voltage phase 2 changed</source>
<extracomment>The name of the EventType ({c8344ca5-21ac-4cd1-8f4b-e5ed202c5862}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="265"/>
<source>Voltage phase 3 changed</source>
<extracomment>The name of the EventType ({5f01e86c-0943-4849-a01a-db441916ebd5}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="97"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="100"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="100"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="103"/>
<source>Current</source> <source>Current</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, EventType: current, ID: {a29c1748-fe97-4830-a56e-e1cc4e618385}) <extracomment>The name of the ParamType (ThingClass: wallbox, EventType: current, ID: {a29c1748-fe97-4830-a56e-e1cc4e618385})
---------- ----------
The name of the StateType ({a29c1748-fe97-4830-a56e-e1cc4e618385}) of DeviceClass wallbox</extracomment> The name of the StateType ({a29c1748-fe97-4830-a56e-e1cc4e618385}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="187"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="190"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="193"/>
<source>Power</source>
<extracomment>The name of the ParamType (ThingClass: wallbox, ActionType: power, ID: {83ed0774-2a91-434d-b03c-d920d02f2981})
----------
The name of the ParamType (ThingClass: wallbox, EventType: power, ID: {83ed0774-2a91-434d-b03c-d920d02f2981})
----------
The name of the StateType ({83ed0774-2a91-434d-b03c-d920d02f2981}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="184"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="184"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="187"/>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="190"/>
<source>Power</source>
<extracomment>The name of the ParamType (DeviceClass: wallbox, ActionType: power, ID: {83ed0774-2a91-434d-b03c-d920d02f2981})
----------
The name of the ParamType (DeviceClass: wallbox, EventType: power, ID: {83ed0774-2a91-434d-b03c-d920d02f2981})
----------
The name of the StateType ({83ed0774-2a91-434d-b03c-d920d02f2981}) of DeviceClass wallbox</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="181"/>
<source>Plug State changed</source> <source>Plug State changed</source>
<extracomment>The name of the EventType ({3b4d29f3-3101-47ad-90fd-269b6348783b}) of DeviceClass wallbox</extracomment> <extracomment>The name of the EventType ({3b4d29f3-3101-47ad-90fd-269b6348783b}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="121"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="124"/>
<source>Current changed</source> <source>Current changed</source>
<extracomment>The name of the EventType ({a29c1748-fe97-4830-a56e-e1cc4e618385}) of DeviceClass wallbox</extracomment> <extracomment>The name of the EventType ({a29c1748-fe97-4830-a56e-e1cc4e618385}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="193"/> <location filename="../../../build-nymea-plugins-Desktop-Debug/keba/plugininfo.h" line="196"/>
<source>Power changed</source> <source>Power changed</source>
<extracomment>The name of the EventType ({83ed0774-2a91-434d-b03c-d920d02f2981}) of DeviceClass wallbox</extracomment> <extracomment>The name of the EventType ({83ed0774-2a91-434d-b03c-d920d02f2981}) of ThingClass wallbox</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>