Documentation
¶
Overview ¶
Package goznp provides a Go library for controlling Zigbee networks via Texas Instruments Z-Stack Network Processor (ZNP) adapters.
The library is organized into layered packages:
- github.com/marstid/goznp/pkg/adapter — High-level API for device control, network management, and diagnostics. This is the main entry point for most users.
- github.com/marstid/goznp/pkg/znp — Z-Stack Network Processor protocol layer (ZDO, AF, SYS, UTIL commands).
- github.com/marstid/goznp/pkg/zcl — Zigbee Cluster Library types, frame building/parsing, and cluster constants.
- github.com/marstid/goznp/pkg/unpi — Unified Network Processor Interface for frame encoding and decoding.
- github.com/marstid/goznp/pkg/ota — OTA firmware update server and image parsing.
- github.com/marstid/goznp/pkg/backup — Coordinator NVRAM backup format.
Getting Started ¶
Most users should start with the adapter package:
a := adapter.New(adapter.WithSerialPath("/dev/ttyUSB0"))
if err := a.Open(ctx); err != nil {
log.Fatal(err)
}
defer a.Close()
See the examples directory for runnable code samples covering device discovery, control, sensors, and advanced integrations.
Hardware ¶
This library supports Texas Instruments CC2652R/RB, CC2652P, and CC1352P coordinators running Koenkk Z-Stack 3.x.0 firmware.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
goznp
command
|
|
|
internal
|
|
|
pkg
|
|
|
adapter
Package adapter provides a high-level API for controlling Zigbee networks through Texas Instruments Z-Stack Network Processor (ZNP) adapters.
|
Package adapter provides a high-level API for controlling Zigbee networks through Texas Instruments Z-Stack Network Processor (ZNP) adapters. |
|
backup
Package backup provides functionality for backing up and restoring Zigbee adapter configurations.
|
Package backup provides functionality for backing up and restoring Zigbee adapter configurations. |
|
devices
Package devices provides a lookup table for Zigbee device identification.
|
Package devices provides a lookup table for Zigbee device identification. |
|
ota
Package ota implements Over-The-Air (OTA) firmware update functionality for Zigbee devices using the Zigbee OTA Upgrade Cluster (0x0019).
|
Package ota implements Over-The-Air (OTA) firmware update functionality for Zigbee devices using the Zigbee OTA Upgrade Cluster (0x0019). |
|
serial
Package serial provides serial port abstraction for Z-Stack communication.
|
Package serial provides serial port abstraction for Z-Stack communication. |
|
unpi
Package unpi provides parsing and serialization for the Unified Network Processor Interface (UNPI) protocol used by Texas Instruments Z-Stack firmware.
|
Package unpi provides parsing and serialization for the Unified Network Processor Interface (UNPI) protocol used by Texas Instruments Z-Stack firmware. |
|
zcl
Package zcl provides Zigbee Cluster Library primitives for encoding/decoding ZCL frames and working with standard clusters.
|
Package zcl provides Zigbee Cluster Library primitives for encoding/decoding ZCL frames and working with standard clusters. |
|
znp
Package znp implements the Zigbee Network Processor protocol for communicating with TI Z-Stack coordinators.
|
Package znp implements the Zigbee Network Processor protocol for communicating with TI Z-Stack coordinators. |
Click to show internal directories.
Click to hide internal directories.