Skill flagged — review recommended

ClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.

Teslamate Skills

v0.1.1

Query TeslaMate vehicle data via Grafana API. Use when user wants Tesla vehicle status, battery info, drives, charges, statistics, driving score, battery hea...

0· 278· 2 versions· 0 current· 0 all-time· Updated 17h ago· MIT-0

Install

openclaw skills install teslamateskills

TeslaMate Grafana API Skill

Query TeslaMate data through Grafana's /api/ds/query endpoint using the PostgreSQL datasource.

Configuration

Grafana address is stored in ~/.openclaw/workspace/memory/teslamate-grafana-config.json:

{
  "grafana_url": "http://192.168.31.218:3000",
  "datasource_id": 1
}

To update address:

echo '{"grafana_url": "http://YOUR-GRAFANA:3000", "datasource_id": 1}' > ~/.openclaw/workspace/memory/teslamate-grafana-config.json

Usage

Quick Status

python3 scripts/query_teslamate.py --status
# Output: Battery: 85% | Range: 420 km | State: online | Today: 45 km

Drives

python3 scripts/query_teslamate.py --drives 5
# Recent 5 drives with address lookup

Route Planning

python3 scripts/query_teslamate.py --route "广州珠江新城"
# Output: Distance, duration, energy needed, arrival range

Commands

CommandDescription
--statusQuick status: battery, range, state, today distance
--drives [N]Recent N drives with address lookup
--route <addr>Plan route to destination
--reportWeekly report
--monthlyMonthly statistics
--trendEnergy efficiency trend (30 days)
--scoreDriving score based on speed
--milestonesAchievement milestones
--chargingCharging statistics (30 days)
--efficiencyEnergy efficiency stats
--costCharging cost (default 1.5 CNY/kWh)
--rangeRange prediction
--healthBattery health estimation
--placesTop 10 most visited places
--drainVampire drain analysis
--statesVehicle state statistics
--alertsCheck for anomalies
--tempTemperature monitoring
--locationCurrent car location
--fullComplete status dashboard

Common Metrics

  • Battery: battery_level (0-100%), ideal_battery_range_km
  • Drive: distance (km), duration_min (minutes), speed_max, power_max
  • Charge: charge_energy_added (kWh), charger_power (kW), charger_voltage (V)
  • States: state = 'online'|'offline'|'driving'|'charging'|'asleep'|'updating'

API Details

  • Endpoint: {grafana_url}/api/ds/query
  • Method: POST
  • Content-Type: application/json
  • Datasource: PostgreSQL (TeslaMate)

Request body:

{
  "queries": [{
    "refId": "A",
    "datasourceId": 1,
    "rawSql": "YOUR SQL QUERY",
    "format": "table"
  }]
}

Response contains results in results.A.data.values.

Version tags

latestvk97dhwy17pw8cyepv8y8ajaqd5830rke