diff --git a/pcelectric/EV11.3-registers.json b/pcelectric/EV11.3-registers.json index 0e771ea..1f4b2ff 100644 --- a/pcelectric/EV11.3-registers.json +++ b/pcelectric/EV11.3-registers.json @@ -101,6 +101,10 @@ { "key": "DCFaultCurrentError", "value": 9 + }, + { + "key": "GridMonitoringError", + "value": 11 } ] }, @@ -124,6 +128,23 @@ "value": 3 } ] + }, + { + "name": "R37Mode", + "values": [ + { + "key": "NoMonitoring", + "value": 0 + }, + { + "key": "MeterMonitoring", + "value": 1 + }, + { + "key": "DigitalInputMonitoring", + "value": 2 + } + ] } ], "blocks": [ @@ -310,7 +331,7 @@ "size": 1, "type": "uint16", "registerType": "holdingRegister", - "description": "Actual charging power (Since firmware version: 0.22)", + "description": "Actual charging power (Since firmware version: 0.25)", "unit": "W", "access": "RO" }, @@ -320,7 +341,156 @@ "size": 1, "type": "uint16", "registerType": "holdingRegister", - "description": "Actual digital input (Since firmware version: 0.22)", + "description": "Actual digital input (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "modeR37", + "address": 146, + "size": 1, + "type": "uint16", + "enum": "R37Mode", + "registerType": "holdingRegister", + "description": "Monitoring mode for the R37 regulation (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "phasesR37", + "address": 147, + "size": 1, + "type": "uint16", + "registerType": "holdingRegister", + "description": "1 or 3 phases which get monitored, depends on the DIP switch (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "deplayR37", + "address": 148, + "size": 1, + "type": "uint16", + "unit": "s", + "registerType": "holdingRegister", + "description": "Delay until undevoltage error triggers in R37 meter monitoring mode, default 3 seconds (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "undervoltageLimitR37", + "address": 149, + "size": 1, + "type": "uint16", + "unit": "V", + "registerType": "holdingRegister", + "description": "Undevoltage limit for the error trigger in R37 meter monitoring mode, default 184 V (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "voltageL1", + "address": 150, + "size": 1, + "type": "uint16", + "unit": "V", + "staticScaleFactor": -1, + "registerType": "holdingRegister", + "description": "Voltage L1 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "voltageL2", + "address": 151, + "size": 1, + "type": "uint16", + "unit": "V", + "staticScaleFactor": -1, + "registerType": "holdingRegister", + "description": "Voltage L2 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "voltageL3", + "address": 152, + "size": 1, + "type": "uint16", + "unit": "V", + "staticScaleFactor": -1, + "registerType": "holdingRegister", + "description": "Voltage L3 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "currentL1", + "address": 153, + "size": 1, + "type": "uint16", + "unit": "A", + "staticScaleFactor": -3, + "registerType": "holdingRegister", + "description": "Current L1 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "currentL2", + "address": 154, + "size": 1, + "type": "uint16", + "unit": "A", + "staticScaleFactor": -3, + "registerType": "holdingRegister", + "description": "Current L2 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "currentL3", + "address": 155, + "size": 1, + "type": "uint16", + "unit": "A", + "staticScaleFactor": -3, + "registerType": "holdingRegister", + "description": "Current L3 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "activePowerL1", + "address": 156, + "size": 1, + "type": "uint16", + "unit": "W", + "staticScaleFactor": -1, + "registerType": "holdingRegister", + "description": "Active power L1 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "activePowerL2", + "address": 157, + "size": 1, + "type": "uint16", + "unit": "W", + "staticScaleFactor": -1, + "registerType": "holdingRegister", + "description": "Active power L2 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "activePowerL3", + "address": 158, + "size": 1, + "type": "uint16", + "unit": "W", + "staticScaleFactor": -1, + "registerType": "holdingRegister", + "description": "Active power L3 (Since firmware version: 0.25)", + "access": "RO" + }, + { + "id": "totalEnergyConsumed", + "address": 159, + "size": 2, + "type": "uint32", + "unit": "kWh", + "staticScaleFactor": -1, + "registerType": "holdingRegister", + "description": "Total energy consumed (Since firmware version: 0.25)", "access": "RO" } ] @@ -392,7 +562,7 @@ "size": 1, "type": "uint16", "registerType": "holdingRegister", - "description": "Phase auto switch pause (Since firmware version: 0.22)", + "description": "Phase auto switch pause (Since firmware version: 0.25)", "unit": "s", "defaultValue": "6", "access": "RW" @@ -403,7 +573,7 @@ "size": 1, "type": "uint16", "registerType": "holdingRegister", - "description": "Phase auto switch min charging time (Since firmware version: 0.22)", + "description": "Phase auto switch min charging time (Since firmware version: 0.25)", "unit": "s", "defaultValue": "120", "access": "RW" @@ -414,7 +584,7 @@ "size": 1, "type": "uint16", "registerType": "holdingRegister", - "description": "Force charging resume (Since firmware version: 0.22)", + "description": "Force charging resume (Since firmware version: 0.25)", "defaultValue": "0", "access": "RW" } diff --git a/pcelectric/integrationpluginpcelectric.cpp b/pcelectric/integrationpluginpcelectric.cpp index 5ea4c6b..e3909e0 100644 --- a/pcelectric/integrationpluginpcelectric.cpp +++ b/pcelectric/integrationpluginpcelectric.cpp @@ -34,6 +34,18 @@ IntegrationPluginPcElectric::IntegrationPluginPcElectric() {} void IntegrationPluginPcElectric::init() { //qCCritical(dcPcElectric()) << QString("%1").arg(QString::number(49155, 2)); + + m_addressParamTypes[ev11ThingClassId] = ev11ThingAddressParamTypeId; + m_addressParamTypes[ev11NoMeterThingClassId] = ev11NoMeterThingAddressParamTypeId; + + m_hostNameParamTypes[ev11ThingClassId] = ev11ThingHostNameParamTypeId; + m_hostNameParamTypes[ev11NoMeterThingClassId] = ev11NoMeterThingHostNameParamTypeId; + + m_macParamTypes[ev11ThingClassId] = ev11ThingMacAddressParamTypeId; + m_macParamTypes[ev11NoMeterThingClassId] = ev11NoMeterThingMacAddressParamTypeId; + + m_serialNumberParamTypes[ev11ThingClassId] = ev11ThingSerialNumberParamTypeId; + m_serialNumberParamTypes[ev11NoMeterThingClassId] = ev11NoMeterThingSerialNumberParamTypeId; } void IntegrationPluginPcElectric::discoverThings(ThingDiscoveryInfo *info) @@ -48,23 +60,27 @@ void IntegrationPluginPcElectric::discoverThings(ThingDiscoveryInfo *info) PcElectricDiscovery *discovery = new PcElectricDiscovery(hardwareManager()->networkDeviceDiscovery(), 502, 1, info); connect(discovery, &PcElectricDiscovery::discoveryFinished, info, [=]() { foreach (const PcElectricDiscovery::Result &result, discovery->results()) { - ThingDescriptor descriptor(ev11ThingClassId, + + if (info->thingClassId() != result.thingClassId) + continue; + + ThingDescriptor descriptor(result.thingClassId, "PCE EV11.3 (" + result.serialNumber + ")", "Version: " + result.firmwareRevision + " - " + result.networkDeviceInfo.address().toString()); qCDebug(dcPcElectric()) << "Discovered:" << descriptor.title() << descriptor.description(); // Check if we already have set up this device - Things existingThings = myThings().filterByParam(ev11ThingSerialNumberParamTypeId, result.serialNumber); + Things existingThings = myThings().filterByParam(m_serialNumberParamTypes.value(result.thingClassId), result.serialNumber); if (existingThings.length() == 1) { qCDebug(dcPcElectric()) << "This PCE wallbox already exists in the system:" << result.serialNumber << result.networkDeviceInfo; descriptor.setThingId(existingThings.first()->id()); } ParamList params; - params << Param(ev11ThingMacAddressParamTypeId, result.networkDeviceInfo.thingParamValueMacAddress()); - params << Param(ev11ThingHostNameParamTypeId, result.networkDeviceInfo.thingParamValueHostName()); - params << Param(ev11ThingAddressParamTypeId, result.networkDeviceInfo.thingParamValueAddress()); - params << Param(ev11ThingSerialNumberParamTypeId, result.serialNumber); + params << Param(m_macParamTypes.value(result.thingClassId), result.networkDeviceInfo.thingParamValueMacAddress()); + params << Param(m_hostNameParamTypes.value(result.thingClassId), result.networkDeviceInfo.thingParamValueHostName()); + params << Param(m_addressParamTypes.value(result.thingClassId), result.networkDeviceInfo.thingParamValueAddress()); + params << Param(m_serialNumberParamTypes.value(result.thingClassId), result.serialNumber); // Note: if we discover also the port and modbusaddress, we must fill them in from the discovery here, for now everywhere the defaults... descriptor.setParams(params); info->addThingDescriptor(descriptor); @@ -148,9 +164,9 @@ void IntegrationPluginPcElectric::postSetupThing(Thing *thing) } PceWallbox::ChargingCurrentState chargingCurrentState; - chargingCurrentState.power = thing->stateValue(ev11PowerStateTypeId).toBool(); - chargingCurrentState.maxChargingCurrent = thing->stateValue(ev11MaxChargingCurrentStateTypeId).toDouble(); - chargingCurrentState.desiredPhaseCount = thing->stateValue(ev11DesiredPhaseCountStateTypeId).toDouble(); + chargingCurrentState.power = thing->stateValue("power").toBool(); + chargingCurrentState.maxChargingCurrent = thing->stateValue("maxChargingCurrent").toDouble(); + chargingCurrentState.desiredPhaseCount = thing->stateValue("desiredPhaseCount").toUInt(); qCDebug(dcPcElectric()) << "Initialize charging current state with cached values" << chargingCurrentState; m_chargingCurrentStateBuffer[thing] = chargingCurrentState; } @@ -193,10 +209,15 @@ void IntegrationPluginPcElectric::executeAction(ThingActionInfo *info) return; } - if (info->action().actionTypeId() == ev11PowerActionTypeId) { - bool power = info->action().paramValue(ev11PowerActionPowerParamTypeId).toBool(); - qCDebug(dcPcElectric()) << "Set charging enabled to" << power; + if (info->action().actionTypeId() == ev11PowerActionTypeId || info->action().actionTypeId() == ev11NoMeterPowerActionTypeId) { + bool power = false; + if (info->action().actionTypeId() == ev11PowerActionTypeId) { + power = info->action().paramValue(ev11PowerActionPowerParamTypeId).toBool(); + } else if (info->action().actionTypeId() == ev11NoMeterPowerActionTypeId) { + power = info->action().paramValue(ev11NoMeterPowerActionPowerParamTypeId).toBool(); + } + qCDebug(dcPcElectric()) << "Set charging enabled to" << power; // Update buffer m_chargingCurrentStateBuffer[thing].power = power; @@ -211,14 +232,20 @@ void IntegrationPluginPcElectric::executeAction(ThingActionInfo *info) } qCDebug(dcPcElectric()) << "Successfully set power state to" << power << "(" << registerValue << ")"; - thing->setStateValue(ev11PowerStateTypeId, power); + thing->setStateValue("power", power); info->finish(Thing::ThingErrorNoError); }); return; - } else if (info->action().actionTypeId() == ev11MaxChargingCurrentActionTypeId) { - double desiredChargingCurrent = info->action().paramValue(ev11MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble(); + } else if (info->action().actionTypeId() == ev11MaxChargingCurrentActionTypeId || info->action().actionTypeId() == ev11NoMeterMaxChargingCurrentActionTypeId) { + double desiredChargingCurrent = 6; + if (info->action().actionTypeId() == ev11MaxChargingCurrentActionTypeId) { + desiredChargingCurrent = info->action().paramValue(ev11MaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble(); + } else if (info->action().actionTypeId() == ev11NoMeterMaxChargingCurrentActionTypeId) { + desiredChargingCurrent = info->action().paramValue(ev11NoMeterMaxChargingCurrentActionMaxChargingCurrentParamTypeId).toDouble(); + } + qCDebug(dcPcElectric()) << "Set max charging current to" << desiredChargingCurrent << "A"; // Update buffer @@ -235,14 +262,22 @@ void IntegrationPluginPcElectric::executeAction(ThingActionInfo *info) } qCDebug(dcPcElectric()) << "Successfully set charging current (" << desiredChargingCurrent << ")"; - thing->setStateValue(ev11MaxChargingCurrentStateTypeId, desiredChargingCurrent); + thing->setStateValue("maxChargingCurrent", desiredChargingCurrent); info->finish(Thing::ThingErrorNoError); }); return; - } else if (info->action().actionTypeId() == ev11DesiredPhaseCountActionTypeId) { - uint desiredPhaseCount = info->action().paramValue(ev11DesiredPhaseCountActionDesiredPhaseCountParamTypeId).toUInt(); + } else if (info->action().actionTypeId() == ev11DesiredPhaseCountActionTypeId || info->action().actionTypeId() == ev11NoMeterDesiredPhaseCountActionTypeId) { + uint desiredPhaseCount = 1; + if (info->action().actionTypeId() == ev11DesiredPhaseCountActionTypeId) { + desiredPhaseCount = info->action().paramValue(ev11DesiredPhaseCountActionDesiredPhaseCountParamTypeId).toUInt(); + ; + } else if (info->action().actionTypeId() == ev11NoMeterDesiredPhaseCountActionTypeId) { + desiredPhaseCount = info->action().paramValue(ev11NoMeterDesiredPhaseCountActionDesiredPhaseCountParamTypeId).toUInt(); + ; + } + qCDebug(dcPcElectric()) << "Set desried phase count to" << desiredPhaseCount; // Update buffer @@ -259,7 +294,7 @@ void IntegrationPluginPcElectric::executeAction(ThingActionInfo *info) } qCDebug(dcPcElectric()) << "Successfully set phase count (" << desiredPhaseCount << ")"; - thing->setStateValue(ev11DesiredPhaseCountStateTypeId, desiredPhaseCount); + thing->setStateValue("desiredPhaseCount", desiredPhaseCount); info->finish(Thing::ThingErrorNoError); }); @@ -303,97 +338,114 @@ void IntegrationPluginPcElectric::setupConnection(ThingSetupInfo *info) qCInfo(dcPcElectric()) << "Reachable changed to" << reachable << "for" << thing; m_initialUpdate[thing] = true; thing->setStateValue("connected", reachable); + + // Reset energy related information if not reachable + if (!reachable && thing->thingClassId() == ev11ThingClassId) { + thing->setStateValue("currentPower", 0); + thing->setStateValue("currentPowerPhaseA", 0); + thing->setStateValue("currentPowerPhaseB", 0); + thing->setStateValue("currentPowerPhaseC", 0); + thing->setStateValue("voltagePhaseA", 0); + thing->setStateValue("voltagePhaseB", 0); + thing->setStateValue("voltagePhaseC", 0); + thing->setStateValue("currentPhaseA", 0); + thing->setStateValue("currentPhaseB", 0); + thing->setStateValue("currentPhaseC", 0); + } }); connect(connection, &PceWallbox::updateFinished, thing, [this, thing, connection]() { qCDebug(dcPcElectric()) << "Update finished for" << thing; qCDebug(dcPcElectric()) << connection; + if (!connection->phaseAutoSwitch()) { // Note: if auto phase switching is disabled, the wallbox forces 3 phase charging - thing->setStatePossibleValues(ev11DesiredPhaseCountStateTypeId, {3}); // Disable phase switching (default 3) - thing->setStateValue(ev11DesiredPhaseCountStateTypeId, 3); - thing->setStateValue(ev11PhaseCountStateTypeId, 3); + thing->setStatePossibleValues("desiredPhaseCount", {3}); // Disable phase switching (default 3) + thing->setStateValue("desiredPhaseCount", 3); + thing->setStateValue("phaseCount", 3); } else { - thing->setStatePossibleValues(ev11DesiredPhaseCountStateTypeId, {1, 3}); // Enable phase switching + thing->setStatePossibleValues("desiredPhaseCount", {1, 3}); // Enable phase switching } if (connection->chargingRelayState() != EV11ModbusTcpConnection::ChargingRelayStateNoCharging) { if (connection->chargingRelayState() == EV11ModbusTcpConnection::ChargingRelayStateSinglePhase) { - thing->setStateValue(ev11PhaseCountStateTypeId, 1); + thing->setStateValue("phaseCount", 1); } else if (connection->chargingRelayState() == EV11ModbusTcpConnection::ChargingRelayStateTheePhase) { - thing->setStateValue(ev11PhaseCountStateTypeId, 3); + thing->setStateValue("phaseCount", 3); } } - thing->setStateMaxValue(ev11MaxChargingCurrentStateTypeId, connection->maxChargingCurrentDip() / 1000); - thing->setStateValue(ev11PluggedInStateTypeId, connection->chargingState() >= PceWallbox::ChargingStateB1 && connection->chargingState() < PceWallbox::ChargingStateError); + thing->setStateMaxValue("maxChargingCurrent", connection->maxChargingCurrentDip() / 1000); + thing->setStateValue("pluggedIn", connection->chargingState() >= PceWallbox::ChargingStateB1 && connection->chargingState() < PceWallbox::ChargingStateError); - thing->setStateValue(ev11ChargingStateTypeId, connection->chargingState() == PceWallbox::ChargingStateC2); + thing->setStateValue("charging", connection->chargingState() == PceWallbox::ChargingStateC2); if (connection->chargingRelayState() != EV11ModbusTcpConnection::ChargingRelayStateNoCharging) { - thing->setStateValue(ev11PhaseCountStateTypeId, connection->chargingRelayState() == EV11ModbusTcpConnection::ChargingRelayStateSinglePhase ? 1 : 3); + thing->setStateValue("phaseCount", connection->chargingRelayState() == EV11ModbusTcpConnection::ChargingRelayStateSinglePhase ? 1 : 3); } switch (connection->chargingState()) { case PceWallbox::ChargingStateInitializing: - thing->setStateValue(ev11StatusStateTypeId, "Init"); + thing->setStateValue("status", "Init"); break; case PceWallbox::ChargingStateA1: - thing->setStateValue(ev11StatusStateTypeId, "A1"); + thing->setStateValue("status", "A1"); break; case PceWallbox::ChargingStateA2: - thing->setStateValue(ev11StatusStateTypeId, "A2"); + thing->setStateValue("status", "A2"); break; case PceWallbox::ChargingStateB1: - thing->setStateValue(ev11StatusStateTypeId, "B1"); + thing->setStateValue("status", "B1"); break; case PceWallbox::ChargingStateB2: - thing->setStateValue(ev11StatusStateTypeId, "B2"); + thing->setStateValue("status", "B2"); break; case PceWallbox::ChargingStateC1: - thing->setStateValue(ev11StatusStateTypeId, "C1"); + thing->setStateValue("status", "C1"); break; case PceWallbox::ChargingStateC2: - thing->setStateValue(ev11StatusStateTypeId, "C2"); + thing->setStateValue("status", "C2"); break; case PceWallbox::ChargingStateError: - thing->setStateValue(ev11StatusStateTypeId, "F"); + thing->setStateValue("status", "F"); break; } - thing->setStateValue(ev11CurrentVersionStateTypeId, connection->firmwareRevision()); - thing->setStateValue(ev11SessionEnergyStateTypeId, connection->powerMeter0()); - thing->setStateValue(ev11TemperatureStateTypeId, connection->temperature()); + thing->setStateValue("currentVersion", connection->firmwareRevision()); + thing->setStateValue("temperature", connection->temperature()); switch (connection->error()) { case EV11ModbusTcpConnection::ErrorNoError: - thing->setStateValue(ev11ErrorStateTypeId, "Kein Fehler aktiv"); + thing->setStateValue("error", "Kein Fehler aktiv"); break; case EV11ModbusTcpConnection::ErrorOverheating: - thing->setStateValue(ev11ErrorStateTypeId, "1: Übertemperatur. Ladevorgang wird automatisch fortgesetzt."); + thing->setStateValue("error", "1: Übertemperatur. Ladevorgang wird automatisch fortgesetzt."); break; case EV11ModbusTcpConnection::ErrorDCFaultCurrent: - thing->setStateValue(ev11ErrorStateTypeId, "2: DC Fehlerstromsensor ausgelöst."); + thing->setStateValue("error", "2: DC Fehlerstromsensor ausgelöst."); break; case EV11ModbusTcpConnection::ErrorChargingWithVentilation: - thing->setStateValue(ev11ErrorStateTypeId, "3: Ladeanforderung mit Belüftung."); + thing->setStateValue("error", "3: Ladeanforderung mit Belüftung."); break; case EV11ModbusTcpConnection::ErrorCPErrorEF: - thing->setStateValue(ev11ErrorStateTypeId, "4: CP Signal, Fehlercode E oder F."); + thing->setStateValue("error", "4: CP Signal, Fehlercode E oder F."); break; case EV11ModbusTcpConnection::ErrorCPErrorBypass: - thing->setStateValue(ev11ErrorStateTypeId, "5: CP Signal, bypass."); + thing->setStateValue("error", "5: CP Signal, bypass."); break; case EV11ModbusTcpConnection::ErrorCPErrorDiodFault: - thing->setStateValue(ev11ErrorStateTypeId, "6: CP Signal, Diode defekt."); + thing->setStateValue("error", "6: CP Signal, Diode defekt."); break; case EV11ModbusTcpConnection::ErrorDCFaultCurrentCalibrating: - thing->setStateValue(ev11ErrorStateTypeId, "7: DC Fehlerstromsensor, Kalibrirung."); + thing->setStateValue("error", "7: DC Fehlerstromsensor, Kalibrirung."); break; case EV11ModbusTcpConnection::ErrorDCFaultCurrentCommunication: - thing->setStateValue(ev11ErrorStateTypeId, "8: DC Fehlerstromsensor, Kommunikationsfehler."); + thing->setStateValue("error", "8: DC Fehlerstromsensor, Kommunikationsfehler."); break; case EV11ModbusTcpConnection::ErrorDCFaultCurrentError: - thing->setStateValue(ev11ErrorStateTypeId, "9: DC Fehlerstromsensor, Fehler."); + thing->setStateValue("error", "9: DC Fehlerstromsensor, Fehler."); + break; + case EV11ModbusTcpConnection::ErrorGridMonitoringError: + thing->setStateValue("error", "11: Netzüberwachung ausgelöst."); break; } @@ -404,62 +456,81 @@ void IntegrationPluginPcElectric::setupConnection(ThingSetupInfo *info) PceWallbox::ChargingCurrentState chargingCurrentState = PceWallbox::deriveStatesFromRegister(connection->chargingCurrent()); qCDebug(dcPcElectric()) << chargingCurrentState; - thing->setStateValue(ev11PowerStateTypeId, chargingCurrentState.power); - thing->setStateValue(ev11DesiredPhaseCountStateTypeId, chargingCurrentState.desiredPhaseCount); - if (chargingCurrentState.power) { - thing->setStateValue(ev11MaxChargingCurrentStateTypeId, chargingCurrentState.maxChargingCurrent); - } + thing->setStateValue("power", chargingCurrentState.power); + thing->setStateValue("desiredPhaseCount", chargingCurrentState.desiredPhaseCount); + if (chargingCurrentState.power) + thing->setStateValue("maxChargingCurrent", chargingCurrentState.maxChargingCurrent); m_chargingCurrentStateBuffer[thing] = chargingCurrentState; qCDebug(dcPcElectric()) << "Updating initial settings after connecting..."; - thing->setSettingValue(ev11SettingsLedBrightnessParamTypeId, connection->ledBrightness()); + thing->setSettingValue("ledBrightness", connection->ledBrightness()); switch (connection->digitalInputMode()) { case EV11ModbusTcpConnection::DigitalInputModeEnableCharging: - thing->setSettingValue(ev11SettingsDigitalInputModeParamTypeId, "0 | Charging allowed"); + thing->setSettingValue("digitalInputMode", "0 | Charging allowed"); break; case EV11ModbusTcpConnection::DigitalInputModeEnableChargingInverted: - thing->setSettingValue(ev11SettingsDigitalInputModeParamTypeId, "1 | Charging allowed inverted"); + thing->setSettingValue("digitalInputMode", "1 | Charging allowed inverted"); break; case EV11ModbusTcpConnection::DigitalInputModePwmS0Enabled: - thing->setSettingValue(ev11SettingsDigitalInputModeParamTypeId, "2 | PWM and S0 signaling"); + thing->setSettingValue("digitalInputMode", "2 | PWM and S0 signaling"); break; case EV11ModbusTcpConnection::DigitalInputModeLimitS0Enabled: - thing->setSettingValue(ev11SettingsDigitalInputModeParamTypeId, "3 | Limit and S0 signaling"); + thing->setSettingValue("digitalInputMode", "3 | Limit and S0 signaling"); break; } - thing->setStateValue(ev11DigitalInputModeStateTypeId, connection->digitalInputMode()); - if (connection->firmwareRevision() >= "0022") { - thing->setSettingValue(ev11SettingsPhaseAutoSwitchPauseParamTypeId, connection->phaseAutoSwitchPause()); - thing->setStateValue(ev11SettingsPhaseAutoSwitchMinChargingTimeParamTypeId, connection->phaseAutoSwitchMinChargingTime()); - thing->setStateValue(ev11SettingsForceChargingResumeParamTypeId, connection->forceChargingResume() == 1 ? true : false); + thing->setStateValue("digitalInputMode", connection->digitalInputMode()); + + if (connection->firmwareRevision() >= "0025") { + thing->setSettingValue("phaseAutoSwitchPause", connection->phaseAutoSwitchPause()); + thing->setSettingValue("phaseAutoSwitchMinChargingTime", connection->phaseAutoSwitchMinChargingTime()); + thing->setSettingValue("forceChargingResume", connection->forceChargingResume() == 1 ? true : false); } } - if (connection->firmwareRevision() >= "0022") { - thing->setStateValue(ev11CurrentPowerStateTypeId, connection->currentPower()); - thing->setStateValue(ev11DigitalInputFlagStateTypeId, QString("0b%1").arg(connection->digitalInputFlag(), 16, 2, QLatin1Char('0'))); + if (connection->firmwareRevision() >= "0025") { + thing->setStateValue("digitalInputFlag", QString("0b%1").arg(connection->digitalInputFlag(), 16, 2, QLatin1Char('0'))); + thing->setStateValue("modeR37", connection->modeR37()); + + // Energy information only available with meter and 0025 + if (thing->thingClassId() == ev11ThingClassId) { + thing->setStateValue("currentPower", connection->currentPower()); + thing->setStateValue("sessionEnergy", connection->powerMeter0()); + thing->setStateValue("totalEnergyConsumed", connection->totalEnergyConsumed()); + thing->setStateValue("currentPowerPhaseA", connection->activePowerL1()); + thing->setStateValue("currentPowerPhaseB", connection->activePowerL2()); + thing->setStateValue("currentPowerPhaseC", connection->activePowerL3()); + thing->setStateValue("voltagePhaseA", connection->voltageL1()); + thing->setStateValue("voltagePhaseB", connection->voltageL2()); + thing->setStateValue("voltagePhaseC", connection->voltageL3()); + thing->setStateValue("currentPhaseA", connection->currentL1()); + thing->setStateValue("currentPhaseB", connection->currentL2()); + thing->setStateValue("currentPhaseC", connection->currentL3()); + } + } else { // In firmware 0019 there is no current power register, depending on the CP state we can assume the car is consuming the amount // we adjusted, if the car is full, the CP state will change back to B2 - - if (connection->chargingState() == PceWallbox::ChargingStateC2 && connection->currentPower() == 0) { - // We are currently chargin, but the wallbox reports 0 W (which is expected), let's calculate the theoretical power... - double assumedCurrentPower = thing->stateValue(ev11PhaseCountStateTypeId).toInt() * 230 * thing->stateValue(ev11MaxChargingCurrentStateTypeId).toDouble(); - qCDebug(dcPcElectric()) << "Assuming current power" << assumedCurrentPower << "W (" << thing->stateValue(ev11PhaseCountStateTypeId).toInt() << "phases * 230 V *" - << thing->stateValue(ev11MaxChargingCurrentStateTypeId).toDouble() << "A )"; - thing->setStateValue(ev11CurrentPowerStateTypeId, assumedCurrentPower); - } else { - thing->setStateValue(ev11CurrentPowerStateTypeId, 0); + if (thing->thingClassId() == ev11ThingClassId) { + thing->setStateValue("sessionEnergy", connection->powerMeter0()); + if (connection->chargingState() == PceWallbox::ChargingStateC2 && connection->currentPower() == 0) { + // We are currently chargin, but the wallbox reports 0 W (which is expected), let's calculate the theoretical power... + double assumedCurrentPower = thing->stateValue("phaseCount").toInt() * 230 * thing->stateValue("maxChargingCurrent").toDouble(); + qCDebug(dcPcElectric()) << "Assuming current power" << assumedCurrentPower << "W (" << thing->stateValue("phaseCount").toInt() << "phases * 230 V *" + << thing->stateValue("maxChargingCurrent").toDouble() << "A )"; + thing->setStateValue("currentPower", assumedCurrentPower); + } else { + thing->setStateValue("currentPower", 0); + } } } }); connect(thing, &Thing::settingChanged, connection, [thing, connection](const ParamTypeId ¶mTypeId, const QVariant &value) { - if (paramTypeId == ev11SettingsLedBrightnessParamTypeId) { + if (paramTypeId == ev11SettingsLedBrightnessParamTypeId || paramTypeId == ev11NoMeterSettingsLedBrightnessParamTypeId) { quint16 percentage = value.toUInt(); qCDebug(dcPcElectric()) << "Setting LED brightness to" << percentage << "%"; @@ -472,7 +543,7 @@ void IntegrationPluginPcElectric::setupConnection(ThingSetupInfo *info) qCDebug(dcPcElectric()) << "Successfully set led brightness to" << percentage << "%"; }); - } else if (paramTypeId == ev11SettingsDigitalInputModeParamTypeId) { + } else if (paramTypeId == ev11SettingsDigitalInputModeParamTypeId || paramTypeId == ev11NoMeterSettingsDigitalInputModeParamTypeId) { QString mode = value.toString(); qCDebug(dcPcElectric()) << "Setting Digital input mode to" << mode; @@ -498,9 +569,9 @@ void IntegrationPluginPcElectric::setupConnection(ThingSetupInfo *info) } qCDebug(dcPcElectric()) << "Successfully set digital input mode to" << modeValue; - thing->setStateValue(ev11DigitalInputModeStateTypeId, modeValue); + thing->setStateValue("digitalInputMode", modeValue); }); - } else if (paramTypeId == ev11SettingsPhaseAutoSwitchPauseParamTypeId) { + } else if (paramTypeId == ev11SettingsPhaseAutoSwitchPauseParamTypeId || paramTypeId == ev11NoMeterSettingsPhaseAutoSwitchPauseParamTypeId) { quint16 registerValue = value.toUInt(); qCDebug(dcPcElectric()) << "Setting phase auto switch pause to" << registerValue << "s"; @@ -513,7 +584,7 @@ void IntegrationPluginPcElectric::setupConnection(ThingSetupInfo *info) qCDebug(dcPcElectric()) << "Successfully set phase auto switch pause to" << registerValue << "s"; }); - } else if (paramTypeId == ev11SettingsPhaseAutoSwitchMinChargingTimeParamTypeId) { + } else if (paramTypeId == ev11SettingsPhaseAutoSwitchMinChargingTimeParamTypeId || paramTypeId == ev11NoMeterSettingsPhaseAutoSwitchMinChargingTimeParamTypeId) { quint16 registerValue = value.toUInt(); qCDebug(dcPcElectric()) << "Setting phase auto switch min charging current" << registerValue << "s"; @@ -525,8 +596,9 @@ void IntegrationPluginPcElectric::setupConnection(ThingSetupInfo *info) } qCDebug(dcPcElectric()) << "Successfully set phase auto switch min charging current to" << registerValue << "s"; + //thing->setSettingValue("phaseAutoSwitchMinChargingTime", registerValue); }); - } else if (paramTypeId == ev11SettingsForceChargingResumeParamTypeId) { + } else if (paramTypeId == ev11SettingsForceChargingResumeParamTypeId || paramTypeId == ev11NoMeterSettingsForceChargingResumeParamTypeId) { quint16 registerValue = value.toBool() ? 1 : 0; qCDebug(dcPcElectric()) << "Setting force charging resume to" << registerValue; @@ -538,6 +610,7 @@ void IntegrationPluginPcElectric::setupConnection(ThingSetupInfo *info) } qCDebug(dcPcElectric()) << "Successfully set force charging resume to" << registerValue; + //thing->setSettingValue("forceChargingResume", registerValue == 1 ? true : false); }); } }); diff --git a/pcelectric/integrationpluginpcelectric.h b/pcelectric/integrationpluginpcelectric.h index cb7a265..c7356a8 100644 --- a/pcelectric/integrationpluginpcelectric.h +++ b/pcelectric/integrationpluginpcelectric.h @@ -66,6 +66,12 @@ private: // (set power to false and then set charging current would always enable charging in the end). QHash m_chargingCurrentStateBuffer; + QHash m_addressParamTypes; + QHash m_hostNameParamTypes; + QHash m_macParamTypes; + QHash m_serialNumberParamTypes; + + void setupConnection(ThingSetupInfo *info); }; diff --git a/pcelectric/integrationpluginpcelectric.json b/pcelectric/integrationpluginpcelectric.json index 8a02115..78b77c8 100644 --- a/pcelectric/integrationpluginpcelectric.json +++ b/pcelectric/integrationpluginpcelectric.json @@ -4,7 +4,7 @@ "id": "aa7ff833-a8e0-45cc-a1ef-65f05871f272", "paramTypes":[ ], "vendors": [ - { + { "name": "PcElectric", "displayName": "PC Electric GmbH", "id": "b365937b-f1d6-46bf-9ff1-e787373b8aa6", @@ -14,7 +14,7 @@ "displayName": "PCE EV11.3", "id": "88d96940-a940-4a07-8176-5e6aba7ca832", "createMethods": ["discovery", "user"], - "interfaces": ["evcharger", "connectable", "networkdevice"], + "interfaces": ["evcharger", "smartmeterconsumer", "connectable", "networkdevice"], "paramTypes": [ { "id": "aa18f1ae-e2d5-4918-9230-ab3f6fb49010", @@ -105,7 +105,6 @@ "id": "ca8d680c-c2f8-456a-a246-9c6cd64e25a7", "name": "connected", "displayName": "Connected", - "displayNameEvent": "Connected changed", "type": "bool", "cached": false, "defaultValue": false @@ -114,7 +113,6 @@ "id": "c12a7a27-fa56-450c-a1ec-717c868554f2", "name": "power", "displayName": "Charging enabled", - "displayNameEvent": "Charging enabled or disabled", "displayNameAction": "Enable or disable charging", "type": "bool", "defaultValue": false, @@ -124,7 +122,6 @@ "id": "b5bbf23c-06db-463b-bb5c-3aea38e18818", "name": "maxChargingCurrent", "displayName": "Maximum charging current", - "displayNameEvent": "Maximum charging current changed", "displayNameAction": "Set maximum charging current", "type": "double", "unit": "Ampere", @@ -138,7 +135,6 @@ "id": "50164bbd-9802-4cf6-82de-626b74293a1b", "name": "pluggedIn", "displayName": "Plugged in", - "displayNameEvent": "Plugged or unplugged", "type": "bool", "defaultValue": false }, @@ -146,7 +142,6 @@ "id": "b7972cd7-471a-46bd-ab99-f49997f12309", "name": "charging", "displayName": "Charging", - "displayNameEvent": "Charging started or stopped", "type": "bool", "defaultValue": false }, @@ -192,7 +187,6 @@ "id": "bb092562-377e-458e-bb8a-735af9036652", "name": "temperature", "displayName": "Onboard temperature", - "displayNameEvent": "Onboard temperature changed", "unit": "DegreeCelsius", "type": "double", "defaultValue": 0, @@ -236,6 +230,307 @@ "defaultValue": 0, "minValue": 0, "maxValue": 3 + }, + { + "id": "d95dc0b1-9701-42e9-bb16-10b9ded0f047", + "name": "modeR37", + "displayName": "R37 mode", + "type": "int", + "defaultValue": 0 + }, + { + "id": "67beed69-4b94-4811-99ae-377b77823e39", + "name": "totalEnergyConsumed", + "displayName": "Total energy consumed", + "type": "double", + "unit": "KiloWattHour", + "defaultValue": 0 + }, + { + "id": "968cd121-3143-459d-a13b-a23ec299a327", + "name": "currentPowerPhaseA", + "displayName": "Current power phase A", + "type": "double", + "unit": "Watt", + "defaultValue": 0 + }, + { + "id": "6397ee1e-846e-4537-b7f2-cc1439610157", + "name": "currentPowerPhaseB", + "displayName": "Current power phase B", + "type": "double", + "unit": "Watt", + "defaultValue": 0 + }, + { + "id": "9422af4a-2ef1-46c7-bca7-2b8f36647433", + "name": "currentPowerPhaseC", + "displayName": "Current power phase C", + "type": "double", + "unit": "Watt", + "defaultValue": 0 + }, + { + "id": "b530105a-8c3a-450e-912b-d10241c0dda1", + "name": "voltagePhaseA", + "displayName": "Voltage phase A", + "type": "double", + "unit": "Volt", + "defaultValue": 0 + }, + { + "id": "7109b933-a55d-46ea-b7a6-30b079c566a4", + "name": "voltagePhaseB", + "displayName": "Voltage phase B", + "type": "double", + "unit": "Volt", + "defaultValue": 0 + }, + { + "id": "0aa1c7f9-006e-497f-97f5-9fd929e56588", + "name": "voltagePhaseC", + "displayName": "Voltage phase C", + "type": "double", + "unit": "Volt", + "defaultValue": 0 + }, + { + "id": "30e28350-40ab-4524-b77d-28218cd7332a", + "name": "currentPhaseA", + "displayName": "Current phase A", + "type": "double", + "unit": "Ampere", + "defaultValue": 0 + }, + { + "id": "0145c095-666f-4a7c-a783-312631d73a33", + "name": "currentPhaseB", + "displayName": "Current phase B", + "type": "double", + "unit": "Ampere", + "defaultValue": 0 + }, + { + "id": "50f6bded-9e2e-4892-9ac7-a1cc279ac0b0", + "name": "currentPhaseC", + "displayName": "Current phase C", + "type": "double", + "unit": "Ampere", + "defaultValue": 0 + } + ] + }, + { + "name": "ev11NoMeter", + "displayName": "PCE EV11.3 (no meter)", + "id": "28b16b8e-9b3f-4afe-a1d9-70ff042b02d0", + "createMethods": ["discovery", "user"], + "interfaces": ["evcharger", "connectable", "networkdevice"], + "paramTypes": [ + { + "id": "eed37247-0ea7-4778-ac7d-d9460b158973", + "name": "address", + "displayName": "Host address", + "type": "QString", + "inputType": "IPv4Address", + "defaultValue": "" + }, + { + "id": "266d3149-c5b5-4606-8bcb-3cdc231e8126", + "name": "hostName", + "displayName": "Host name", + "type": "QString", + "inputType": "TextLine", + "defaultValue": "" + }, + { + "id": "a8260c51-2935-4f54-8d87-c9b7e925055d", + "name":"macAddress", + "displayName": "MAC address", + "type": "QString", + "inputType": "MacAddress", + "defaultValue": "" + }, + { + "id": "175f768e-c141-43ac-ac64-09fbd80a7e28", + "name":"serialNumber", + "displayName": "Serial number", + "type": "QString", + "defaultValue": "" + } + ], + "settingsTypes": [ + { + "id": "5a9917cd-be90-4e8f-993b-8eb24d8acca9", + "name": "ledBrightness", + "displayName": "LED brightness", + "type": "uint", + "minValue": 0, + "maxValue": 100, + "unit": "Percentage", + "defaultValue": 100 + }, + { + "id": "8cb287fa-e4ab-47c3-9f74-47ad3fd96854", + "name": "digitalInputMode", + "displayName": "Digital input mode", + "type": "QString", + "defaultValue": "0 | Charging allowed", + "allowedValues": [ + "0 | Charging allowed", + "1 | Charging allowed inverted", + "2 | PWM and S0 signaling", + "3 | Limit and S0 signaling" + ] + }, + { + "id": "897dbfed-ead0-4ea8-b1b0-8f3b7f834e06", + "name": "phaseAutoSwitchPause", + "displayName": "Phase autoswitch pause", + "type": "int", + "unit": "Seconds", + "minValue": 5, + "maxValue": 600, + "defaultValue": 6 + }, + { + "id": "c50e28f4-c815-4090-b91a-296513e9a5b2", + "name": "phaseAutoSwitchMinChargingTime", + "displayName": "Phase autoswitch minimal charging time", + "type": "int", + "unit": "Seconds", + "minValue": 5, + "maxValue": 600, + "defaultValue": 120 + }, + { + "id": "af4469df-b5dd-48b8-9d1a-83098dcacb3f", + "name": "forceChargingResume", + "displayName": "Force charging resume", + "type": "bool", + "defaultValue": false + } + ], + "stateTypes": [ + { + "id": "d3a811c4-6251-45d7-9b83-913b71d2e9d1", + "name": "connected", + "displayName": "Connected", + "type": "bool", + "cached": false, + "defaultValue": false + }, + { + "id": "9f296c91-db62-44ab-adf3-b126227d2f38", + "name": "power", + "displayName": "Charging enabled", + "displayNameAction": "Enable or disable charging", + "type": "bool", + "defaultValue": false, + "writable": true + }, + { + "id": "b33400a0-a573-4aeb-9c44-f3543e71b1e0", + "name": "maxChargingCurrent", + "displayName": "Maximum charging current", + "displayNameAction": "Set maximum charging current", + "type": "double", + "unit": "Ampere", + "defaultValue": 6, + "minValue": 6, + "maxValue": 16, + "stepSize": 0.01, + "writable": true + }, + { + "id": "000ac265-69dd-4d82-88aa-29f51de10628", + "name": "pluggedIn", + "displayName": "Plugged in", + "type": "bool", + "defaultValue": false + }, + { + "id": "ad3f09e7-60eb-42cd-ad27-1b35b7252c46", + "name": "charging", + "displayName": "Charging", + "type": "bool", + "defaultValue": false + }, + { + "id": "67f6f5f8-969e-40c2-8754-e955fb9f12f3", + "name": "phaseCount", + "displayName": "Active phases", + "type": "uint", + "minValue": 1, + "maxValue": 3, + "defaultValue": 3 + }, + { + "id": "8bc866da-2309-4c89-b7e2-5772c42e2f24", + "name": "desiredPhaseCount", + "displayName": "Desired phase count", + "displayNameAction": "Set desired phase count", + "type": "uint", + "minValue": 1, + "maxValue": 3, + "possibleValues": [1, 3], + "defaultValue": 3, + "writable": true + }, + { + "id": "ad442399-3780-4125-8a63-b594305bfe62", + "name": "temperature", + "displayName": "Onboard temperature", + "unit": "DegreeCelsius", + "type": "double", + "defaultValue": 0, + "suggestLogging": true + }, + { + "id": "c5152a81-7611-4329-ac3b-5db23524a94c", + "name": "error", + "displayName": "Error", + "type": "QString", + "defaultValue": "Kein Fehler", + "suggestLogging": true + }, + { + "id": "2efaa685-fa25-4a66-81eb-e873175705ce", + "name": "currentVersion", + "displayName": "Firmware version", + "type": "QString", + "defaultValue": "" + }, + { + "id": "53dc2a2b-ce62-40ea-aada-2d42831c9910", + "name": "digitalInputFlag", + "displayName": "Digital input flag", + "type": "QString", + "defaultValue": "" + }, + { + "id": "4f654b1e-7b66-4fbc-9e01-bbf981447fc8", + "name": "status", + "displayName": "Status", + "type": "QString", + "defaultValue": "Init", + "suggestLogging": true + }, + { + "id": "967bf32b-1a94-44b5-a76b-98866aa826ef", + "name": "digitalInputMode", + "displayName": "Digital input mode", + "type": "uint", + "defaultValue": 0, + "minValue": 0, + "maxValue": 3 + }, + { + "id": "b667bee2-fd10-4a1d-adbe-11227feefef9", + "name": "modeR37", + "displayName": "R37 mode", + "type": "int", + "defaultValue": 0 } ] } diff --git a/pcelectric/pcelectricdiscovery.cpp b/pcelectric/pcelectricdiscovery.cpp index 76eb9e6..79c8007 100644 --- a/pcelectric/pcelectricdiscovery.cpp +++ b/pcelectric/pcelectricdiscovery.cpp @@ -3,7 +3,7 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) 2013 - 2024, nymea GmbH -* Copyright (C) 2024 - 2025, chargebyte austria GmbH +* Copyright (C) 2024 - 2026, chargebyte austria GmbH * * This file is part of nymea-plugins-modbus. * @@ -72,7 +72,6 @@ void PcElectricDiscovery::checkNetworkDevice(const QHostAddress &address) connect(connection, &EV11ModbusTcpConnection::initializationFinished, this, [=](bool success) { if (!success) { qCDebug(dcPcElectric()) << "Discovery: Initialization failed on" << address.toString() << "Continue..."; - ; cleanupConnection(connection); return; } @@ -98,24 +97,119 @@ void PcElectricDiscovery::checkNetworkDevice(const QHostAddress &address) stream << connection->serialNumber().at(i); quint64 serialNumber = serialRawData.toHex().toULongLong(nullptr, 16); - qCDebug(dcPcElectric()) << "Serial number" << serialRawData.toHex() << serialNumber; + qCDebug(dcPcElectric()) << "Discovery: Serial number" << serialRawData.toHex() << serialNumber; Result result; result.serialNumber = QString::number(serialNumber); result.firmwareRevision = connection->firmwareRevision(); result.address = address; result.registerMacAddress = registerMacAddress; - m_potentialResults.append(result); - } - // Done with this connection - cleanupConnection(connection); + m_runningVerifications.insert(connection, result); + + // This seems to be a PCE wallbox, let's try to figure out if there is meter or not. + + // Depending on the firmware revision read the MODE_DIGITAL_IN and the R37_MODE register, + // decide based on the result which thing class we have discovered. + + // [1] 0019, DI = 0|1 -> no meter + // [2] 0019, DI = 2 -> meter + + // [3] 0025, DI = 0|1, R37 = 0 -> no meter + // [4] 0025, DI = 2|3, R37 = 0 -> meter + // [5] 0025, DI = 1?, R37 = 2 -> no meter + // [6] 0025, DI = 0|1?, R37 = 1 -> meter + + connect(connection, &EV11ModbusTcpConnection::digitalInputModeReadFinished, this, [this, connection](EV11ModbusTcpConnection::DigitalInputMode digitalInputMode) { + qCDebug(dcPcElectric()) << "Discovery: Digital input mode read finished for" << connection->modbusTcpMaster()->hostAddress().toString() << digitalInputMode; + m_runningVerifications[connection].digitalInputMode = digitalInputMode; + + if (connection->firmwareRevision() < "0025") { + if (digitalInputMode == EV11ModbusTcpConnection::DigitalInputModeEnableCharging + || digitalInputMode == EV11ModbusTcpConnection::DigitalInputModeEnableChargingInverted) { + // [1] 0019, DI = 0|1 -> no meter + qCDebug(dcPcElectric()) + << "Discovery: 0019, DI = 0|1 -> The connection does not seem to have a meter" + << connection->modbusTcpMaster()->hostAddress().toString(); + m_runningVerifications[connection].thingClassId = ev11NoMeterThingClassId; + } else { + // [2] 0019, DI = 2 -> meter + qCDebug(dcPcElectric()) << "Discovery: 0019, DI = >1 -> The connection seems to have a meter" << connection->modbusTcpMaster()->hostAddress().toString(); + m_runningVerifications[connection].thingClassId = ev11ThingClassId; + } + + // Done with this connection + m_potentialResults.append(m_runningVerifications.take(connection)); + cleanupConnection(connection); + + } else { + // Firmware version 0.25, read also the R37 register for meter detection + connect(connection, + &EV11ModbusTcpConnection::modeR37ReadFinished, + this, + [this, connection](EV11ModbusTcpConnection::R37Mode r37Mode) { + // We have now the R37 mode and the digital in mode, all informtion fetched + qCDebug(dcPcElectric()) << "Discovery: R37 mode read finished for" << connection->modbusTcpMaster()->hostAddress().toString() << r37Mode; + m_runningVerifications[connection].r37Mode = r37Mode; + + const EV11ModbusTcpConnection::DigitalInputMode digitalInputMode = m_runningVerifications.value(connection).digitalInputMode; + if ((digitalInputMode == EV11ModbusTcpConnection::DigitalInputModeEnableCharging + || digitalInputMode == EV11ModbusTcpConnection::DigitalInputModeEnableChargingInverted) + && r37Mode == EV11ModbusTcpConnection::R37ModeNoMonitoring) { + // [3] 0025, DI = 0|1, R37 = 0 -> no meter + qCDebug(dcPcElectric()) + << "Discovery: 0025, DI = 0|1, R37 = 0 -> The connection does not seem to have a meter" + << connection->modbusTcpMaster()->hostAddress().toString(); + m_runningVerifications[connection].thingClassId = ev11NoMeterThingClassId; + } else if ((digitalInputMode == EV11ModbusTcpConnection::DigitalInputModePwmS0Enabled + || digitalInputMode == EV11ModbusTcpConnection::DigitalInputModeLimitS0Enabled) + && r37Mode == EV11ModbusTcpConnection::R37ModeNoMonitoring) { + // [4] 0025, DI = 2|3, R37 = 0 -> meter + qCDebug(dcPcElectric()) + << "Discovery: 0025, DI = 2|3, R37 = 0 -> The connection seems to have a meter" + << connection->modbusTcpMaster()->hostAddress().toString(); + m_runningVerifications[connection].thingClassId = ev11ThingClassId; + } else if (r37Mode == EV11ModbusTcpConnection::R37ModeDigitalInputMonitoring) { + // [5] 0025, DI = 0|1?, R37 = 2 -> meter + qCDebug(dcPcElectric()) + << "Discovery: 0025, DI = 0|1?, R37 = 1 -> The connection does not seem to have a meter" + << connection->modbusTcpMaster()->hostAddress().toString(); + m_runningVerifications[connection].thingClassId = ev11NoMeterThingClassId; + } else if (r37Mode == EV11ModbusTcpConnection::R37ModeMeterMonitoring) { + // [6] 0025, DI = 0|1?, R37 = 1 -> meter + qCDebug(dcPcElectric()) + << "Discovery: 0025, DI = 0|1?, R37 = 1 -> The connection seems to have a meter" + << connection->modbusTcpMaster()->hostAddress().toString(); + m_runningVerifications[connection].thingClassId = ev11ThingClassId; + } else { + // No defined case, default to ev11 with meter + qCWarning(dcPcElectric()) + << "Discovery: Cannot tell if this connection has a meter. Assuming there is one:" + << m_runningVerifications.value(connection).r37Mode + << m_runningVerifications.value(connection).digitalInputMode + << connection->modbusTcpMaster()->hostAddress().toString(); + + m_runningVerifications[connection].thingClassId = ev11ThingClassId; + } + + // Done with this connection + m_potentialResults.append(m_runningVerifications.take(connection)); + cleanupConnection(connection); + }); + + // Get R37 + connection->updateModeR37(); + } + }); + + // Get DI + connection->updateDigitalInputMode(); + } }); // Initializing... if (!connection->initialize()) { qCDebug(dcPcElectric()) << "Discovery: Unable to initialize connection on" << address.toString() << "Continue..."; - ; cleanupConnection(connection); } }); @@ -124,7 +218,6 @@ void PcElectricDiscovery::checkNetworkDevice(const QHostAddress &address) connect(connection->modbusTcpMaster(), &ModbusTcpMaster::connectionErrorOccurred, this, [=](QModbusDevice::Error error) { if (error != QModbusDevice::NoError) { qCDebug(dcPcElectric()) << "Discovery: Connection error on" << address.toString() << "Continue..."; - ; cleanupConnection(connection); } }); @@ -132,7 +225,6 @@ void PcElectricDiscovery::checkNetworkDevice(const QHostAddress &address) // If check reachability failed...skip this host... connect(connection, &EV11ModbusTcpConnection::checkReachabilityFailed, this, [=]() { qCDebug(dcPcElectric()) << "Discovery: Check reachability failed on" << address.toString() << "Continue..."; - ; cleanupConnection(connection); }); @@ -143,6 +235,8 @@ void PcElectricDiscovery::checkNetworkDevice(const QHostAddress &address) void PcElectricDiscovery::cleanupConnection(EV11ModbusTcpConnection *connection) { m_connections.removeAll(connection); + m_runningVerifications.remove(connection); + connection->disconnectDevice(); connection->deleteLater(); } @@ -159,11 +253,14 @@ void PcElectricDiscovery::finishDiscovery() if (networkDeviceInfo.macAddressInfos().hasMacAddress(result.registerMacAddress)) { qCInfo(dcPcElectric()) << "Discovery: --> Found EV11.3" + << (result.thingClassId == ev11NoMeterThingClassId ? "(No meter)" : "with meter") << "Serial number:" << result.serialNumber << "Firmware revision:" << result.firmwareRevision - << result.networkDeviceInfo; + << result.networkDeviceInfo + << result.digitalInputMode + << result.r37Mode; m_results.append(result); } else { qCWarning(dcPcElectric()) diff --git a/pcelectric/pcelectricdiscovery.h b/pcelectric/pcelectricdiscovery.h index 62fd40c..2c4d4fa 100644 --- a/pcelectric/pcelectricdiscovery.h +++ b/pcelectric/pcelectricdiscovery.h @@ -3,7 +3,7 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) 2013 - 2024, nymea GmbH -* Copyright (C) 2024 - 2025, chargebyte austria GmbH +* Copyright (C) 2024 - 2026, chargebyte austria GmbH * * This file is part of nymea-plugins-modbus. * @@ -39,11 +39,14 @@ public: typedef struct Result { + ThingClassId thingClassId; QString serialNumber; QString firmwareRevision; QHostAddress address; MacAddress registerMacAddress; NetworkDeviceInfo networkDeviceInfo; + EV11ModbusTcpConnection::DigitalInputMode digitalInputMode; + EV11ModbusTcpConnection::R37Mode r37Mode = EV11ModbusTcpConnection::R37ModeNoMonitoring; } Result; QList results() const; @@ -66,6 +69,8 @@ private: QList m_results; + QHash m_runningVerifications; + void checkNetworkDevice(const QHostAddress &address); void cleanupConnection(EV11ModbusTcpConnection *connection); diff --git a/pcelectric/pcewallbox.cpp b/pcelectric/pcewallbox.cpp index f44267d..0e14cba 100644 --- a/pcelectric/pcewallbox.cpp +++ b/pcelectric/pcewallbox.cpp @@ -189,7 +189,7 @@ bool PceWallbox::update() const QVector values = unit.values(); processLedBrightnessRegisterValues(values); - if (firmwareRevision() < "0022") + if (firmwareRevision() < "0025") emit updateFinished(); QTimer::singleShot(0, this, &PceWallbox::sendNextRequest); @@ -198,11 +198,11 @@ bool PceWallbox::update() enqueueRequest(reply); } - if (firmwareRevision() < "0022") + if (firmwareRevision() < "0025") return true; // --------------------------------------------------------------------------------------- - // Registers since 0022 (V 0.22) + // Registers since 0025 (V 0.25) // Make sure we only have one update 2 call in the queue bool update2Queued = false; @@ -266,7 +266,7 @@ bool PceWallbox::update() enqueueRequest(reply); } - // Phase auto switch pause (since firmware version 0.22 ...) + // Phase auto switch pause (since firmware version 0.25 ...) bool phaseAutoSwitchMinChargingTimeQueued = false; foreach (QueuedModbusReply *r, m_readQueue) { if (r->dataUnit().startAddress() == phaseAutoSwitchMinChargingTimeDataUnit().startAddress()) { @@ -297,7 +297,7 @@ bool PceWallbox::update() enqueueRequest(reply); } - // Phase auto switch pause (since firmware version 0.22 ...) + // Phase auto switch pause (since firmware version 0.25 ...) bool forceChargingResumeQueued = false; foreach (QueuedModbusReply *r, m_readQueue) { if (r->dataUnit().startAddress() == forceChargingResumeDataUnit().startAddress()) { diff --git a/pcelectric/translations/aa7ff833-a8e0-45cc-a1ef-65f05871f272-de_DE.ts b/pcelectric/translations/aa7ff833-a8e0-45cc-a1ef-65f05871f272-de_DE.ts index a2bb537..b1958aa 100644 --- a/pcelectric/translations/aa7ff833-a8e0-45cc-a1ef-65f05871f272-de_DE.ts +++ b/pcelectric/translations/aa7ff833-a8e0-45cc-a1ef-65f05871f272-de_DE.ts @@ -4,7 +4,7 @@ IntegrationPluginPcElectric - + The network device discovery is not available. Die Netzwerk Suche ist nicht verfügbar. @@ -12,192 +12,366 @@ PcElectric - + + 1 - The name of a possible value of StateType {d91f7d96-2599-400a-91da-d164477098b7} of ThingClass ev11 + The name of a possible value of StateType {8bc866da-2309-4c89-b7e2-5772c42e2f24} of ThingClass ev11NoMeter +---------- +The name of a possible value of StateType {d91f7d96-2599-400a-91da-d164477098b7} of ThingClass ev11 1 - + + 3 - The name of a possible value of StateType {d91f7d96-2599-400a-91da-d164477098b7} of ThingClass ev11 + The name of a possible value of StateType {8bc866da-2309-4c89-b7e2-5772c42e2f24} of ThingClass ev11NoMeter +---------- +The name of a possible value of StateType {d91f7d96-2599-400a-91da-d164477098b7} of ThingClass ev11 3 - + + Active phases - The name of the StateType ({bca88c23-e940-40c1-afca-eb511fd17aab}) of ThingClass ev11 + The name of the StateType ({67f6f5f8-969e-40c2-8754-e955fb9f12f3}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({bca88c23-e940-40c1-afca-eb511fd17aab}) of ThingClass ev11 Aktive Phasen - + Active power The name of the StateType ({bbe97e15-8fa7-42e0-9023-1d41425ccbee}) of ThingClass ev11 Aktive Leistung - + + Charging - The name of the StateType ({b7972cd7-471a-46bd-ab99-f49997f12309}) of ThingClass ev11 + The name of the StateType ({ad3f09e7-60eb-42cd-ad27-1b35b7252c46}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({b7972cd7-471a-46bd-ab99-f49997f12309}) of ThingClass ev11 Lädt - - + + + + Charging enabled - The name of the ParamType (ThingClass: ev11, ActionType: power, ID: {c12a7a27-fa56-450c-a1ec-717c868554f2}) + The name of the ParamType (ThingClass: ev11NoMeter, ActionType: power, ID: {9f296c91-db62-44ab-adf3-b126227d2f38}) +---------- +The name of the StateType ({9f296c91-db62-44ab-adf3-b126227d2f38}) of ThingClass ev11NoMeter +---------- +The name of the ParamType (ThingClass: ev11, ActionType: power, ID: {c12a7a27-fa56-450c-a1ec-717c868554f2}) ---------- The name of the StateType ({c12a7a27-fa56-450c-a1ec-717c868554f2}) of ThingClass ev11 Laden eingeschalten - + + Connected - The name of the StateType ({ca8d680c-c2f8-456a-a246-9c6cd64e25a7}) of ThingClass ev11 + The name of the StateType ({d3a811c4-6251-45d7-9b83-913b71d2e9d1}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({ca8d680c-c2f8-456a-a246-9c6cd64e25a7}) of ThingClass ev11 Verbunden - - + + Current phase A + The name of the StateType ({30e28350-40ab-4524-b77d-28218cd7332a}) of ThingClass ev11 + Stromstärke Phase A + + + + Current phase B + The name of the StateType ({0145c095-666f-4a7c-a783-312631d73a33}) of ThingClass ev11 + Stromstärke Phase B + + + + Current phase C + The name of the StateType ({50f6bded-9e2e-4892-9ac7-a1cc279ac0b0}) of ThingClass ev11 + Stromstärke Phase C + + + + Current power phase A + The name of the StateType ({968cd121-3143-459d-a13b-a23ec299a327}) of ThingClass ev11 + Leistung Phase A + + + + Current power phase B + The name of the StateType ({6397ee1e-846e-4537-b7f2-cc1439610157}) of ThingClass ev11 + Leistung Phase B + + + + Current power phase C + The name of the StateType ({9422af4a-2ef1-46c7-bca7-2b8f36647433}) of ThingClass ev11 + Leistung Phase C + + + + + + Desired phase count - The name of the ParamType (ThingClass: ev11, ActionType: desiredPhaseCount, ID: {d91f7d96-2599-400a-91da-d164477098b7}) + The name of the ParamType (ThingClass: ev11NoMeter, ActionType: desiredPhaseCount, ID: {8bc866da-2309-4c89-b7e2-5772c42e2f24}) +---------- +The name of the StateType ({8bc866da-2309-4c89-b7e2-5772c42e2f24}) of ThingClass ev11NoMeter +---------- +The name of the ParamType (ThingClass: ev11, ActionType: desiredPhaseCount, ID: {d91f7d96-2599-400a-91da-d164477098b7}) ---------- The name of the StateType ({d91f7d96-2599-400a-91da-d164477098b7}) of ThingClass ev11 Gewünschte Phasenanzahl - + + Digital input flag - The name of the StateType ({c606c59b-6b3e-4de8-aaf8-aea4742200d9}) of ThingClass ev11 + The name of the StateType ({53dc2a2b-ce62-40ea-aada-2d42831c9910}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({c606c59b-6b3e-4de8-aaf8-aea4742200d9}) of ThingClass ev11 Digitale Eingänge Werte - + + + + Digital input mode - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {930e0bf9-0038-436d-9eae-5c0f1cb28825}) + The name of the StateType ({967bf32b-1a94-44b5-a76b-98866aa826ef}) of ThingClass ev11NoMeter +---------- +The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {8cb287fa-e4ab-47c3-9f74-47ad3fd96854}) +---------- +The name of the StateType ({63639947-5e91-442f-858b-378b5bc5f1bc}) of ThingClass ev11 +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {930e0bf9-0038-436d-9eae-5c0f1cb28825}) Digitale Eingänge Modi - + + Enable or disable charging - The name of the ActionType ({c12a7a27-fa56-450c-a1ec-717c868554f2}) of ThingClass ev11 + The name of the ActionType ({9f296c91-db62-44ab-adf3-b126227d2f38}) of ThingClass ev11NoMeter +---------- +The name of the ActionType ({c12a7a27-fa56-450c-a1ec-717c868554f2}) of ThingClass ev11 Laden starten/stoppen - + + Error - The name of the StateType ({2ea1a53f-b2b0-452d-8060-cdb114db05a7}) of ThingClass ev11 + The name of the StateType ({c5152a81-7611-4329-ac3b-5db23524a94c}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({2ea1a53f-b2b0-452d-8060-cdb114db05a7}) of ThingClass ev11 Fehler - + + Firmware version - The name of the StateType ({142b4276-e2e9-4149-adc4-89d9d3e31117}) of ThingClass ev11 + The name of the StateType ({2efaa685-fa25-4a66-81eb-e873175705ce}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({142b4276-e2e9-4149-adc4-89d9d3e31117}) of ThingClass ev11 Firmware Version - + + Force charging resume - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {5cece964-fe64-4e26-86ee-ba8fbbedd523}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {af4469df-b5dd-48b8-9d1a-83098dcacb3f}) +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {5cece964-fe64-4e26-86ee-ba8fbbedd523}) Erzwinge Ladefortsezung - + + Host address - The name of the ParamType (ThingClass: ev11, Type: thing, ID: {aa18f1ae-e2d5-4918-9230-ab3f6fb49010}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: thing, ID: {eed37247-0ea7-4778-ac7d-d9460b158973}) +---------- +The name of the ParamType (ThingClass: ev11, Type: thing, ID: {aa18f1ae-e2d5-4918-9230-ab3f6fb49010}) IP Adresse - + + Host name - The name of the ParamType (ThingClass: ev11, Type: thing, ID: {a8b81e4a-f4ec-479b-9cb8-19147759c4cc}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: thing, ID: {266d3149-c5b5-4606-8bcb-3cdc231e8126}) +---------- +The name of the ParamType (ThingClass: ev11, Type: thing, ID: {a8b81e4a-f4ec-479b-9cb8-19147759c4cc}) Hostname - + + Onboard temperature - The name of the StateType ({bb092562-377e-458e-bb8a-735af9036652}) of ThingClass ev11 + The name of the StateType ({ad442399-3780-4125-8a63-b594305bfe62}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({bb092562-377e-458e-bb8a-735af9036652}) of ThingClass ev11 Temperatur - + PCE EV11.3 The name of the ThingClass ({88d96940-a940-4a07-8176-5e6aba7ca832}) PCE EV11.3 - + + + Status + The name of the StateType ({4f654b1e-7b66-4fbc-9e01-bbf981447fc8}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({a10967b9-4a32-49cf-a6ae-885b3153d601}) of ThingClass ev11 + Status + + + + Total energy consumed + The name of the StateType ({67beed69-4b94-4811-99ae-377b77823e39}) of ThingClass ev11 + Gesamter Energieverbrauch + + + + Voltage phase A + The name of the StateType ({b530105a-8c3a-450e-912b-d10241c0dda1}) of ThingClass ev11 + Spannung Phase A + + + + Voltage phase B + The name of the StateType ({7109b933-a55d-46ea-b7a6-30b079c566a4}) of ThingClass ev11 + Spannung Phase B + + + + Voltage phase C + The name of the StateType ({0aa1c7f9-006e-497f-97f5-9fd929e56588}) of ThingClass ev11 + Spannung Phase C + + + + LED brightness - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {3a1329a2-84cc-47b9-a6c2-e96fdfd0c454}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {5a9917cd-be90-4e8f-993b-8eb24d8acca9}) +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {3a1329a2-84cc-47b9-a6c2-e96fdfd0c454}) LED Helligkeit - + + MAC address - The name of the ParamType (ThingClass: ev11, Type: thing, ID: {0a3f8d12-9d33-4ae2-b763-9568f32e8da1}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: thing, ID: {a8260c51-2935-4f54-8d87-c9b7e925055d}) +---------- +The name of the ParamType (ThingClass: ev11, Type: thing, ID: {0a3f8d12-9d33-4ae2-b763-9568f32e8da1}) MAC Adresse - - + + + + Maximum charging current - The name of the ParamType (ThingClass: ev11, ActionType: maxChargingCurrent, ID: {b5bbf23c-06db-463b-bb5c-3aea38e18818}) + The name of the ParamType (ThingClass: ev11NoMeter, ActionType: maxChargingCurrent, ID: {b33400a0-a573-4aeb-9c44-f3543e71b1e0}) +---------- +The name of the StateType ({b33400a0-a573-4aeb-9c44-f3543e71b1e0}) of ThingClass ev11NoMeter +---------- +The name of the ParamType (ThingClass: ev11, ActionType: maxChargingCurrent, ID: {b5bbf23c-06db-463b-bb5c-3aea38e18818}) ---------- The name of the StateType ({b5bbf23c-06db-463b-bb5c-3aea38e18818}) of ThingClass ev11 Maximaler Ladestrom - + PC Electric The name of the plugin PcElectric ({aa7ff833-a8e0-45cc-a1ef-65f05871f272}) PC Electric - + PC Electric GmbH The name of the vendor ({b365937b-f1d6-46bf-9ff1-e787373b8aa6}) PC Electric GmbH - + + PCE EV11.3 (no meter) + The name of the ThingClass ({28b16b8e-9b3f-4afe-a1d9-70ff042b02d0}) + PCE EV11.3 (Ohne Zähler) + + + + Phase autoswitch minimal charging time - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {7b0b5375-7980-4f99-9542-1dcb0390fb22}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {c50e28f4-c815-4090-b91a-296513e9a5b2}) +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {7b0b5375-7980-4f99-9542-1dcb0390fb22}) Mindestladezeit nach Phasenumschaltung - + + Phase autoswitch pause - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {a5354c66-0a7a-44a8-bea0-0305b91b63cf}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {897dbfed-ead0-4ea8-b1b0-8f3b7f834e06}) +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {a5354c66-0a7a-44a8-bea0-0305b91b63cf}) Pause nach Phasenumschaltung - + + Plugged in - The name of the StateType ({50164bbd-9802-4cf6-82de-626b74293a1b}) of ThingClass ev11 + The name of the StateType ({000ac265-69dd-4d82-88aa-29f51de10628}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({50164bbd-9802-4cf6-82de-626b74293a1b}) of ThingClass ev11 Angesteckt - + + + R37 mode + The name of the StateType ({b667bee2-fd10-4a1d-adbe-11227feefef9}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({d95dc0b1-9701-42e9-bb16-10b9ded0f047}) of ThingClass ev11 + R37 Modus + + + + Serial number - The name of the ParamType (ThingClass: ev11, Type: thing, ID: {db834ca7-934a-473b-8bd8-c641ff0ea879}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: thing, ID: {175f768e-c141-43ac-ac64-09fbd80a7e28}) +---------- +The name of the ParamType (ThingClass: ev11, Type: thing, ID: {db834ca7-934a-473b-8bd8-c641ff0ea879}) Seriennummer - + Session energy The name of the StateType ({3da3ee80-e9e7-4237-85a6-b4adcb2f483b}) of ThingClass ev11 Geladene Energie - + + Set desired phase count - The name of the ActionType ({d91f7d96-2599-400a-91da-d164477098b7}) of ThingClass ev11 + The name of the ActionType ({8bc866da-2309-4c89-b7e2-5772c42e2f24}) of ThingClass ev11NoMeter +---------- +The name of the ActionType ({d91f7d96-2599-400a-91da-d164477098b7}) of ThingClass ev11 Setze gewünschte Phasenanzahl - + + Set maximum charging current - The name of the ActionType ({b5bbf23c-06db-463b-bb5c-3aea38e18818}) of ThingClass ev11 + The name of the ActionType ({b33400a0-a573-4aeb-9c44-f3543e71b1e0}) of ThingClass ev11NoMeter +---------- +The name of the ActionType ({b5bbf23c-06db-463b-bb5c-3aea38e18818}) of ThingClass ev11 Setze maximalen Ladestrom diff --git a/pcelectric/translations/aa7ff833-a8e0-45cc-a1ef-65f05871f272-en_US.ts b/pcelectric/translations/aa7ff833-a8e0-45cc-a1ef-65f05871f272-en_US.ts index ec65d4b..eea351d 100644 --- a/pcelectric/translations/aa7ff833-a8e0-45cc-a1ef-65f05871f272-en_US.ts +++ b/pcelectric/translations/aa7ff833-a8e0-45cc-a1ef-65f05871f272-en_US.ts @@ -4,7 +4,7 @@ IntegrationPluginPcElectric - + The network device discovery is not available. @@ -12,192 +12,366 @@ PcElectric - + + 1 - The name of a possible value of StateType {d91f7d96-2599-400a-91da-d164477098b7} of ThingClass ev11 + The name of a possible value of StateType {8bc866da-2309-4c89-b7e2-5772c42e2f24} of ThingClass ev11NoMeter +---------- +The name of a possible value of StateType {d91f7d96-2599-400a-91da-d164477098b7} of ThingClass ev11 - + + 3 - The name of a possible value of StateType {d91f7d96-2599-400a-91da-d164477098b7} of ThingClass ev11 + The name of a possible value of StateType {8bc866da-2309-4c89-b7e2-5772c42e2f24} of ThingClass ev11NoMeter +---------- +The name of a possible value of StateType {d91f7d96-2599-400a-91da-d164477098b7} of ThingClass ev11 - + + Active phases - The name of the StateType ({bca88c23-e940-40c1-afca-eb511fd17aab}) of ThingClass ev11 + The name of the StateType ({67f6f5f8-969e-40c2-8754-e955fb9f12f3}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({bca88c23-e940-40c1-afca-eb511fd17aab}) of ThingClass ev11 - + Active power The name of the StateType ({bbe97e15-8fa7-42e0-9023-1d41425ccbee}) of ThingClass ev11 - + + Charging - The name of the StateType ({b7972cd7-471a-46bd-ab99-f49997f12309}) of ThingClass ev11 + The name of the StateType ({ad3f09e7-60eb-42cd-ad27-1b35b7252c46}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({b7972cd7-471a-46bd-ab99-f49997f12309}) of ThingClass ev11 - - + + + + Charging enabled - The name of the ParamType (ThingClass: ev11, ActionType: power, ID: {c12a7a27-fa56-450c-a1ec-717c868554f2}) + The name of the ParamType (ThingClass: ev11NoMeter, ActionType: power, ID: {9f296c91-db62-44ab-adf3-b126227d2f38}) +---------- +The name of the StateType ({9f296c91-db62-44ab-adf3-b126227d2f38}) of ThingClass ev11NoMeter +---------- +The name of the ParamType (ThingClass: ev11, ActionType: power, ID: {c12a7a27-fa56-450c-a1ec-717c868554f2}) ---------- The name of the StateType ({c12a7a27-fa56-450c-a1ec-717c868554f2}) of ThingClass ev11 - + + Connected - The name of the StateType ({ca8d680c-c2f8-456a-a246-9c6cd64e25a7}) of ThingClass ev11 + The name of the StateType ({d3a811c4-6251-45d7-9b83-913b71d2e9d1}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({ca8d680c-c2f8-456a-a246-9c6cd64e25a7}) of ThingClass ev11 - - + + Current phase A + The name of the StateType ({30e28350-40ab-4524-b77d-28218cd7332a}) of ThingClass ev11 + + + + + Current phase B + The name of the StateType ({0145c095-666f-4a7c-a783-312631d73a33}) of ThingClass ev11 + + + + + Current phase C + The name of the StateType ({50f6bded-9e2e-4892-9ac7-a1cc279ac0b0}) of ThingClass ev11 + + + + + Current power phase A + The name of the StateType ({968cd121-3143-459d-a13b-a23ec299a327}) of ThingClass ev11 + + + + + Current power phase B + The name of the StateType ({6397ee1e-846e-4537-b7f2-cc1439610157}) of ThingClass ev11 + + + + + Current power phase C + The name of the StateType ({9422af4a-2ef1-46c7-bca7-2b8f36647433}) of ThingClass ev11 + + + + + + + Desired phase count - The name of the ParamType (ThingClass: ev11, ActionType: desiredPhaseCount, ID: {d91f7d96-2599-400a-91da-d164477098b7}) + The name of the ParamType (ThingClass: ev11NoMeter, ActionType: desiredPhaseCount, ID: {8bc866da-2309-4c89-b7e2-5772c42e2f24}) +---------- +The name of the StateType ({8bc866da-2309-4c89-b7e2-5772c42e2f24}) of ThingClass ev11NoMeter +---------- +The name of the ParamType (ThingClass: ev11, ActionType: desiredPhaseCount, ID: {d91f7d96-2599-400a-91da-d164477098b7}) ---------- The name of the StateType ({d91f7d96-2599-400a-91da-d164477098b7}) of ThingClass ev11 - + + Digital input flag - The name of the StateType ({c606c59b-6b3e-4de8-aaf8-aea4742200d9}) of ThingClass ev11 + The name of the StateType ({53dc2a2b-ce62-40ea-aada-2d42831c9910}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({c606c59b-6b3e-4de8-aaf8-aea4742200d9}) of ThingClass ev11 - + + + + Digital input mode - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {930e0bf9-0038-436d-9eae-5c0f1cb28825}) + The name of the StateType ({967bf32b-1a94-44b5-a76b-98866aa826ef}) of ThingClass ev11NoMeter +---------- +The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {8cb287fa-e4ab-47c3-9f74-47ad3fd96854}) +---------- +The name of the StateType ({63639947-5e91-442f-858b-378b5bc5f1bc}) of ThingClass ev11 +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {930e0bf9-0038-436d-9eae-5c0f1cb28825}) - + + Enable or disable charging - The name of the ActionType ({c12a7a27-fa56-450c-a1ec-717c868554f2}) of ThingClass ev11 + The name of the ActionType ({9f296c91-db62-44ab-adf3-b126227d2f38}) of ThingClass ev11NoMeter +---------- +The name of the ActionType ({c12a7a27-fa56-450c-a1ec-717c868554f2}) of ThingClass ev11 - + + Error - The name of the StateType ({2ea1a53f-b2b0-452d-8060-cdb114db05a7}) of ThingClass ev11 + The name of the StateType ({c5152a81-7611-4329-ac3b-5db23524a94c}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({2ea1a53f-b2b0-452d-8060-cdb114db05a7}) of ThingClass ev11 - + + Firmware version - The name of the StateType ({142b4276-e2e9-4149-adc4-89d9d3e31117}) of ThingClass ev11 + The name of the StateType ({2efaa685-fa25-4a66-81eb-e873175705ce}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({142b4276-e2e9-4149-adc4-89d9d3e31117}) of ThingClass ev11 - + + Force charging resume - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {5cece964-fe64-4e26-86ee-ba8fbbedd523}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {af4469df-b5dd-48b8-9d1a-83098dcacb3f}) +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {5cece964-fe64-4e26-86ee-ba8fbbedd523}) - + + Host address - The name of the ParamType (ThingClass: ev11, Type: thing, ID: {aa18f1ae-e2d5-4918-9230-ab3f6fb49010}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: thing, ID: {eed37247-0ea7-4778-ac7d-d9460b158973}) +---------- +The name of the ParamType (ThingClass: ev11, Type: thing, ID: {aa18f1ae-e2d5-4918-9230-ab3f6fb49010}) - + + Host name - The name of the ParamType (ThingClass: ev11, Type: thing, ID: {a8b81e4a-f4ec-479b-9cb8-19147759c4cc}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: thing, ID: {266d3149-c5b5-4606-8bcb-3cdc231e8126}) +---------- +The name of the ParamType (ThingClass: ev11, Type: thing, ID: {a8b81e4a-f4ec-479b-9cb8-19147759c4cc}) - + + Onboard temperature - The name of the StateType ({bb092562-377e-458e-bb8a-735af9036652}) of ThingClass ev11 + The name of the StateType ({ad442399-3780-4125-8a63-b594305bfe62}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({bb092562-377e-458e-bb8a-735af9036652}) of ThingClass ev11 - + PCE EV11.3 The name of the ThingClass ({88d96940-a940-4a07-8176-5e6aba7ca832}) - + + + Status + The name of the StateType ({4f654b1e-7b66-4fbc-9e01-bbf981447fc8}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({a10967b9-4a32-49cf-a6ae-885b3153d601}) of ThingClass ev11 + + + + + Total energy consumed + The name of the StateType ({67beed69-4b94-4811-99ae-377b77823e39}) of ThingClass ev11 + + + + + Voltage phase A + The name of the StateType ({b530105a-8c3a-450e-912b-d10241c0dda1}) of ThingClass ev11 + + + + + Voltage phase B + The name of the StateType ({7109b933-a55d-46ea-b7a6-30b079c566a4}) of ThingClass ev11 + + + + + Voltage phase C + The name of the StateType ({0aa1c7f9-006e-497f-97f5-9fd929e56588}) of ThingClass ev11 + + + + + LED brightness - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {3a1329a2-84cc-47b9-a6c2-e96fdfd0c454}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {5a9917cd-be90-4e8f-993b-8eb24d8acca9}) +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {3a1329a2-84cc-47b9-a6c2-e96fdfd0c454}) - + + MAC address - The name of the ParamType (ThingClass: ev11, Type: thing, ID: {0a3f8d12-9d33-4ae2-b763-9568f32e8da1}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: thing, ID: {a8260c51-2935-4f54-8d87-c9b7e925055d}) +---------- +The name of the ParamType (ThingClass: ev11, Type: thing, ID: {0a3f8d12-9d33-4ae2-b763-9568f32e8da1}) - - + + + + Maximum charging current - The name of the ParamType (ThingClass: ev11, ActionType: maxChargingCurrent, ID: {b5bbf23c-06db-463b-bb5c-3aea38e18818}) + The name of the ParamType (ThingClass: ev11NoMeter, ActionType: maxChargingCurrent, ID: {b33400a0-a573-4aeb-9c44-f3543e71b1e0}) +---------- +The name of the StateType ({b33400a0-a573-4aeb-9c44-f3543e71b1e0}) of ThingClass ev11NoMeter +---------- +The name of the ParamType (ThingClass: ev11, ActionType: maxChargingCurrent, ID: {b5bbf23c-06db-463b-bb5c-3aea38e18818}) ---------- The name of the StateType ({b5bbf23c-06db-463b-bb5c-3aea38e18818}) of ThingClass ev11 - + PC Electric The name of the plugin PcElectric ({aa7ff833-a8e0-45cc-a1ef-65f05871f272}) - + PC Electric GmbH The name of the vendor ({b365937b-f1d6-46bf-9ff1-e787373b8aa6}) - + + PCE EV11.3 (no meter) + The name of the ThingClass ({28b16b8e-9b3f-4afe-a1d9-70ff042b02d0}) + + + + + Phase autoswitch minimal charging time - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {7b0b5375-7980-4f99-9542-1dcb0390fb22}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {c50e28f4-c815-4090-b91a-296513e9a5b2}) +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {7b0b5375-7980-4f99-9542-1dcb0390fb22}) - + + Phase autoswitch pause - The name of the ParamType (ThingClass: ev11, Type: settings, ID: {a5354c66-0a7a-44a8-bea0-0305b91b63cf}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: settings, ID: {897dbfed-ead0-4ea8-b1b0-8f3b7f834e06}) +---------- +The name of the ParamType (ThingClass: ev11, Type: settings, ID: {a5354c66-0a7a-44a8-bea0-0305b91b63cf}) - + + Plugged in - The name of the StateType ({50164bbd-9802-4cf6-82de-626b74293a1b}) of ThingClass ev11 + The name of the StateType ({000ac265-69dd-4d82-88aa-29f51de10628}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({50164bbd-9802-4cf6-82de-626b74293a1b}) of ThingClass ev11 - + + + R37 mode + The name of the StateType ({b667bee2-fd10-4a1d-adbe-11227feefef9}) of ThingClass ev11NoMeter +---------- +The name of the StateType ({d95dc0b1-9701-42e9-bb16-10b9ded0f047}) of ThingClass ev11 + + + + + Serial number - The name of the ParamType (ThingClass: ev11, Type: thing, ID: {db834ca7-934a-473b-8bd8-c641ff0ea879}) + The name of the ParamType (ThingClass: ev11NoMeter, Type: thing, ID: {175f768e-c141-43ac-ac64-09fbd80a7e28}) +---------- +The name of the ParamType (ThingClass: ev11, Type: thing, ID: {db834ca7-934a-473b-8bd8-c641ff0ea879}) - + Session energy The name of the StateType ({3da3ee80-e9e7-4237-85a6-b4adcb2f483b}) of ThingClass ev11 - + + Set desired phase count - The name of the ActionType ({d91f7d96-2599-400a-91da-d164477098b7}) of ThingClass ev11 + The name of the ActionType ({8bc866da-2309-4c89-b7e2-5772c42e2f24}) of ThingClass ev11NoMeter +---------- +The name of the ActionType ({d91f7d96-2599-400a-91da-d164477098b7}) of ThingClass ev11 - + + Set maximum charging current - The name of the ActionType ({b5bbf23c-06db-463b-bb5c-3aea38e18818}) of ThingClass ev11 + The name of the ActionType ({b33400a0-a573-4aeb-9c44-f3543e71b1e0}) of ThingClass ev11NoMeter +---------- +The name of the ActionType ({b5bbf23c-06db-463b-bb5c-3aea38e18818}) of ThingClass ev11