Use Outlet in OCPP Meter Value's Location for Energy.Active.Import.Register
MODIFY
src/server/ocpp/utils/OCPPUtils.ts
src/server/ocpp/utils/OCPPUtils.ts
import { ChargingProfile, ChargingProfilePurposeType } from '../../../types/ChargingProfile';
import ChargingStation, { ChargingStationCapabilities, ChargingStationTemplate, ChargingStationTemplateConnector, Command, Connector, ConnectorCurrentLimitSource, CurrentType, OcppParameter, SiteAreaLimitSource, StaticLimitAmps, TemplateUpdateResult } from '../../../types/ChargingStation';
import { OCPPChangeConfigurationResponse, OCPPChargingProfileStatus, OCPPConfigurationStatus } from '../../../types/ocpp/OCPPClient';
-import { OCPPMeasurand, OCPPNormalizedMeterValue, OCPPPhase, OCPPReadingContext, OCPPStopTransactionRequestExtended, OCPPUnitOfMeasure, OCPPValueFormat } from '../../../types/ocpp/OCPPServer';
+import { OCPPLocation, OCPPMeasurand, OCPPNormalizedMeterValue, OCPPPhase, OCPPReadingContext, OCPPStopTransactionRequestExtended, OCPPUnitOfMeasure, OCPPValueFormat } from '../../../types/ocpp/OCPPServer';
import Tenant, { TenantComponents } from '../../../types/Tenant';
import Transaction, { InactivityStatus } from '../../../types/Transaction';
@@ -1166,6 +1166,7 @@ export default class OCPPUtils {
public static isEnergyActiveImportMeterValue(meterValue: OCPPNormalizedMeterValue): boolean {
return !meterValue.attribute ||
(meterValue.attribute.measurand === OCPPMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER &&
+ meterValue.attribute.location === OCPPLocation.OUTLET &&
(meterValue.attribute.context === OCPPReadingContext.SAMPLE_PERIODIC ||
meterValue.attribute.context === OCPPReadingContext.TRANSACTION_END ||
meterValue.attribute.context === OCPPReadingContext.SAMPLE_CLOCK));

Use Outlet in OCPP Meter Value's Location for Energy.Active.Import.Register