tracking-pettracer-location
Tracks PetTracer (pettracer.com) GPS collars via the PetTracer portal API: fetches a pet’s latest location, location history, and optionally streams updates via the PetTracer WebSocket (SockJS/STOMP). Use when the user asks “where is my pet/cat”, “track my PetTracer”, wants GPS coordinates/history, or needs help with PetTracer authentication tokens or live tracking.
What this skill does
# Tracking PetTracer pet location ## Why this exists PetTracer exposes an (unofficial) web portal API used by their apps/website. This skill gives a reliable, low-drama workflow for: - **Current location** (latest known point) - **Recent route/history** (time-windowed points) - **Near-real-time updates** (WebSocket push, optional) It is designed to minimise API load (be respectful) and to produce **consistent, copy/paste-friendly outputs**. ## Quick start ### Snapshot location (recommended default) 1. Set credentials (prefer env vars, not CLI args): ```bash export PETTRACER_USERNAME="[email protected]" export PETTRACER_PASSWORD="••••••••" ``` 2. List devices: ```bash python scripts/pettracer_cli.py list --format json --pretty ``` 3. Locate a pet: - By name: ```bash python scripts/pettracer_cli.py locate --pet "Fluffy" --format json --pretty ``` - By id: ```bash python scripts/pettracer_cli.py locate --device-id 12345 --format json --pretty ``` - If the account has **exactly one collar**, you can omit `--pet/--device-id`: ```bash python scripts/pettracer_cli.py locate --format json --pretty ``` ### Get location history (last 6 hours) ```bash python scripts/pettracer_cli.py history --pet "Fluffy" --hours 6 --format json --pretty ``` ## Core workflow the agent should follow ### 1) Decide: snapshot vs history vs live updates - **Snapshot**: user asks “where is X right now?” → use `locate`. - **History**: user asks “where has X been today/last hour?” → use `history`. - **Live**: user wants continuous updates → use WebSocket (see [references/websocket.md](references/websocket.md)). Default to **snapshot** unless the user explicitly wants a route or live tracking. ### 2) Authenticate safely Preferred order: 1. Use `PETTRACER_TOKEN` if already available. 2. Else login with `PETTRACER_USERNAME` + `PETTRACER_PASSWORD` (or `PETTRACER_EMAIL`). **Never** ask the user to paste tokens into chat. Ask them to set env vars or store secrets in their vault. Optional overrides (useful for debugging / future-proofing): - `PETTRACER_API_BASE` (REST base; default `https://portal.pettracer.com/api`) - `PETTRACER_WS_BASE` (WebSocket base; default `wss://pt.pettracer.com/sc`) ### 3) Identify the right device - Fetch devices via `GET /api/map/getccs` (wrapped by `pettracer_cli.py list`). - Match by `details.name` case-insensitively. - If multiple matches: show a disambiguation list (id + name) and ask the user which one. - If no match: show available device names. - If the account has exactly one collar, you can default to it. ### 4) Fetch location data - **Current location** comes from `device.lastPos` (collars) or top-level `posLat/posLong` (HomeStations): - `posLat`, `posLong` - `timeMeasure` (timestamp) - `acc` (accuracy, metres) or `horiPrec` (fallback) - **History** uses `POST /api/map/getccpositions` with: - `devId`, `filterTime` (ms), `toTime` (ms) See [references/endpoints.md](references/endpoints.md) and [references/data-model.md](references/data-model.md). ### 5) Present results consistently When reporting location, include: - Pet name + device id - Coordinates (lat, lon) - Last update time - Accuracy (if present) - How old the fix is (seconds/minutes since last fix), if possible - Optional: a map link (Google Maps + OpenStreetMap) **Preferred JSON shape (for tool-to-tool handoff):** ```json { "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" } } ``` Notes: - `battery_percent_est` is an **estimate** derived from voltage (PetTracer reports millivolts, not %). - If there’s no GPS fix, report `error=no_recent_fix` and include `last_contact`. ## Live tracking (optional, avoid aggressive polling) If you need frequent updates: - Prefer WebSocket push (avoid aggressive polling). - Only fall back to polling if WebSocket is not possible; keep polling ≥ 60s by default. Install dependency: ```bash pip install aiohttp ``` Then run: ```bash python scripts/pettracer_watch.py --pet "Fluffy" ``` See: - [references/websocket.md](references/websocket.md) - `scripts/pettracer_watch.py` for a working SockJS/STOMP implementation. ## Troubleshooting playbook ### No location / `lastPos` is missing Common reasons: - Collar hasn’t reported a GPS fix recently (indoors, low signal). - Battery low / collar off. - Subscription expired. Action: - Report “no recent fix” and show `lastContact` if available. - Suggest switching to a higher-frequency mode (Fast/Live) in the PetTracer app/portal **only if the user asks** (see [references/modes.md](references/modes.md)). ### Auth failures (401 / invalid_auth) - Re-login to obtain a fresh `access_token`. - Confirm the login payload uses keys `login` + `password` (not `username`). ### Rate limiting / service respect - Avoid tight loops against `/map/getccs`. - Prefer WebSocket for near-real-time tracking. ## THE EXACT PROMPT — Location response format Use this when the user wants a human-readable answer: ``` Give 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) ```
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.