← Volver a Documentos
开发文档

Guía de Desarrollador de Plataforma DejaOS

Publicado 2026-08-26

EN

DejaOS es la plataforma de sistema operativo IoT de Vguang para terminales de acceso (sobre LVGL). Esta guía cubre rutas de acceso, el subprotocolo Widget y ejemplos de API abierta en la nube.

DejaOS is Vguang’s IoT operating-system platform for smart access terminals, built on the LVGL graphics framework to unify device UI, interaction logic and rendering parameters; try it live at dejaos.vguang.cn.

1. Developer access paths

① Cloud open API: org sync, bulk permission push, access/alarm log return — for platform-level integration; ② device-side Widget: embeds AI/interaction into the terminal UI, handshaking securely with the terminal via a WebSocket subprotocol.

2. Cloud open API (org-sync sample)

Create an enterprise space on the Vguang cloud platform to get the API Key and device-group ID; then push personnel and permissions via the "org sync" API. The sample below is an honest skeleton — fields per the open API docs:

```js // Pseudocode: org-sync bulk push (fields per open API docs) const res = await fetch(`${PLATFORM_BASE}/api/v1/org/sync`, { method: "POST", headers: { "Authorization": `Bearer ${API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ groupId: DEVICE_GROUP_ID, users: [{ id, name, perm }] }) }); ```

3. Device-side Widget subprotocol (Vguang.widget.v1)

The Widget handshakes with the terminal over WebSocket. The browser WebSocket API cannot set custom headers; the only channel to carry a credential at handshake is Sec-WebSocket-Protocol. The sample below shows negotiating Vguang.widget.v1 — an honest skeleton:

```js // Pseudocode: handshake via subprotocol (token in subprotocol, not URL) const protocols = ["Vguang.widget.v1", `kd-token.${btoa(urlSafe(TOKEN))}`]; const ws = new WebSocket("wss://dejaos.vguang.cn/widget", protocols); ws.onopen = () => console.log("subprotocol:", ws.protocol); // echoes Vguang.widget.v1 ```

4. Integration notes

① Pass tokens via subprotocol, never in the URL (avoids access-log leakage); ② exact fields and token issuance follow the latest open-platform / product-manual docs; ③ debug end-to-end in a test space before switching to production.

5. Source & SDK repository

The DejaOS open-platform source, SDK and samples are hosted on GitHub: https://github.com/DejaOS/DejaOS . Grab the latest SDK, file issues and PRs, and join the ecosystem there.

Preguntas frecuentes

¿Qué es DejaOS?

La plataforma de sistema operativo IoT de Vguang para terminales de acceso inteligente, construida sobre el framework gráfico LVGL para unificar UI, lógica e interacción.

¿Qué rutas de acceso tienen los desarrolladores?

Dos: ① API abierta en la nube (sincronización, envío de permisos, registros); ② Widget en dispositivo vía subprotocolo WebSocket Vguang.widget.v1.

¿Cómo se autentica el subprotocolo Widget?

En el handshake, el token Vguang.widget.v1 y la credencial viajan por Sec-WebSocket-Protocol; el token exacto es el Widget Token de la plataforma abierta — pásalo por subprotocolo, no en la URL.

¿Dónde obtengo el código y el SDK?

Alojado en GitHub en https://github.com/DejaOS/DejaOS — obtenga el SDK, las muestras y la LICENSE más recientes y contribuya con issues / PRs.

← Volver al Inicio