traccar-sms-gateway

Send SMS using your phone’s SIM via the local HTTP API of the Traccar SMS Gateway Android app. Intended for users who want to programmatically send SMS over HTTP, turn a personal Android phone into a private self-hosted SMS gateway, automate sending without relying on third-party SMS providers, or have a Traccar server send SMS notifications using a phone.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "traccar-sms-gateway" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-0d737f72f20b7721c2b3580868c44d668293953eefdc0a26b56ee06e0207f363. Verify the upstream source and version against https://skillhub.cn/skills/user_dca971df/traccar-sms-gateway before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Send SMS using your phone’s SIM via the local HTTP API of the Traccar SMS Gateway Android app. Intended for users who want to programmatically send SMS over HTTP, turn a personal Android phone into a private self-hosted SMS gateway, automate sending without relying on third-party SMS providers, or have a Traccar server send SMS notifications using a phone.

0 Downloads

Introduction source: third_party · user_dca971df · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: traccar-sms-gateway
slug: traccar-sms-gateway
displayName: 用 HTTP API 从自己的手机发短信
version: "1.0.0"
description: 通过 Traccar SMS Gateway 安卓 App 的本地 HTTP API,用自己的手机 SIM 卡发送短信。当用户想用 HTTP 以编程方式发短信、把个人安卓手机变成一个私有的自建短信网关、在不依赖第三方短信服务商的前提下自动化发短信,或让 Traccar 服务器用手机发送短信通知时,使用本技能。
agent_created: true
xiaping_trigger: ["发短信", "短信", "SMS", "Traccar", "短信网关", "手机发短信", "HTTP API 发短信", "短信通知"]
xiaping_category: ["效率工具"]
xiaping_tags: ["短信", "SMS", "Traccar", "安卓", "网关", "自动化", "HTTP API", "通知"]
xiaping_eval_strategy: developer

用 HTTP API 从自己的手机发短信

概述

本技能封装 Traccar SMS Gateway 安卓 App —— 它把一部手机变成私有短信网关, 对外暴露一个极简的本地 HTTP API。无需向短信服务商付费,短信直接从你自己的 SIM 卡发出。随附的 scripts/send_sms.py 用纯 Python 标准库(零依赖)完成 HTTP 调用;scripts/send_sms.sh 是等价的 curl 版;references/api.md 记录了完整接口约定。

在以下场景使用本技能:

  • 从脚本、自动化流程或 agent 里用 HTTP 发短信。
  • 把个人安卓手机当作短信网关。
  • 不想用第三方短信服务、希望消息全程本地化。
  • 让 Traccar 服务器把手机作为短信发送通道。

前置准备(手机端,一次性)

  1. 安装 Traccar SMS Gateway(Google Play,或从 GitHub releases 下载 APK)。
  2. 打开 App → 设置 → General → Gateway → Configuration → Local Service → 开启 Enable service。
  3. 复制其中的 Token 和 Endpoints 地址(如 http://192.168.1.10:8082)。
  4. 保持 App 常驻(关闭该 App 的电池优化),并让手机连着 Wi-Fi。

快速开始

直接发送一条短信:

python3 scripts/send_sms.py \
  --endpoint 'http://192.168.1.10:8082/' \
  --token 'bbcb9958-864c-4048-aeb0-a60fafb46c78' \
  --to '+8613800138000' \
  --message '来自我自己网关的问候'

成功时会打印 SMS SENT (HTTP 200) 并以退出码 0 结束。

更习惯用 Bash/curl?scripts/send_sms.sh 接受完全相同的参数 (--endpoint、--token、--to、--message、--check)和同样的环境变量, 适合在没有 Python 的机器上使用。原始 curl 一行命令和连通性检测命令见 references/api.md。

反复使用(环境变量)

把 endpoint 和 token 设置一次,之后每次只传消息内容:

export TRACCAR_SMS_ENDPOINT='http://192.168.1.10:8082/'
export TRACCAR_SMS_TOKEN='bbcb9958-864c-4048-aeb0-a60fafb46c78'

python3 scripts/send_sms.py --to '+8613800138000' --message 'Ping'

命令行参数始终优先于环境变量。

连通性检测

发送前先确认手机可达(对 endpoint 发起一次 GET,会返回接口格式说明文本):

python3 scripts/send_sms.py --check

接口约定(摘要)

POST {endpoint}/
Authorization: {token}
Content-Type: application/json

{ "to": "+8613800138000", "message": "你的短信内容" }
  • 成功 → HTTP 200。App 无状态,不保存任何送达回执。
  • to 必须是带前导 + 的国际 E.164 格式。
  • 短信从手机自身的 SIM 卡号发出(没有 from 字段)。

完整接口说明、启用步骤、Traccar 服务器端配置写法以及常见坑,见 references/api.md。

注意事项与常见坑

  • 仅限局域网。 endpoint 是内网地址;不做端口转发(不推荐)时无法从公网访问。
  • 端口 默认 8082 —— 以 App 里显示的为准。
  • App 必须存活。 App 被杀或手机休眠会导致连接错误。
  • 无回执。 App 不持久化消息,事后无法通过 API 查询发送状态。
  • 长短信 会被拆成多条拼接短信发送(可能按条计费)。

安全

  • Token 是 bearer 凭证 —— 同网络内任何知道它的人都能用这部手机发短信(并产生 话费)。请妥善保密,不要提交到代码仓库,优先用环境变量而非硬编码。
  • 该通道按设计就是局域网明文 HTTP,仅在可信网络中使用,切勿把 endpoint 暴露到公网。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决用户通过 HTTP API 使用自有安卓手机 SIM 卡发送短信的明确需求
  • 适用于私有短信网关、自动化通知、避免第三方短信服务商等实用场景
Trigger Precision90/100

Highlights

  • 触发词覆盖合理,边界清晰,包含多种变体
Structure and Standards95/100

Highlights

  • 文档结构清晰,步骤明确,有端到端示例,frontmatter 完整
Execution Reliability88/100

Highlights

  • 提供了 Python 和 Bash 脚本,工具来源明确,参数说明清晰
  • 覆盖了主要异常,不可逆操作有安全提醒
Evidence Verifiability (mean of the first four)90/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • 192.168.1.10
  • github.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.