teslamate-grafana

Query TeslaMate vehicle data via Grafana API. Use when user wants Tesla vehicle status, battery info, drives, charges, statistics, driving score, battery health, or trip data. Requires Grafana running with TeslaMate PostgreSQL datasource.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "teslamate-grafana" with this command: npx skills add zengfei88/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.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Skill Polisher

Polishes standalone skills and multi-skill bundles for ClawHub readability without sacrificing LLM effectiveness. Use when improving a skill's listing, makin...

Registry SourceRecently Updated
General

OpenClaw Hi Install

Install or repair Hirey Hi on a local OpenClaw host through the official ClawHub package path, then complete the local MCP, receiver, registration, and healt...

Registry SourceRecently Updated
5630yzlee
General

Reducto

Reducto document processing API integration with managed API key authentication. Parse, extract, split, and edit documents. Use this skill when users want to...

Registry SourceRecently Updated
General

Resend

Resend API integration with managed authentication. Send transactional emails, manage domains, contacts, templates, and broadcasts. Use this skill when users...

Registry SourceRecently Updated