twin-bind-data

Bind live tag data to Godot digital-twin scenes via WebSocket DataBus and IFC GlobalId mapping.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/arthur0n/xenodot-twin --skill twin-bind-data-arthur0n
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twin-bind-data
Source: https://github.com/arthur0n/xenodot-twin/tree/main/plugin/skills/twin-bind-data
Command: npx skills add https://github.com/arthur0n/xenodot-twin --skill twin-bind-data-arthur0n

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Connecting a live or simulated data stream to a 3D digital-twin viewer in Godot fails in predictable ways: WebSocketPeer silently does nothing without polling, reconnects corrupt sequence tracking, and mistyped IFC GlobalIds produce silently unbound tags that no one notices. This Skill encodes the DataBus autoload contract, the tag-to-GlobalId binding runtime, and the gates that catch dead bindings before they ship. ## Core Features & Use Cases - DataBus autoload contract: Implements the four WebSocketPeer gotchas (poll every frame, async connect state gating, draining all packets, fresh peer per reconnect) so a 10 Hz stream arrives with zero drops. - Tag-to-node binding by GlobalId: Authors a JSON binding map (tag, globalid, min/max, response, ramp) resolved against the scene tree or MultiMesh instances, driving albedo ramps or 3D labels. - Seeded simulator and MQTT bridge: Provides a deterministic WebSocket fixture (seeded PRNG, map-derived tags) plus a dependency-free MQTT-to-WS bridge so real brokers plug in behind the sourceUrl seam. - Use Case: Point a viewer at a live plant MQTT broker by running the bridge, authoring a binding map against real sidecar GlobalIds, and gating on a BIND-SMOKE N/N resolution check. ## Quick Start Ask the agent to wire a live data stream into the twin viewer by authoring a binding map from the model's sidecar GlobalIds and smoke-testing it against the seeded simulator.

Frequently Asked Questions about twin-bind-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bind live data to a Godot 3D model element?

Author a JSON binding map pairing each tag with the element's 22-char IFC GlobalId, min/max range, and response type. The runtime resolves GlobalIds to nodes or MultiMesh instances at load and drives albedo color ramps or 3D labels from the DataBus stream.

How do I connect a real MQTT broker to a Godot digital twin?

Run the built MQTT-to-WebSocket bridge (tools/bridge/mqtt_ws.js) with a topic-to-tag map file, then point the viewer's url config at ws://localhost:8766. The bridge is dependency-free and requires no changes to the DataBus or viewer.

Why does Godot WebSocketPeer connect but receive no data?

WebSocketPeer does no background work; you must call poll() every frame in _process. Also drain all pending packets per frame and allocate a fresh peer on each reconnect, since a closed peer cannot be reliably reused.

How do I test data bindings without a live data source?

Use the seeded simulator (node tools/sim/server.js --seed 42 --map binding_map.json), which publishes a deterministic WebSocket stream derived from your binding map. The smoke script then asserts all bindings resolve with zero drops.

Can the Godot twin viewer embed in a Grafana dashboard?

Yes, export the no-threads Web build and paste the generated iframe into a Grafana text panel in HTML mode with sanitization disabled. Threads builds fail in Grafana because it does not serve cross-origin isolation headers.

What are the limitations of the binding runtime?

Version 1 supports only albedo_ramp and label responses, one flat tag namespace, and no historization, trends, or alarm semantics. OPC-UA and BACnet require third-party bridges; only MQTT has a built adapter.