Loading...
Loading...
Compare original and translation side by side
export PETTRACER_USERNAME="you@example.com"
export PETTRACER_PASSWORD="••••••••"python scripts/pettracer_cli.py list --format json --prettypython scripts/pettracer_cli.py locate --pet "Fluffy" --format json --prettypython scripts/pettracer_cli.py locate --device-id 12345 --format json --pretty--pet/--device-idpython scripts/pettracer_cli.py locate --format json --prettyexport PETTRACER_USERNAME="you@example.com"
export PETTRACER_PASSWORD="••••••••"python scripts/pettracer_cli.py list --format json --prettypython scripts/pettracer_cli.py locate --pet "Fluffy" --format json --prettypython scripts/pettracer_cli.py locate --device-id 12345 --format json --pretty--pet/--device-idpython scripts/pettracer_cli.py locate --format json --prettypython scripts/pettracer_cli.py history --pet "Fluffy" --hours 6 --format json --prettypython scripts/pettracer_cli.py history --pet "Fluffy" --hours 6 --format json --prettylocatehistorylocatehistoryPETTRACER_TOKENPETTRACER_USERNAMEPETTRACER_PASSWORDPETTRACER_EMAILPETTRACER_API_BASEhttps://portal.pettracer.com/apiPETTRACER_WS_BASEwss://pt.pettracer.com/scPETTRACER_TOKENPETTRACER_USERNAMEPETTRACER_PASSWORDPETTRACER_EMAILPETTRACER_API_BASEhttps://portal.pettracer.com/apiPETTRACER_WS_BASEwss://pt.pettracer.com/scGET /api/map/getccspettracer_cli.py listdetails.nameGET /api/map/getccspettracer_cli.py listdetails.namedevice.lastPosposLat/posLongposLatposLongtimeMeasureacchoriPrecPOST /api/map/getccpositionsdevIdfilterTimetoTimedevice.lastPosposLat/posLongposLatposLongtimeMeasureacchoriPrecPOST /api/map/getccpositionsdevIdfilterTimetoTime{
"pet": { "id": 12345, "name": "Fluffy" },
"last_fix": {
"lat": 48.137154,
"lon": 11.576124,
"time": "2026-02-25T12:34:56+00:00",
"accuracy_m": 12
},
"last_fix_age_s": 90,
"battery_mv": 4012,
"battery_percent_est": 78,
"home": false,
"links": {
"google_maps": "https://www.google.com/maps?q=48.137154,11.576124",
"openstreetmap": "https://www.openstreetmap.org/?mlat=48.137154&mlon=11.576124#map=18/48.137154/11.576124"
}
}battery_percent_esterror=no_recent_fixlast_contact{
"pet": { "id": 12345, "name": "Fluffy" },
"last_fix": {
"lat": 48.137154,
"lon": 11.576124,
"time": "2026-02-25T12:34:56+00:00",
"accuracy_m": 12
},
"last_fix_age_s": 90,
"battery_mv": 4012,
"battery_percent_est": 78,
"home": false,
"links": {
"google_maps": "https://www.google.com/maps?q=48.137154,11.576124",
"openstreetmap": "https://www.openstreetmap.org/?mlat=48.137154&mlon=11.576124#map=18/48.137154/11.576124"
}
}battery_percent_esterror=no_recent_fixlast_contactpip install aiohttppython scripts/pettracer_watch.py --pet "Fluffy"scripts/pettracer_watch.pypip install aiohttppython scripts/pettracer_watch.py --pet "Fluffy"scripts/pettracer_watch.pylastPoslastPoslastContactlastContactaccess_tokenloginpasswordusernameaccess_tokenloginpasswordusername/map/getccs/map/getccsGive the pet’s latest known PetTracer location.
Include:
- Pet name + device id
- Time of last fix (and last contact if different)
- Coordinates + map link(s)
- Accuracy (metres) if present
- One-line assessment: “recent fix” vs “stale fix” (use last_fix_age_s if available; interpret in the context of the current tracking mode)提供宠物的最新PetTracer定位信息。
需包含:
- 宠物名称 + 设备ID
- 最后定位时间(若最后联系时间不同则一并显示)
- 坐标 + 地图链接
- 精度(单位米,若存在)
- 一行评估结论:“近期定位”或“过期定位”(若可获取last_fix_age_s则使用该值;结合当前追踪模式判断)