zigbee2mqtt

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssistDevice

type AssistDevice struct {
	Device AssistDeviceInfo `json:"device"`
}

AssistDevice ...

type AssistDeviceInfo

type AssistDeviceInfo struct {
	Name         string `json:"name"`
	Model        string `json:"model"`
	Manufacturer string `json:"manufacturer"`
}

AssistDeviceInfo ...

type Bridge

type Bridge struct {
	// contains filtered or unexported fields
}

Bridge ...

func NewBridge

func NewBridge(mqtt mqtt.MqttServ,
	adaptors *adaptors.Adaptors,
	model *m.Zigbee2mqtt,
	metric *metrics.MetricManager) *Bridge

NewBridge ...

func (*Bridge) AddGroup

func (g *Bridge) AddGroup()

AddGroup ...

func (*Bridge) Ban

func (g *Bridge) Ban(friendlyName string)

Ban ...

func (*Bridge) ConfigReset

func (g *Bridge) ConfigReset()

ConfigReset ...

func (*Bridge) DeviceOptions

func (g *Bridge) DeviceOptions()

DeviceOptions ...

func (*Bridge) GetDeviceTopic

func (g *Bridge) GetDeviceTopic(friendlyName string) string

GetDeviceTopic ...

func (*Bridge) GetModel

func (g *Bridge) GetModel() (model m.Zigbee2mqtt)

GetModel ...

func (*Bridge) Info

func (g *Bridge) Info() (info *Zigbee2mqttInfo)

Info ...

func (*Bridge) Networkmap

func (g *Bridge) Networkmap() string

Networkmap ...

func (*Bridge) PermitJoin

func (g *Bridge) PermitJoin(permitJoin bool)

PermitJoin ...

func (*Bridge) Remove

func (g *Bridge) Remove(friendlyName string)

Remove ...

func (*Bridge) RemoveGroup

func (g *Bridge) RemoveGroup()

RemoveGroup ...

func (*Bridge) RenameDevice

func (g *Bridge) RenameDevice(friendlyName, name string) (err error)

RenameDevice ...

func (*Bridge) RenameLast

func (g *Bridge) RenameLast()

RenameLast ...

func (*Bridge) Start

func (g *Bridge) Start()

Start ...

func (*Bridge) Stop

func (g *Bridge) Stop(ctx context.Context)

Stop ...

func (*Bridge) UpdateModel

func (g *Bridge) UpdateModel(model *m.Zigbee2mqtt)

UpdateModel ...

func (*Bridge) UpdateNetworkmap

func (g *Bridge) UpdateNetworkmap()

UpdateNetworkmap ...

func (*Bridge) Whitelist

func (g *Bridge) Whitelist(friendlyName string)

Whitelist ...

type BridgeConfig

type BridgeConfig struct {
	Version     string                  `json:"version"`
	Commit      string                  `json:"commit"`
	Coordinator BridgeConfigCoordinator `json:"coordinator"`
	LogLevel    string                  `json:"log_level"`
	PermitJoin  string                  `json:"permit_join"`
}

BridgeConfig ...

type BridgeConfigCoordinator

type BridgeConfigCoordinator struct {
	Type string           `json:"type"`
	Meta BridgeConfigMeta `json:"meta"`
}

BridgeConfigCoordinator ...

type BridgeConfigMeta

type BridgeConfigMeta struct {
	Transportrev int64 `json:"transportrev"`
	Product      int64 `json:"product"`
	Majorrel     int64 `json:"majorrel"`
	Minorrel     int64 `json:"minorrel"`
	Maintrel     int64 `json:"maintrel"`
	Revision     int64 `json:"revision"`
}

BridgeConfigMeta ...

type BridgeLog

type BridgeLog struct {
	Type    string                 `json:"type"`
	Message string                 `json:"message"`
	Meta    map[string]interface{} `json:"meta"`
}

BridgeLog ...

type BridgePairingMeta

type BridgePairingMeta struct {
	FriendlyName string `json:"friendly_name"`
	Model        string `json:"model"`
	Vendor       string `json:"vendor"`
	Description  string `json:"description"`
	Supported    bool   `json:"supported"`
}

BridgePairingMeta ...

type Config added in v0.5.0

type Config struct {
}

Config ...

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device ...

func NewDevice

func NewDevice(friendlyName string, model *models.Zigbee2mqttDevice) *Device

NewDevice ...

func (*Device) AddFunc

func (d *Device) AddFunc(name string)

AddFunc ...

func (*Device) DeviceType

func (d *Device) DeviceType(devType string)

DeviceType ...

func (*Device) GetImage added in v0.2.0

func (d *Device) GetImage() string

GetImage ...

func (*Device) GetModel

func (d *Device) GetModel() models.Zigbee2mqttDevice

GetModel ...

func (*Device) SetDescription

func (d *Device) SetDescription(desc string)

SetDescription ...

func (*Device) SetModel

func (d *Device) SetModel(model string)

SetModel ...

func (*Device) SetName

func (d *Device) SetName(name string)

SetName ...

func (*Device) SetStatus

func (d *Device) SetStatus(status string)

SetStatus ...

func (*Device) SetVendor

func (d *Device) SetVendor(vendor string)

SetVendor ...

func (*Device) Status

func (d *Device) Status() string

Status ...

type DeviceType

type DeviceType string

DeviceType ...

type Zigbee2mqtt

type Zigbee2mqtt interface {
	Start()
	Shutdown()
	AddBridge(model *m.Zigbee2mqtt) (err error)
	GetBridgeById(id int64) (*m.Zigbee2mqtt, error)
	GetBridgeInfo(id int64) (*Zigbee2mqttInfo, error)
	ListBridges(limit, offset int64, order, sortBy string) (models []*Zigbee2mqttInfo, total int64, err error)
	UpdateBridge(model *m.Zigbee2mqtt) (result *m.Zigbee2mqtt, err error)
	DeleteBridge(bridgeId int64) (err error)
	ResetBridge(bridgeId int64) (err error)
	BridgeDeviceBan(bridgeId int64, friendlyName string) (err error)
	BridgeDeviceWhitelist(bridgeId int64, friendlyName string) (err error)
	BridgeNetworkmap(bridgeId int64) (networkmap string, err error)
	BridgeUpdateNetworkmap(bridgeId int64) (err error)
	GetTopicByDevice(model *m.Zigbee2mqttDevice) (topic string, err error)
	DeviceRename(friendlyName, name string) (err error)
}

func NewZigbee2mqtt

func NewZigbee2mqtt(lc fx.Lifecycle,
	mqtt mqtt.MqttServ,
	adaptors *adaptors.Adaptors,
	metric *metrics.MetricManager) Zigbee2mqtt

NewZigbee2mqtt ...

type Zigbee2mqttInfo

type Zigbee2mqttInfo struct {
	ScanInProcess bool          `json:"scan_in_process"`
	LastScan      time.Time     `json:"last_scan"`
	Networkmap    string        `json:"networkmap"`
	Status        string        `json:"status"`
	Model         m.Zigbee2mqtt `json:"model"`
}

Zigbee2mqttInfo ...

Jump to

Keyboard shortcuts

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