zigbee

package module
v0.0.0-...-a52de58 Latest Latest
Warning

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

Go to latest
Published: May 17, 2015 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ZLLOnOffLight            = 0x0000
	ZLLOnOffPlug             = 0x0010
	ZLLDimmableLight         = 0x0100
	HAOnOffLight             = 0x0100
	HADimmableLight          = 0x0101
	HAColorLight             = 0x0102
	ZLLDimmablePlug          = 0x0110
	ZLLColorLight            = 0x0200
	ZLLExtendedColorLight    = 0x0210
	ZLLColorTemperatureLight = 0x0220
)

ZLL DeviceTypes

View Source
const (
	HomeAutomation = 0x0104
	LightLink      = 0xC05E
)

ProfileIds

View Source
const (
	BasicCluster    = 0x0000
	IdentifyCluster = 0x0003
	GroupsCluster   = 0x0004
	ScenesCluster   = 0x0005
	OnOffCluster    = 0x0006
	LevelCluster    = 0x0008
)

ZCL Clusters

View Source
const (
	ZCLVersion         = iota // 0
	ApplicationVersion        // 1 ...
	StackVersion
	HWVersion
	ManufacturerName
	ModelId
	DateCode
	PowerSource
)

BasicAttributes

View Source
const (
	Off = 0x00
	On  = 0x01
)

OnOff Values

View Source
const Level = 0

Level Attributes

View Source
const NameSupport = 0

GroupAttributes

View Source
const OnOff = 0

On/Off Attributes

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveEndpointResponse

type ActiveEndpointResponse struct {
	Endpoints []Endpoint
}

type AttributeResponse

type AttributeResponse struct {
	ID    uint16
	Value string
}

type BindResponse

type BindResponse struct {
	Success bool
}

type Cluster

type Cluster struct {
	ID         uint16
	Attributes map[uint16]string
}

type DeviceGateway

type DeviceGateway interface {
	Connect(address string) error
	Reconnect() error
	SendAsync() error
	Send() error
	PermitJoining(duration time.Duration) (chan JoinResponse, error)
	NodeDescriptorReq(z ZigbeeDevice) (chan NodeDescriptorResponse, error)
	ActiveEndpointReq(z ZigbeeDevice) (chan ActiveEndpointResponse, error)
	SimpleDescriptorReq(z ZigbeeDevice) (chan SimpleDescriptorResponse, error)
	BindReq(z ZigbeeDevice, e Endpoint, c Cluster) (chan BindResponse, error)
	ReadAttributes(z ZigbeeDevice, e Endpoint, c Cluster, attribids []uint8) (chan AttributeResponse, error)
}

type Endpoint

type Endpoint struct {
	ID          uint8
	Profile     uint16
	DeviceType  uint16
	InClusters  map[uint16]*Cluster
	OutClusters map[uint16]*Cluster
}

type HAGateway

type HAGateway interface {
	Connect(address string) error
	Reconnect() error
	SendAsync() error
	Send() error
	SetOnOff(z ZigbeeDevice, endpointid uint8, value uint8) error
	MoveToLightLevelWOnOff(z ZigbeeDevice, endpointid uint8, value uint8, transitiontime uint16) error
	MoveToLightLevel(z ZigbeeDevice, endpointid uint8, level uint8, transitiontime uint16) error
	MoveToHue(z ZigbeeDevice, endpointid uint8, hue uint8, transitiontime uint16) error
	MoveToSat(z ZigbeeDevice, endpointid uint8, sat uint8, transitiontime uint16) error
	MoveToHueSat(z ZigbeeDevice, endpointid uint8, hue uint8, sat uint8, transitiontime uint16) error
	MoveToXY(z ZigbeeDevice, endpointid uint8, X uint16, Y uint16, transitiontime uint16) error
	MoveToColorTemp(z ZigbeeDevice, endpointid uint8, temp uint16, transitiontime uint16) error
	Loop(z ZigbeeDevice, endpointid uint8, starthue uint8, transitiontime uint16) error
	StopLoop(z ZigbeeDevice, endpointid uint8, endhue uint8, transitiontime uint16) error
}

type JoinResponse

type JoinResponse struct {
	NetAddr  uint16
	IeeeAddr [8]uint8
}

type NodeDescriptorResponse

type NodeDescriptorResponse struct {
	ManufacturerCode uint16
}

type SimpleDescriptorResponse

type SimpleDescriptorResponse struct {
	Endpoint
}

type ZigbeeDevice

type ZigbeeDevice struct {
	Name             string              `json:"name"`
	Endpoints        map[uint8]*Endpoint `json:"-"`
	NetAddr          uint16              `json:"netaddr"`
	IeeeAddr         uint64              `json:"ieeeaddr"`
	ManufacturerCode uint16              `json:"-"`
}

Directories

Path Synopsis
gateways

Jump to

Keyboard shortcuts

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