chargeflow

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 6 Imported by: 0

README

ChargeFlow

A CLI tool for analyzing your raw OCPP JSON messages. Useful for debugging and compatibility checks with various Charge Point Management Systems or Charge Point implementations.

Features

  • Parse Raw OCPP JSON messages
  • Support for OCPP 1.6 and 2.0.1
  • Request and Response payload validation
  • Validate messages from a file
Roadmap
  • Generate human-readable reports
  • Support for OCPP 2.1
  • Support for signed messages
  • Compatibility checks
  • Remote schema registry for vendors and models

Installation

You can install ChargeFlow by downloading the binary.


Usage

You can use ChargeFlow to validate OCPP messages by running the following command:

chargeflow validate '[2, "123456", "BootNotification", {"chargePointVendor": "TestVendor", "chargePointModel": "TestModel"}]'

For more options, you can run:

chargeflow validate

Validate the OCPP message(s) against the registered OCPP schema(s).

Usage:
  chargeflow validate [flags]

Examples:
chargeflow --version 1.6 validate '[2, "123456", "BootNotification", {"chargePointVendor": "TestVendor", "chargePointModel": "TestModel"}]'
chargeflow validate -f ./message.txt

Flags:
  -f, --file string            Path to a file containing the OCPP message to validate. If this flag is set, the message will be read from the file instead of the command line argument.
  -h, --help                   help for validate
  -r, --response-type string   Response type to validate against (e.g. 'BootNotificationResponse'). Currently needed if you want to validate a single response message. 
  -a, --schemas string         Path to additional OCPP schemas folder

Global Flags:
  -d, --debug            Enable debug mode
  -v, --version string   OCPP version to use (1.6 or 2.0.1) (default "1.6")

ChargeFlow will automatically determine whether it's a request or response message. All you need to provide is a OCPP version!

[!NOTE] If you want to validate a response message, you need to specify the response type using the --response-type flag.

Additionally, you can specify a custom path to vendor-specific OCPP schemas using the --schemas flag.

[!TIP] You can now also validate multiple messages (both request and responses) from a file using the -f flag.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

We welcome contributions to this project! Please read our contributing guidelines for more information on how to get started.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
gen
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL