EV battery

API

Klicken, zustimmen, SoC abrufen.

Lesen Sie den Batteriestand und die Batteriekapazität eines Elektrofahrzeugs mit einfachen API-Anfragen ab.

Ladezustand der Batterie

Rufen Sie den Ladezustand (SoC) und die verbleibende Reichweite eines batterieelektrischen Fahrzeugs (BEV) oder eines Plug-in-Hybridfahrzeugs (PHEV) ab.

Kapazität der Batterie

Informieren Sie sich über die Kapazität der Batterie eines Elektrofahrzeugs.

const smartcar = require('smartcar');

// Get all vehicles associated with this access token
const {vehicles} = await smartcar.getVehicles("<access-token>");

// Construct a new vehicle instance using the first vehicle's id
const vehicle = new smartcar.Vehicle(vehicles[0], "<access-token>");

// Fetch the vehicle's battery level
const battery = await vehicle.battery();

// Fetch the vehicle's battery capacity 
const batteryCapacity = await vehicle.batteryCapacity();
// Example http response from Smartcar (battery level)
{
  "percentRemaining": 0.3,
  "range": 40.5,
}

// Example http response from Smartcar (battery capacity)
{
  "capacity": 28.7,
}
import smartcar

# Get all vehicles associated with this access token
response = smartcar.get_vehicles("<access-token>")

# Construct a new vehicle instance using the first vehicle's id
vehicle = smartcar.Vehicle(response.vehicles[0], "<access-token>")

# Fetch the vehicle's battery level
battery = vehicle.battery()

# Fetch the vehicle's battery capacity 
battery_capacity = vehicle.battery_capacity()
// Example http response from Smartcar (battery level)
{
  "percentRemaining": 0.3,
  "range": 40.5,
}

// Example http response from Smartcar (battery capacity)
{
  "capacity": 28.7,
}
import com.smartcar.sdk.*;

// Get all vehicles associated with this access token
VehicleIds response = Smartcar.getVehicles("<access-token>");
String[] vehicleIds = response.getVehicleIds();

// Construct a new vehicle instance using the first vehicle's id
Vehicle vehicle = new Vehicle(vehicleIds[0], "<access-token>");

// Fetch the vehicle's battery level
VehicleBattery battery = vehicle.battery();

// Fetch the vehicle's battery capacity 
VehicleBatteryCapacity batteryCapacity = vehicle.batteryCapacity();
// Example http response from Smartcar (battery level)
{
  "percentRemaining": 0.3,
  "range": 40.5,
}

// Example http response from Smartcar (battery capacity)
{
  "capacity": 28.7,
}
import (
  "context"
  smartcar "github.com/smartcar/go-sdk"
);

// Create a smartcar client
var smartcarClient = smartcar.NewClient();

// Get all vehicles associated with this access token
var vehicleIDs, resErr = smartcarClient.GetVehicleIDs(
  context.TODO(),
  &smartcar.VehicleIDsParams{Access: "<access-token>"},
);

// Construct a new vehicle instance using the first vehicle's id
var vehicle = smartcarClient.NewVehicle(&smartcar.VehicleParams{
  ID: vehicleIDs.VehicleIDs[0],
  AccessToken: "<access-token>"},
);

// Fetch the vehicle's battery level
var battery, resErr = vehicle.GetBattery(context.TODO());

// Fetch the vehicle's battery capacity 
var batteryCapacity, resErr = vehicle.GetBatteryCapacity(context.TODO());
// Example http response from Smartcar (battery level)
{
  "percentRemaining": 0.3,
  "range": 40.5,
}

// Example http response from Smartcar (battery capacity)
{
  "capacity": 28.7,
}
require 'smartcar'

# Get all vehicles associated with this access token
all_vehicles =  Smartcar.get_vehicles(token: token)

# Construct a new vehicle instance using the first vehicle's id
vehicle = Smartcar::Vehicle.new(
  token: "<access-token>",
  id: all_vehicles.vehicles.first
)

# Fetch the vehicle's battery level
battery = vehicle.battery()

# Fetch the vehicle's battery capacity 
battery_capacity = vehicle.battery_capacity()
// Example http response from Smartcar (battery level)
{
  "percentRemaining": 0.3,
  "range": 40.5,
}

// Example http response from Smartcar (battery capacity)
{
  "capacity": 28.7,
}
Sehen Sie sich die API-Dokumente an

Eigenschaften des Produkts

  • Compatible with 36 car brands

    kompatibel mit 39 Automarken

  • Friendly user consent flow

    Benutzerfreundlicher Zustimmungsfluss

  • Works on 2015 and newer vehicles

    Funktioniert mit Fahrzeugen von 2015 und neueren

  • Trusted & secure

    Vertrauenswürdig und sicher

  • Retrieve live data and trigger actions

    Zugriff auf Live-Fahrzeugdaten

  • SDKs for Go, Java, Node.js, Python, and Ruby

    SDKs für Go, Java, Node.js, Python und Ruby

Learn more about Smartcar's APIs

Verwandte Branchen

Ladenetzwerke für Elektrofahrzeuge

Geben Sie in Ihrer App geschätzte Ladezeiten, automatische Ladepläne und die Reiseplanung für Elektrofahrzeuge an.

Energie- und Versorgungsunternehmen

Steuern Sie das Laden der Elektrofahrzeuge Ihrer Kunden in Privathaushalten, um die Stromnetzlast optimal auszugleichen.

Was wir bauen

Latenz und Häufigkeit der Datenverfügbarkeit können je nach Hersteller und Modell variieren.