devices

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package devices provides a lookup table for Zigbee device identification. It maps manufacturer names and model IDs to friendly vendor names and descriptions, using data sourced from the zigbee2mqtt community database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count() int

Count returns the number of devices in the database.

Types

type Fingerprint

type Fingerprint struct {
	ManufacturerName string // Manufacturer name from Basic cluster (e.g., "_TZ3000_266azbg3").
	ModelID          string // Model identifier from Basic cluster (e.g., "TS011F").
}

Fingerprint uniquely identifies a device type by its Zigbee identifiers.

func AllFingerprints

func AllFingerprints() []Fingerprint

AllFingerprints returns all known device fingerprints. Useful for debugging or listing supported devices.

type Info

type Info struct {
	Vendor      string // Friendly vendor name (e.g., "NOUS", "IKEA", "Philips").
	Model       string // Product model name (e.g., "A6Z", "TRADFRI bulb E27").
	Description string // Brief device description.
}

Info contains friendly device information looked up from the database.

func Lookup

func Lookup(manufacturerName, modelID string) *Info

Lookup finds device info by manufacturer name and model ID. Returns nil if no matching device is found.

func LookupByManufacturer

func LookupByManufacturer(manufacturerName string) *Info

LookupByManufacturer finds device info by manufacturer name only. This is a fallback when the exact manufacturer+model combination isn't found. Returns nil if no matching device is found.

func LookupWithFallback

func LookupWithFallback(manufacturerName, modelID string) *Info

LookupWithFallback tries exact match first, then manufacturer-only fallback. Returns nil if no matching device is found.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL