Incontrol
@ryan/incontrolv2026.06.29.1
01README
Peplink InControl 2 cloud management for swamp — organization/device inventory (including offline devices), full Starlink dish telemetry (obstruction + physical alignment with computed aim-offset), GPS location, connected clients, bandwidth-usage history, and raw API passthrough. OAuth2 client-credentials auth against api.ic.peplink.com.
02Models
@ryan/incontrolv2026.06.29.1incontrol/incontrol.ts
fn organizations()
List the InControl organizations these credentials can access. Writes one org resource each. Start here to find your org id.
fn devices()
List all devices in the org (includes offline devices). Writes one device resource each — use it to discover device names/serials/ids.
fn device(device?: string)
Full InControl detail for one device — online state, firmware, uptime, client count, GPS, PrimeCare expiry. Defaults to the defaultDevice global arg.
| Argument | Type | Description |
|---|---|---|
| device? | string | Device name, serial, or id. Defaults to defaultDevice. |
fn usage(period: enum, wanId?: number, device?: string)
Per-device bandwidth usage history (cloud-only). period = daily, monthly, or hourly. Pass wanId to scope to one WAN (e.g. 2 = cellular); omit for all-WAN totals. Defaults to the defaultDevice global arg.
| Argument | Type | Description |
|---|---|---|
| period | enum | Aggregation period |
| wanId? | number | Filter usage to a single WAN id (e.g. 2 = cellular). Omit for all-WAN combined totals. |
| device? | string | Device name, serial, or id. Defaults to defaultDevice. |
fn location(device?: string)
GPS location for a device from InControl (works even when querying remotely). Defaults to the defaultDevice global arg.
| Argument | Type | Description |
|---|---|---|
| device? | string | Device name, serial, or id. Defaults to defaultDevice. |
fn clients(device?: string)
Connected clients for a device as reported by InControl. Writes one client resource each. Defaults to the defaultDevice global arg.
| Argument | Type | Description |
|---|---|---|
| device? | string | Device name, serial, or id. Defaults to defaultDevice. |
fn api(path: string)
Raw InControl 2 API GET — hit any REST path (relative to /rest/, e.g. 'o/<org>/d' or 'o/<org>/g/<grp>/d/<dev>') for endpoints not covered by other methods. Read-only.
| Argument | Type | Description |
|---|---|---|
| path | string | REST path relative to /rest/ (e.g. 'o/u912S2/d') or an absolute https URL |
Resources
org(1h)— An InControl organization the credentials can access.
device(1h)— A device as seen by InControl (cloud view — includes offline devices): serial, product, group, online state, firmware, uptime, GPS, PrimeCare expiry.
starlinkDish(1h)— Full Starlink dish telemetry — obstruction, physical alignment (current vs desired boresight, with angular offset), SNR, GPS, throughput, and a computed health assessment. Data the local router API cannot provide.
usage(1h)— Per-device bandwidth usage history (daily/monthly/hourly) — cloud-only; the local router API does not retain history.
location(1h)— GPS location for a device — lat/lon/altitude/speed.
client(1h)— A connected client device as reported by InControl.
apiResponse(1h)— Raw response from any InControl REST endpoint.
03Previous Versions
2026.06.24.1Jun 24, 2026
04Stats
D
50 / 100
Downloads
0
Archive size
20.7 KB
- Has README or module doc0/2missing
- README has a code example0/1missing
- README is substantive0/1pending
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared0/1missing
- Verified public repository0/2missing
05Platforms
06Labels