返回顶部
m

my-tesla特斯拉控制

Control Tesla vehicles from macOS via the Tesla Owner API using teslapy (auth, list cars, status, lock/unlock, climate, charging, location, and extras). Use when you want to check your car state or run safe remote commands. Designed for Parth Maniar (@officialpm) with local-only auth caching, confirmation gates for disruptive actions, and chat-friendly status output.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.64
安全检测
已通过
9,427
下载量
免费
免费
7
收藏
概述
安装方式
版本历史

my-tesla

My Tesla

作者: Parth Maniar — @officialpm

一个基于 teslapy 构建的、适用于 Clawdbot 的实用特斯拉控制技能。

设置

环境要求

  • - 设置 TESLA_EMAIL 环境变量(你的特斯拉账户邮箱)
  • Python 3.10 及以上版本

首次认证

bash
TESLA_EMAIL=you@email.com python3 {baseDir}/scripts/tesla.py auth

这将打开一个特斯拉登录 URL。登录后,将回调 URL 粘贴回命令行界面。

  • - 令牌缓存:~/.teslacache.json(仅本地存储;尽力设置权限为 0600)
  • 可选:通过设置 MYTESLADEFAULTCAR 环境变量为车辆显示名称,来指定默认车辆
  • 或者通过以下命令持久化本地默认车辆:python3 {baseDir}/scripts/tesla.py default-car 名称(写入 ~/.my_tesla.json;尽力设置权限为 0600)

命令

bash

列出车辆


python3 {baseDir}/scripts/tesla.py list
python3 {baseDir}/scripts/tesla.py list --json # 机器可读,保护隐私

版本信息

python3 {baseDir}/scripts/tesla.py version python3 {baseDir}/scripts/tesla.py --version

调试

如果出现意外失败,添加 --debug 可获取完整回溯信息

(或设置 MYTESLADEBUG=1)

python3 {baseDir}/scripts/tesla.py --debug status --no-wake

选择车辆(可选)

--car 接受:精确名称、部分名称(子字符串匹配)或来自 list 的基于 1 的索引

python3 {baseDir}/scripts/tesla.py --car Model status python3 {baseDir}/scripts/tesla.py --car 1 report

设置默认车辆(当未传递 --car 时使用)

python3 {baseDir}/scripts/tesla.py default-car My Model 3

单行摘要(最适合聊天场景)

python3 {baseDir}/scripts/tesla.py summary python3 {baseDir}/scripts/tesla.py summary --no-wake # 不唤醒休眠车辆

JSON 格式摘要(保护隐私)

与 status --json 不同,此命令输出一个经过清理的小型对象(不含位置信息)。

当车辆报告时,包含 usablelevelpercent。

python3 {baseDir}/scripts/tesla.py summary --json python3 {baseDir}/scripts/tesla.py summary --json --raw-json # 原始 vehicle_data(可能包含位置信息)

单屏报告(适合聊天,更详细)

包含电池/充电/气候信息 +(可用时)TPMS 胎压信息。

当车辆报告时,包含可用电池信息(有助于了解电池健康/衰减情况)。

可用时,还包含快速的车门/后备箱/前备箱/车窗状态摘要。

可用时,包含紧凑的座椅加热器摘要行。

当车辆报告时,包含预定出发/预处理/非高峰充电状态。

python3 {baseDir}/scripts/tesla.py report python3 {baseDir}/scripts/tesla.py report --no-wake

详细状态

python3 {baseDir}/scripts/tesla.py status python3 {baseDir}/scripts/tesla.py status --no-wake python3 {baseDir}/scripts/tesla.py status --summary # 包含单行摘要 + 详细输出 python3 {baseDir}/scripts/tesla.py --car My Model 3 status

JSON 输出(仅输出 JSON;适合管道传输/解析)

注意:status --json 输出 原始 vehicle_data,可能包含位置/驾驶状态信息。

除非明确需要原始数据,否则建议使用 summary --json(已清理)或 report --json(已清理)。

python3 {baseDir}/scripts/tesla.py summary --json # 已清理的摘要对象(不含位置信息) python3 {baseDir}/scripts/tesla.py report --json # 已清理的报告对象(不含位置信息;包含预定充电 + 充电口状态) python3 {baseDir}/scripts/tesla.py status --json # 原始 vehicle_data(可能包含位置信息) python3 {baseDir}/scripts/tesla.py report --json --raw-json # 原始 vehicle_data(可能包含位置信息) python3 {baseDir}/scripts/tesla.py summary --json --raw-json # 原始 vehicle_data(可能包含位置信息) python3 {baseDir}/scripts/tesla.py charge status --json # 包含可用电池 +(充电时)功率详情(kW/V/A)

锁定/解锁

python3 {baseDir}/scripts/tesla.py lock python3 {baseDir}/scripts/tesla.py unlock

气候控制(状态为只读)

python3 {baseDir}/scripts/tesla.py climate status python3 {baseDir}/scripts/tesla.py climate status --no-wake python3 {baseDir}/scripts/tesla.py climate on python3 {baseDir}/scripts/tesla.py climate off python3 {baseDir}/scripts/tesla.py climate defrost on python3 {baseDir}/scripts/tesla.py climate defrost off python3 {baseDir}/scripts/tesla.py climate temp 72 # 默认:°F python3 {baseDir}/scripts/tesla.py climate temp 22 --celsius

充电

python3 {baseDir}/scripts/tesla.py charge status python3 {baseDir}/scripts/tesla.py charge status --no-wake python3 {baseDir}/scripts/tesla.py charge start --yes python3 {baseDir}/scripts/tesla.py charge stop --yes python3 {baseDir}/scripts/tesla.py charge limit 80 --yes # 50–100 python3 {baseDir}/scripts/tesla.py charge amps 16 --yes # 1–48(保守限制)

预定充电(设置/关闭需安全确认)

python3 {baseDir}/scripts/tesla.py scheduled-charging status python3 {baseDir}/scripts/tesla.py scheduled-charging status --no-wake python3 {baseDir}/scripts/tesla.py scheduled-charging set 23:30 --yes python3 {baseDir}/scripts/tesla.py scheduled-charging off --yes

预定出发(只读)

显示预定出发、预处理和非高峰充电标志(当车辆报告时)。

python3 {baseDir}/scripts/tesla.py scheduled-departure status python3 {baseDir}/scripts/tesla.py scheduled-departure status --no-wake python3 {baseDir}/scripts/tesla.py --json scheduled-departure status

位置信息(默认近似;使用 --yes 获取精确坐标)

python3 {baseDir}/scripts/tesla.py location python3 {baseDir}/scripts/tesla.py location --no-wake python3 {baseDir}/scripts/tesla.py location --digits 1 # 更粗略的四舍五入 python3 {baseDir}/scripts/tesla.py location --digits 3 # 稍微精确一些(仍为近似值) python3 {baseDir}/scripts/tesla.py location --yes

胎压(TPMS)

python3 {baseDir}/scripts/tesla.py tires python3 {baseDir}/scripts/tesla.py tires --no-wake

开口状态(车门/后备箱/车窗)

python3 {baseDir}/scripts/tesla.py openings python3 {baseDir}/scripts/tesla.py openings --no-wake python3 {baseDir}/scripts/tesla.py openings --json

后备箱/前备箱(需安全确认)

python3 {baseDir}/scripts/tesla.py trunk trunk --yes python3 {baseDir}/scripts/tesla.py trunk frunk --yes

车窗

python3 {baseDir}/scripts/tesla.py windows status python3 {baseDir}/scripts/tesla.py windows status --no-wake python3 {baseDir}/scripts/tesla.py windows status --json

车窗控制(需安全确认)

python3 {baseDir}/scripts/tesla.py windows vent --yes python3 {baseDir}/scripts/tesla.py windows close --yes

座椅加热

python3 {baseDir}/scripts/tesla.py seats status python3 {baseDir}/scripts/tesla.py seats status --no-wake python3 {baseDir}/scripts/tesla.py seats status --json

座椅加热控制(需安全确认)

座椅:driver|passenger|rear-left|rear-center|rear

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 my-tesla-1776379725 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 my-tesla-1776379725 技能

通过命令行安装

skillhub install my-tesla-1776379725

下载

⬇ 下载 my-tesla v0.1.64(免费)

文件大小: 47.24 KB | 发布时间: 2026-4-17 14:53

v0.1.64 最新 2026-4-17 14:53
charge status shows usable battery + charging power details

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部