Skip to main content

ThingsPanel Device Connector Development Guide

A connector links a device protocol or third-party API to ThingsPanel. New projects use the Go SDK v1.1.0. The Home Assistant v1.0.0 source is the reference for service connector deployment and tenant configuration.

Choose a template​

Access patternUse whenConnector Kit template
ProtocolA device communicates directly with the connectortemplates/protocol-go, TCP framing and a device simulator
Third-party serviceThe connector calls an API using tenant credentialstemplates/service-go, access point, discovery, reconciliation and a mock service

Download Connector Kit v0.1.0-rc.3 (.tar.gz) and its SHA-256 checksum. This release candidate includes two standalone Go templates and an AI Skill. See the migration note for the legacy SDK.

Develop with the AI Skill​

Copy the full template directory. Add skills/thingspanel-connector-dev from the Kit to your AI tool and provide vendor specifications, samples and the target platform version. Trace field names, units, IDs, timestamps and command semantics to the supplied evidence. Mark unknowns for confirmation.

Telemetry is time-series data, attributes describe device properties, events describe occurrences, and commands request actions. Implement only the SDK capabilities needed. Use FormConfigProvider for distinct forms, DeviceLister for discovery, and NotificationHandler to trigger service binding reconciliation through the managed platform identity.

Run locally​

Run go test ./... and follow the template README to start the connector and simulator. Check /health, forms and mapped values. Send protocol frames for a bound device or discover and bind devices from the mock service. Platform API calls use the managed runtime identity. MQTT telemetry uses device credentials.

Install automatically​

Build a registry image for the target architectures. Submit the plugin ID, version, image digest, health path and network requirements to the platform catalog maintainer for signing and distribution to the installer Agent.

A target-platform super administrator installs the plugin from Application Management → Plugin Management → Plugin Installation. Check its version and health, then configure the access point as a tenant and verify device telemetry. For connectors with downlink support, verify both the command acknowledgement and the resulting device state.

Publish to the Resource Center​

Use the Home Assistant listing as a reference. Provide the maintainer with the plugin ID, version, icon, supported platforms, installation and configuration instructions, and acceptance results. The listing, redirect target, platform installation page and signed catalog must use the same ID. The current redirect accepts the parameterized Home Assistant destination. Additional connectors require a Resource Center routing change. The Kit includes the full release checklist.