zigbee2mqtt

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: GPL-3.0 Imports: 15 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"`
}

type AssistDeviceInfo

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

type Bridge

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

func NewBridge

func NewBridge(mqtt *mqttServer.Mqtt,
	adaptors *adaptors.Adaptors,
	model *m.Zigbee2mqtt) *Bridge

func (*Bridge) AddGroup

func (g *Bridge) AddGroup()

func (*Bridge) Ban

func (g *Bridge) Ban(friendlyName string)

func (*Bridge) ConfigReset

func (g *Bridge) ConfigReset()

func (*Bridge) DeviceOptions

func (g *Bridge) DeviceOptions()

func (*Bridge) GetDeviceTopic

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

func (*Bridge) GetModel

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

func (*Bridge) Info

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

func (*Bridge) Networkmap

func (g *Bridge) Networkmap() string

func (*Bridge) PermitJoin

func (g *Bridge) PermitJoin(permitJoin bool)

func (*Bridge) Remove

func (g *Bridge) Remove(friendlyName string)

func (*Bridge) RemoveGroup

func (g *Bridge) RemoveGroup()

func (*Bridge) RenameDevice

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

func (*Bridge) RenameLast

func (g *Bridge) RenameLast()

func (*Bridge) Start

func (g *Bridge) Start()

func (*Bridge) Stop

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

func (*Bridge) UpdateModel

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

func (*Bridge) UpdateNetworkmap

func (g *Bridge) UpdateNetworkmap()

func (*Bridge) Whitelist

func (g *Bridge) Whitelist(friendlyName string)

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"`
}

type BridgeConfigCoordinator

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

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"`
}

type BridgeLog

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

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"`
}

type Device

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

func NewDevice

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

func (*Device) AddFunc

func (d *Device) AddFunc(name string)

func (*Device) DeviceType

func (d *Device) DeviceType(devType string)

func (*Device) GetModel

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

func (*Device) SetDescription

func (d *Device) SetDescription(desc string)

func (*Device) SetModel

func (d *Device) SetModel(model string)

func (*Device) SetName

func (d *Device) SetName(name string)

func (*Device) SetStatus

func (d *Device) SetStatus(status string)

func (*Device) SetVendor

func (d *Device) SetVendor(vendor string)

func (*Device) Status

func (d *Device) Status() string

type DeviceType

type DeviceType string

type Zigbee2mqtt

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

func NewZigbee2mqtt

func NewZigbee2mqtt(graceful *graceful_service.GracefulService,
	mqtt *mqtt.Mqtt,
	adaptors *adaptors.Adaptors) *Zigbee2mqtt

func (*Zigbee2mqtt) AddBridge

func (z *Zigbee2mqtt) AddBridge(model *m.Zigbee2mqtt) (err error)

func (*Zigbee2mqtt) BridgeDeviceBan

func (z *Zigbee2mqtt) BridgeDeviceBan(bridgeId int64, friendlyName string) (err error)

func (*Zigbee2mqtt) BridgeDeviceWhitelist

func (z *Zigbee2mqtt) BridgeDeviceWhitelist(bridgeId int64, friendlyName string) (err error)

func (*Zigbee2mqtt) BridgeNetworkmap

func (z *Zigbee2mqtt) BridgeNetworkmap(bridgeId int64) (networkmap string, err error)

func (*Zigbee2mqtt) BridgeUpdateNetworkmap

func (z *Zigbee2mqtt) BridgeUpdateNetworkmap(bridgeId int64) (err error)

func (*Zigbee2mqtt) DeleteBridge

func (z *Zigbee2mqtt) DeleteBridge(bridgeId int64) (err error)

func (*Zigbee2mqtt) DeviceRename

func (z *Zigbee2mqtt) DeviceRename(friendlyName, name string) (err error)

func (*Zigbee2mqtt) GetBridgeById

func (z *Zigbee2mqtt) GetBridgeById(id int64) (*m.Zigbee2mqtt, error)

func (*Zigbee2mqtt) GetBridgeInfo

func (z *Zigbee2mqtt) GetBridgeInfo(id int64) (*Zigbee2mqttInfo, error)

func (*Zigbee2mqtt) GetTopicByDevice

func (z *Zigbee2mqtt) GetTopicByDevice(model *m.Zigbee2mqttDevice) (topic string, err error)

func (*Zigbee2mqtt) ListBridges

func (z *Zigbee2mqtt) ListBridges(limit, offset int64, order, sortBy string) (models []*Zigbee2mqttInfo, total int64, err error)

func (*Zigbee2mqtt) ResetBridge

func (z *Zigbee2mqtt) ResetBridge(bridgeId int64) (err error)

func (*Zigbee2mqtt) Shutdown

func (z *Zigbee2mqtt) Shutdown()

func (*Zigbee2mqtt) Start

func (z *Zigbee2mqtt) Start()

func (*Zigbee2mqtt) UpdateBridge

func (z *Zigbee2mqtt) UpdateBridge(model *m.Zigbee2mqtt) (result *m.Zigbee2mqtt, err error)

type Zigbee2mqttConfig

type Zigbee2mqttConfig struct {
}

func NewZigbee2mqttConfig

func NewZigbee2mqttConfig(cfg *config.AppConfig) *Zigbee2mqttConfig

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"`
}

Jump to

Keyboard shortcuts

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