Skip to content

Data models

The canonical BetterFleet VDV 261 types live in src/vdv_261/models.py. The schema endpoints and generated OpenAPI publish the same models.

Configuration models

Model Purpose
V2ICPVehicleConfig Vehicle endpoint address, optional path, and password.
V2ICPBackendConfig Backend address, path, preconditioning policy, and VIN-indexed credentials.
V2ICPCredential Password-policy model for one VIN.

Wire models

Model Purpose
VehicleParameterSet Vehicle telemetry and requirements. Unknown fields are accepted and ignored.
BackendParameterSet Depot directives and context. Unknown fields are accepted and ignored.
V2ICPVehicleRequest Flat request for /vdv261/v2icp/messages; it includes the vehicle fields directly.
V2ICPBackendResponse Flat response with backend fields directly.
DiagnosticEvent BetterFleet extension submitted to /vdv261/v2icp/diagnostics.

Key enums and constraints

  • AddressType: 0 disabled, 1 fixed IP, 2 URL.
  • PreconditioningMode: 0 vehicle selects the type; 1 backend selects it.
  • BatteryStatus: -1 SNA, 0 okay, 1 not okay, 2 critical.
  • HvacDirective value 3 means no climate preconditioning. It does not mean automatic climate mode.
  • seq is 0..255.
  • vin is exactly 17 ASCII bytes.
  • evccid is exactly 12 hexadecimal characters without separators.
  • driveoff is 0..288 in five-minute units; -1 is SNA.
  • Every request includes h2_stat and bat_stat, including seq = 0.
  • prec_eamount is required or estimated preconditioning energy, not an accumulated-energy counter.

bprec_eamount is absent from the 05/2023 VDV field tables and is not part of the VDV wire model. A future BetterFleet battery-preconditioning field needs an explicit extension contract.

Generated artifacts live at schema/openapi.json and are rendered by the API reference.