Skip to content

Commit

Permalink
change to steve and fix bug in meter values
Browse files Browse the repository at this point in the history
  • Loading branch information
Nasar165 committed May 6, 2024
1 parent 4217c64 commit 34f5a31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/components/evse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 9 additions & 4 deletions app/service/ocpp/command/meter-value/meter.value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
],
},
],
};
Expand Down

0 comments on commit 34f5a31

Please sign in to comment.