Keon WiFi SDK → FugManager
FugManager controls a device over the Feel Unified Gateway (FUG) REST API.
It is the recommended default: no Web Bluetooth, no in-browser OAuth — only a
Device Connection Key and HTTPS. It runs in any browser and in Node/back-end,
which makes it the cleanest way to drive a device from a server or a job.
For pushed, low-latency status see WifiManager.
The Device Connection Key is both the credential and the device identifier. Every request is sent with the header:
Authorization: DCK <deviceConnectionKey>
The key comes from the FeelConnect app (see Getting Started). A single key can cover several devices.
import { FugManager } from '@feelrobotics/keon-wifi-sdk';
const manager = await FugManager.connect({
deviceConnectionKey, // also the credential: sent as `Authorization: DCK <key>`
statusPollIntervalSec: 30, // optional poll interval (seconds), default 30; 0 = off
// A connection can cover several devices, so status arrives as a list.
onStatusChange: (statuses) =>
console.log('battery', statuses[0]?.battery_status),
});
await manager.forceStatusReport(); // pull the initial status (connect doesn't)
await manager.moveTo(50, 90);
// …later
await manager.disconnect();
Unlike the WiFi transport, FUG status is polled:
forceStatusReport() requests a snapshot on demand.statusPollIntervalSec seconds (default 30; 0
disables polling).connect() itself does not fetch status — call forceStatusReport() after
connecting to obtain the initial state before the first poll fires.connect() reports
through onError.FugManager.connect({ deviceConnectionKey, statusPollIntervalSec?, onStatusChange?, onError? })
returns a RemoteController, which adds to the
common KeonController interface:
| Method | Description |
|---|---|
getStatuses() |
Statuses of every device on the connection. |
setIntensity(intensity) |
Adjust intensity. Integer percentage 0–100. |
setStatusInterval(interval) |
Status report interval. Integer 0–1000. |
switchToBtMode() / resetCredentials() |
Server-routed setup commands: switch the device to BT mode / wipe its stored WiFi credentials. |
forceStatusReport() |
Request an immediate status report. |
Status payloads can be partial — treat every KeonDeviceStatus field as
optional, because devices may omit keys until a later report.
The manager wraps the FUG REST endpoints — see the FUG API documentation for the raw endpoint reference, Swagger UI, and standalone endpoint sandboxes.