New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

charger-simulator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

charger-simulator

## Getting started

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23
increased by130%
Maintainers
1
Weekly downloads
 
Created
Source

EV charger simulator. Supports OCPP/J version 1.6 and OCPP/SOAP version 1.5. Can be used as CLI program, or as library in any JS environment.

CLI usage

Getting started

Install in project

yarn add vasyas/charger-simulator

or globally

yarn global add vasyas/charger-simulator

Then launch it with command

charger-simulator <URL to central system>

You can also run from a cloned git repository

yarn start <URL to central system>

On successfull launch, you will get this message

debug] OCPP connected
[info] Connected to Central System
[info] Supported keys:
    Ctrl+C:   quit

    Control connector 1
    ---
    a:        send Available status
    p:        send Preparing status
    c:        send Charging status
    f:        send Finishing status

You can press keys to send connector status updates to central server.

CLI options

charger-simulator

  Start OCPP charging station simulator, connect simulator to Central System
  server.

Options

  -s, --csURL URL                 URL of the Central System server to connect to, ws://server.name/path.
                                  This is also a default option.
  -i, --chargerId ChargerId       OCPP ID to be used for simulating charger.
                                  Default is 'test'.
  -c, --connectorId ConnectorId   ID of the connector to send status when pressing keys.
                                  Defaults to 1.
  -t, --idTag idTag               ID Tag to start transaction.
                                  Defaults to 123456.

Default behavior

By default simulator implements following OCPP operations.

RemoteStartTransaction. Will successfully start new transaction. Call RemoteStartTransaction by server will result in StartTransaction and multiple MeterValues to be sent to central system.

RemoteStopTransaction. Will stop running transaction.

GetConfiguration. Return charge point configuration. ChangeConfiguration. Change charge point configuration.

ReserveNow, CancelReservation, Reset. Return 'Accepted', but do nothing.

All other methods are not implemented.

Library usage

Getting started

TBD

API

TBD

FAQs

Package last updated on 05 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc