Documentation ¶
Index ¶
- Constants
- type Bridge
- func (g *Bridge) AddGroup()
- func (g *Bridge) Ban(friendlyName string)
- func (g *Bridge) ConfigReset()
- func (g *Bridge) DeviceOptions()
- func (g *Bridge) GetDeviceTopic(friendlyName string) string
- func (g *Bridge) GetModel() (model m.Zigbee2mqtt)
- func (g *Bridge) Info() (info *Zigbee2mqttBridge)
- func (g *Bridge) Networkmap() string
- func (g *Bridge) PermitJoin(permitJoin bool)
- func (g *Bridge) Remove(friendlyName string)
- func (g *Bridge) RemoveGroup()
- func (g *Bridge) RenameDevice(friendlyName, name string) (err error)
- func (g *Bridge) RenameLast()
- func (g *Bridge) Start()
- func (g *Bridge) Stop(ctx context.Context)
- func (g *Bridge) UpdateModel(model *m.Zigbee2mqtt)
- func (g *Bridge) UpdateNetworkmap()
- func (g *Bridge) Whitelist(friendlyName string)
- type BridgeConfig
- type BridgeConfigCoordinator
- type BridgeConfigMeta
- type BridgeLog
- type Config
- type Device
- func (d *Device) AddFunc(name string)
- func (d *Device) DeviceType(devType string)
- func (d *Device) GetImage() string
- func (d *Device) GetModel() models.Zigbee2mqttDevice
- func (d *Device) SetDescription(desc string)
- func (d *Device) SetModel(model string)
- func (d *Device) SetName(name string)
- func (d *Device) SetStatus(status string)
- func (d *Device) SetVendor(vendor string)
- func (d *Device) Status() string
- type DeviceInfo
- type Event
- type EventDeviceInfoDef
- type EventDeviceInfoDefExpose
- type Zigbee2mqtt
- type Zigbee2mqttBridge
Constants ¶
View Source
const ( // EventDeviceAnnounce ... EventDeviceAnnounce = "device_announce" // EventDeviceLeave ... EventDeviceLeave = "device_leave" // EventDeviceJoined ... EventDeviceJoined = "device_joined" // EventDeviceInterview ... EventDeviceInterview = "device_interview" )
View Source
const ( // StatusStarted ... StatusStarted = "started" // StatusFailed ... StatusFailed = "failed" )
View Source
const ( // Coordinator ... Coordinator = "Coordinator" // EndDevice ... EndDevice = "EndDevice" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) GetDeviceTopic ¶
GetDeviceTopic ...
func (*Bridge) RenameDevice ¶
RenameDevice ...
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 Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device ...
type DeviceInfo ¶ added in v0.5.2
type DeviceInfo struct { Definition EventDeviceInfoDef `json:"definition"` FriendlyName string `json:"friendly_name"` IeeeAddress string `json:"ieee_address"` Status string `json:"status,omitempty"` InterviewCompleted bool `json:"interview_completed,omitempty"` Interviewing bool `json:"interviewing,omitempty"` ModelId string `json:"model_id,omitempty"` NetworkAddress int64 `json:"network_address,omitempty"` PowerSource string `json:"power_source,omitempty"` Supported bool `json:"supported,omitempty"` Type string `json:"type,omitempty"` }
DeviceInfo ...
type Event ¶ added in v0.5.2
type Event struct { Data DeviceInfo `json:"data"` Type string `json:"type"` }
Event ...
type EventDeviceInfoDef ¶ added in v0.5.2
type EventDeviceInfoDef struct { Description string `json:"description,omitempty"` Exposes []EventDeviceInfoDefExpose `json:"exposes"` Model string `json:"model"` Options []string `json:"options"` SupportsOta bool `json:"supports_ota"` Vendor string `json:"vendor"` }
EventDeviceInfoDef ...
type EventDeviceInfoDefExpose ¶ added in v0.5.2
type EventDeviceInfoDefExpose struct { Access int64 `json:"access,omitempty"` Description string `json:"description,omitempty"` Name string `json:"name,omitempty"` Property string `json:"property,omitempty"` Type string `json:"type,omitempty"` Unit string `json:"unit,omitempty"` ValueMax int64 `json:"value_max,omitempty"` ValueMin int64 `json:"value_min,omitempty"` Values []string `json:"values,omitempty"` Features []EventDeviceInfoDefExpose `json:"features,omitempty"` }
EventDeviceInfoDefExpose ...
type Zigbee2mqtt ¶
type Zigbee2mqtt interface { Start() Shutdown() AddBridge(model *m.Zigbee2mqtt) (err error) GetBridgeById(id int64) (*m.Zigbee2mqtt, error) GetBridgeInfo(id int64) (*Zigbee2mqttBridge, error) ListBridges(limit, offset int64, order, sortBy string) (models []*Zigbee2mqttBridge, 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) }
Zigbee2mqtt ...
func NewZigbee2mqtt ¶
func NewZigbee2mqtt(lc fx.Lifecycle, mqtt mqtt.MqttServ, adaptors *adaptors.Adaptors, metric *metrics.MetricManager) Zigbee2mqtt
NewZigbee2mqtt ...
type Zigbee2mqttBridge ¶ added in v0.5.2
type Zigbee2mqttBridge struct { m.Zigbee2mqtt ScanInProcess bool `json:"scan_in_process"` LastScan *time.Time `json:"last_scan"` Networkmap string `json:"networkmap"` Status string `json:"status"` }
Zigbee2mqttBridge ...
Click to show internal directories.
Click to hide internal directories.