Skip to content

Seeed-Solution/reterminal_skill / skill

reterminal-skill

Verified

Use when creating, uploading, sending, deleting, or managing SenseCraft HMI playlists and pages through the HMI API.

FileKindSize
SKILL.mdskill md3.1 KB
references/api.mdmarkdown2.5 KB
scripts/reterminal-skill.mjsexecutablescript15.3 KB

references/api.md

View on GitHub
# reTerminal Skill API Reference

All supported business requests use:

```http
api-key: <HMI_API_KEY>
Content-Type: application/json
```

Base URL comes from `HMI_API_BASE`. Device selection can use `HMI_DEVICE_MAC`, `HMI_DEVICE_ID`, `HMI_DEVICE_NAME`, or explicit command options.

## Device Lookup

List devices:

```http
GET /api/v2/user/device/list
```

Expected fields:

```json
[
  { "id": 7, "device_name": "Desk", "mac_address": "aa:bb:cc:dd:ee:ff" }
]
```

Commands that need a target device resolve MAC address in this order:

1. Explicit `--mac-address`
2. `HMI_DEVICE_MAC`
3. Exact `--device-id`, `--device-name`, `HMI_DEVICE_ID`, or `HMI_DEVICE_NAME`
4. Single-device auto-selection when the API key has exactly one device

If multiple devices are available and no exact selector is provided, return the device list and ask the user to choose. Do not fuzzy-match device names.

## Flow

1. Create playlist: `POST /api/v2/user/playlist`
   - Request: `name`, optional `mac_address`
   - Output: `result.id`
2. Upload image:
   - Base64: `POST /api/v1/oss/upload`
   - File: `POST /api/v1/oss/file/upload`
   - Output: `result.url`, `result.image_url`, `result.file_url`, or compatible URL fields
3. Create image page: `POST /api/v2/user/page`
   - Suggested fields: `type=img`, `name`, `data`, `thumbnail`, optional `mac_address`
   - Output: `result.ids[0]`, `result.id`, or compatible page ID field
4. Attach page to playlist: `POST /api/v2/user/playlist/upsert_pages`
   - Request: `playlist_id`, `pages: [{ id: page_id, sort: 0 }]`
5. Send playlist to device: `POST /api/v2/user/device/down_link`
   - Request: `mac_address`, `type=1`, `playlist_id`

## Refresh Interval

Set refresh interval:

```http
POST /api/v2/user/device/down_link
```

Body:

```json
{ "mac_address": "aa:bb:cc:dd:ee:ff", "type": 2, "refresh_interval": 60 }
```

Use `set-refresh-interval --minutes 1` to send `refresh_interval: 60`.

## Delete

Delete playlist:

```http
DELETE /api/v2/user/playlist
```

Body:

```json
{ "id": 123, "mac_address": "aa:bb:cc:dd:ee:ff" }
```

Delete page:

```http
DELETE /api/v2/user/page
```

Body:

```json
{ "id": 456, "mac_address": "aa:bb:cc:dd:ee:ff" }
```

Destructive calls require explicit numeric IDs. Do not infer IDs from names.

## Error Notes

- `code=9003`: API key is missing, invalid, revoked, or expired.
- `code=401`: request was not authenticated, or the endpoint does not support API-key fallback.
- If `down_link` fails after a create flow, preserve `playlist_id` and `page_id` in the output.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall