diff --git a/app/components/evse.tsx b/app/components/evse.tsx index 36ce413..1ef8d94 100644 --- a/app/components/evse.tsx +++ b/app/components/evse.tsx @@ -16,7 +16,8 @@ import { SendStatusNotification } from '../service/ocpp/command/status-notificat import Transaction from './transaction'; import MeterValue from './meter.value'; -const defaultValue = 'ws://localhost:8080/ocpp/JwNpTpPxPm/CHR202305102'; +const defaultValue = + 'ws://localhost:8180/steve/websocket/CentralSystemService/ch123'; const connectorId = 1; export default function Evse() { const [url, setUrl] = useState(defaultValue); diff --git a/app/service/ocpp/command/meter-value/meter.value.ts b/app/service/ocpp/command/meter-value/meter.value.ts index edff022..09101df 100644 --- a/app/service/ocpp/command/meter-value/meter.value.ts +++ b/app/service/ocpp/command/meter-value/meter.value.ts @@ -9,10 +9,15 @@ function SendMeterValue(w: IWriter, connectorId: number, value: number): void { connectorId, meterValue: [ { - context: 'Sample.Periodic', - value: value, - unit: 'W', - measurand: 'Power.Active.Import', + timestamp: new Date(), + sampledValue: [ + { + context: 'Sample.Periodic', + value: value, + unit: 'W', + measurand: 'Power.Active.Import', + }, + ], }, ], };