Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

[326511.396947] usb 1-5: new full-speed USB device number 9 using xhci_hcd
[326511.791694] usb 1-5: New USB device found, idVendor=0403, idProduct=6015, bcdDevice=10.00
[326511.791702] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[326511.791703] usb 1-5: Product: ConBee III
[326511.791704] usb 1-5: Manufacturer: dresden elektronik
[326511.791705] usb 1-5: SerialNumber: DE03317127
[326511.830227] usbcore: registered new interface driver usbserial_generic
[326511.830234] usbserial: USB Serial support registered for generic
[326511.831371] usbcore: registered new interface driver ftdi_sio
[326511.831376] usbserial: USB Serial support registered for FTDI USB Serial Device
[326511.831433] ftdi_sio 1-5:1.0: FTDI USB Serial Device converter detected
[326511.831454] usb 1-5: Detected FT-X
[326511.840734] usb 1-5: FTDI USB Serial Device converter now attached to ttyUSB0

Usage

Start the long-lived daemon (owns the coordinator serial device):

./zigb daemon

Optional daemon tracing:

./zigb daemon --trace

Client commands (run while daemon is active):

./zigb status
./zigb list
./zigb describe [target]
./zigb set <target> <hue_z 0..254> <sat_z 0..254> [transition_ds]
./zigb set <nwk_hex> <ep> <hue_z 0..254> <sat_z 0..254> [transition_ds]
./zigb on [target]
./zigb off [target]
./zigb level <pct 0..100> [transition_ds] [target]
./zigb temp <kelvin> [transition_ds] [target]
./zigb color <hue_deg 0..360> <sat_pct 0..100> [transition_ds] [target]
./zigb pair [seconds]
./zigb scan
./zigb trace on
./zigb trace off

Examples:

# Warm white (about 2700K) over 1 second
./zigb temp 2700 10

# Dim to 35% over 1 second
./zigb level 35 10

# Orange-ish hue at full saturation over 2 seconds
./zigb color 30 100 20

# Target one lamp by alias or IEEE
./zigb on lamp_b
./zigb off 0xd44867fffe143651

# Probe visible nodes/endpoints/clusters
./zigb describe
./zigb describe A
./zigb describe 0x3ba5

# Low-level buffered set/hold (daemon stages latest values per endpoint)
./zigb set A 81 165 4
./zigb set 0x3ba5 1 81 165 4

target can be:

  • an alias from the alias file
  • an IEEE hex address with 0x prefix
  • for describe, a NWK short address with 0x prefix (for example 0x3ba5)

describe notes:

  • for profile 0x0104 endpoints, it also does best-effort ZCL attribute discovery/read on detected input clusters.
  • some clusters/devices may timeout or reject read/discovery; output will show per-cluster failures.

set notes:

  • set is low-level (hue_z, sat_z) and can target alias/IEEE or direct nwk+ep, intended for fast script-driven animation loops.
  • daemon keeps latest staged value per endpoint and re-broadcasts it periodically (no end-device delivery confirmation).
  • any non-set command clears the hold buffer (manual command takes control).

Alias file format (IEEE ALIAS, fstab-style):

# IEEE ALIAS
f84477fffe913f11 lamp_a
d44867fffe143651 lamp_b

Default alias file: aliases (relative to daemon current working directory)

Default daemon socket: zigb.socket (relative to daemon current working directory)

Environment overrides:

ZIGB_DEVICE=/dev/ttyUSB0
ZIGB_SOCKET=zigb.socket
ZIGB_ALIASES=aliases

About

ZigBee implementation in Zig-lang

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages