适用于已经加装 Tika 数字钥匙产品并完成 App 绑定的车辆。
Use this skill only after the vehicle has installed the Tika Digital Key product and completed App binding.
官网 / Official website: https://www.tikakey.com/
API Key 获取路径:乘趣 App -> 帮助中心 -> 热门功能 -> Skill。
API Key path: Chengqu App -> Help Center -> Popular Features -> Skill.
配置项值API 地址https://openapi.nokeeu.com/iot/v1/condition缓存文件~/.skill_carkey_cache.json认证格式App 生成的完整 API Key
TIKA_API_KEY / Recommend TIKA_API_KEY as the primary setup method~/.skill_carkey_cache.json / If the user wants repeated local use, then save it to ~/.skill_carkey_cache.json--lang zh|en 切换 CLI 输出语言 / Support bilingual CLI output with --lang使用 Python 脚本查询车况信息:
Use the Python script to query vehicle information:
bash
# 查询全部信息
python3 query_vehicle.py
# 使用单一环境变量直接查询
export TIKA_API_KEY='your_full_api_key'
python3 query_vehicle.py
python3 query_vehicle.py --check-auth
# 首次写入认证信息并查询
python3 query_vehicle.py --apikey 'your_full_api_key'
# 仅写入认证信息,不发起查询
python3 query_vehicle.py --apikey 'your_full_api_key' --save-token-only
# 检查当前认证状态
python3 query_vehicle.py --check-auth
# 删除本地认证缓存
python3 query_vehicle.py --clear-auth
# 仅查询车辆位置
python3 query_vehicle.py -p
python3 query_vehicle.py --position
# 仅查询车况信息
python3 query_vehicle.py -c
python3 query_vehicle.py --condition
# 输出原始 JSON 数据
python3 query_vehicle.py --json
python3 query_vehicle.py -p --json
python3 query_vehicle.py -c --json
# 使用英文输出
python3 query_vehicle.py --lang en
脚本文件: query_vehicle.py
字段路径说明data.sn数字钥匙 SNdata.vin车架号data.vehiclePosition.longitude/latitudeGPS 经纬度data.vehiclePosition.address地址data.vehiclePosition.positionUpdateTime位置更新时间戳(毫秒)data.vehicleCondition.power电源状态data.vehicleCondition.gear档位data.vehicleCondition.trunk后备箱状态data.vehicleCondition.door.*车门状态data.vehicleCondition.lock.*车锁状态data.vehicleCondition.window.*车窗状态data.vehicleCondition.airConditionerState.*空调温度设定
参数简写说明--position``-p仅查询车辆位置信息--condition``-c仅查询车况信息--json输出纯 JSON 数据--apikey传入完整 API Key,并写入缓存--save-token-only仅保存 API Key 到缓存--check-auth仅检查缓存中的认证信息--clear-auth删除本地认证缓存--lang输出语言,支持 zh 和 en无参数查询全部信息
其他特性 / Additional notes:
TIKA_API_KEY / Support reading auth from environment variables, preferably TIKA_API_KEY错误类型处理方式认证信息缺失引导用户提供完整 API Key认证格式错误提示正确格式缓存读写失败返回明确文件错误API 请求失败返回 HTTP 或接口错误信息
Python 3.6+