Thomas Hegghammer

Location Awareness

生活服务v1.2.0
作者:Thomas Hegghammer更新于 2026-05-11共 4 个版本 · 最新版本发布于 2026-02-08location-awareness@clawhub_hegghammer/location-awareness
个人计划本地生活#Privacy#Home#Travel

据 AlphaMoat 统计,截至 2026-09,Location Awareness 累计下载 3,272 次、获 5 个星标,在全部 5,078 个 AI 技能中排名第 3,472 位,在「生活服务」分类(246 个)中排名第 173 位。

累计安装
161
累计下载
3,272
星标
5
全站排名
#3,472
全站前 69% · 「生活服务」前 71%
平台累计安装累计下载星标评论
ClawHub ↗1013,1365-
SkillHub ↗1613,2725—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

从 Home Assistant、OwnTracks、HTTP 或 GPSLogger 等提供方读取位置,说明状态、ETA、地点、提醒和地理围栏命令。位置、保存地点及凭据属敏感信息,路线及附近地点查询可能向外部地图服务披露数据。仅在有意持续跟踪时启用定时检查,删除或更改地点与规则前先确认。 需要 Python 和所选位置提供方对应的数据/凭据配置。命令经 scripts/location.sh,环境设置优先于本地配置。按获准环境保护凭据并只授予必要权限。行程时间受设置速度及路线数据影响,是估算而非到达保证。

资料发布于 2026-10-27

可以用来做什么

  • 用已配置位置提供方查询当前位置或行程时间

什么时候用

  • 管理保存地点、位置提醒和地理围栏规则

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

说明此位置命令使用哪些数据,以及何时联系外部地图服务。

月度数据趋势

累计下载3,272
2,1152,7373,3582026-03 · 累计下载 2,2012026-05 · 累计下载 2,5912026-06 · 累计下载 2,7172026-07 · 累计下载 2,9522026-08 · 累计下载 3,0482026-09 · 累计下载 3,27226-0326-09
星标5
4562026-03 · 星标 52026-05 · 星标 52026-06 · 星标 52026-07 · 星标 52026-08 · 星标 52026-09 · 星标 526-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,272—5
2026-083,048+3.3%5
2026-072,952+8.6%5
2026-062,717+4.9%5
2026-052,591—5
2026-032,201—5

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

7.0 KB · ClawHub v1.2.0
---
name: location-awareness
version: 1.2.0
description: Location awareness via privacy-friendly GPS tracking (Home Assistant, OwnTracks, GPS Logger). Set location-based reminders and ask about movement history, travel time, and nearby POIs. 
metadata: {"clawdbot":{"emoji":"📍","requires":{"bins":["python3"]}}}
---

# Location Awareness

**This skill provides commands to execute. When the user asks about location, RUN the appropriate command below.**
展开全部(共 211 行)

## ⚠️ IMPORTANT: All commands use `scripts/location.sh`

Every command must be run via `scripts/location.sh`. Example:

**User asks:** "How long to walk home?"  
**You run:**
```bash
scripts/location.sh eta home --mode walk
```
**Output:** `4.6 km, about 45 min walk`  
**You reply with the output directly.**

Do NOT run `eta` or other subcommands directly — they don't exist as standalone commands.

## Quick Reference — What to Run

| User says | Run this (copy exactly) | Reply with |
|-----------|----------|------------|
| "Where am I?" | `scripts/location.sh status` | Zone name only |
| "Map" / "map link" | `scripts/location.sh herewego` | Just the URL |
| "What are my coordinates?" | `scripts/location.sh status` | Lat/lon from output |
| "How long to walk home?" | `scripts/location.sh eta home --mode walk` | Distance + duration |
| "How long to bike to X?" | `scripts/location.sh eta X --mode bike` | Distance + duration |
| "How far is X by car?" | `scripts/location.sh eta X --mode car` | Distance + duration |
| "Remind me to X when I get to Y" | `scripts/location.sh remind "X" Y` | Brief confirm |
| "What reminders do I have?" | `scripts/location.sh reminders` | Bullet list or "None" |
| "List my places" | `scripts/location.sh places` | Bullet list |
| "List places nearby" | `scripts/location.sh places --near` | Sorted by distance |
| "List my pubs downtown" | `scripts/location.sh places --region downtown --category pub` | Filtered list |
| "Save this spot as X" | `scripts/location.sh addplace "X"` | Confirm |
| "Delete place X" | `scripts/location.sh delplace X` | Confirm |
| "Disable the grocery rule" | `scripts/location.sh disable grocery` | Confirm |
| "List my geofence rules" | `scripts/location.sh geofences` | Bullet list |
| "When was I last at X?" | `scripts/location.sh history X` | Date/time |
| "Where have I been today?" | `scripts/location.sh history --days 1` | List of places |
| "Find me a cafe nearby" | `scripts/location.sh nearby cafe` | POI list with distances |
| "Any pubs within 1km?" | `scripts/location.sh nearby pub 1000` | Filtered POI list |
| "How long was I at work this week?" | `scripts/location.sh stats --days 7` | Hours per place |

**Response style:** Terse. No preamble. No "Here's your location:". Just the answer.

## All Commands

All via `scripts/location.sh <command>`:

| Command | Description |
|---------|-------------|
| `status` | Current location, geofences inside, map link |
| `herewego` | Just the HERE WeGo map link |
| `check` | Check for triggered actions/reminders (used by cron) |
| `places [--near] [--region R] [--category C]` | List saved places |
| `geofences` | List all geofences with full details |
| `remind <text> <place_id>` | Add one-shot location reminder |
| `reminders` | List pending reminders |
| `addplace <name> [radius] [--region R] [--category C]` | Save current location |
| `editplace <id> [--name] [--radius] [--region] [--category] [--action] [--cooldown]` | Modify a place |
| `delplace <id>` | Delete a place |
| `enable <id>` / `disable <id>` | Toggle geofence on/off |
| `history [place] [--days N]` | When was I last at a place? |
| `nearby <category> [radius]` | Find nearby POIs (cafe, pub, restaurant, etc.) |
| `stats [--days N]` | Time spent at each place, visit counts |
| `proximity <text> <place/lat> [lon] [radius]` | Alert when approaching a location |
| `eta <place> [--mode walk\|bike\|car]` | Travel time and distance to a place |

**Note:** `eta` accepts saved place names, coordinates (`lat,lon`), or any place name (geocoded via OpenStreetMap, biased to current location).

**Note:** `status` returns the zone name if in a known place, otherwise reverse geocodes to a street address (e.g., "123 Main Street, Downtown").

## Concepts

**Geofences** — Saved places with lat/lon, radius, and optional action. Persistent.

**Reminders** — One-shot alerts tied to a place. Deleted after delivery.

**Region/Category** — Optional tags for filtering (e.g., "downtown", "pub").

---

## Setup (for administrators)

### Provider Configuration

Edit `scripts/config.json`:

**Home Assistant (default):**
```json
{
  "provider": "homeassistant",
  "homeassistant": {
    "url": "https://your-ha.example.com",
    "token": "your-long-lived-token",
    "entity_id": "device_tracker.phone"
  }
}
```

**OwnTracks:**
```json
{
  "provider": "owntracks",
  "owntracks": {
    "url": "https://owntracks.example.com",
    "user": "username",
    "device": "phone"
  }
}
```

**Generic HTTP:**
```json
{
  "provider": "http",
  "http": {
    "url": "https://your-api.com/location",
    "headers": {"Authorization": "Bearer token"}
  }
}
```

**GPSLogger (file-based):**
```json
{
  "provider": "gpslogger",
  "gpslogger": {
    "file": "/path/to/location.json"
  }
}
```

Secrets support: `"env:VAR_NAME"` (reads from environment variable) or plain string.

**Alternative:** Configure entirely via environment variables (no config.json needed):

| Provider | Env variables |
|----------|--------------|
| `LOCATION_PROVIDER` | `homeassistant`, `owntracks`, `http`, or `gpslogger` (default: `homeassistant`) |
| **Home Assistant** | `HA_URL`, `HA_TOKEN`, `HA_ENTITY_ID` |
| **OwnTracks** | `OWNTRACKS_URL`, `OWNTRACKS_USER`, `OWNTRACKS_DEVICE`, `OWNTRACKS_TOKEN` |
| **HTTP** | `LOCATION_HTTP_URL` |
| **GPSLogger** | `GPSLOGGER_FILE` |

Env vars take precedence over config.json values. Set them in `~/.openclaw/.env` or your shell environment.

**Output format:** Most query commands output human-readable text by default. Add `--json` for JSON output (useful for scripting).

### Travel Speeds

Customize walking/biking speeds for ETA calculations in `scripts/config.json`:

```json
{
  "speeds_kmh": {
    "walk": 6,
    "bike": 15
  }
}
```

### Geofence Config

Edit `scripts/geofences.json`:

```json
{
  "geofences": [
    {
      "id": "grocery",
      "name": "Grocery Store",
      "lat": 40.7128,
      "lon": -74.0060,
      "radius_m": 30,
      "action": "shopping_tasks",
      "cooldown_hours": 4,
      "enabled": true,
      "region": "downtown",
      "category": "shop"
    }
  ],
  "location_reminders": [],
  "proximity_alerts": []
}
```

### Automatic Notifications (OpenClaw Cron)

Use OpenClaw's built-in cron to run periodic location checks. Add a job to `~/.openclaw/cron/jobs.json`:

```json
{
  "name": "Location Check",
  "schedule": "*/5 * * * *",
  "prompt": "Run scripts/location.sh check --json and notify me of any triggered actions, reminders, or proximity alerts.",
  "channel": "signal",
  "to": "+1234567890",
  "wakeMode": "now"
}
```

This keeps scheduling within OpenClaw rather than requiring external systemd services.

「生活服务」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。