devices

package
v0.0.0-...-6f785f3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alarms

type Alarms struct {
	Name     string
	Controls *AlarmsControls
}

func NewAlarms

func NewAlarms(client *mqtt.Client) *Alarms

type AlarmsControls

type AlarmsControls struct {
	Log *TextControl
}

type Buzzer

type Buzzer struct {
	Name     string
	Controls *BuzzerControls
}

func NewBuzzer

func NewBuzzer(client *mqtt.Client) *Buzzer

type BuzzerControls

type BuzzerControls struct {
	Enabled   *SwitchControl
	Frequency *RangeControl
	Volume    *RangeControl
}

type Control

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

func NewControl

func NewControl(client *wb.Client, topic string) *Control

func (*Control) AddWatcher

func (c *Control) AddWatcher(f func(payload ControlWatcherPayload))

func (*Control) GetValue

func (c *Control) GetValue() string

func (*Control) SetValue

func (c *Control) SetValue(value string)

type ControlWatcherPayload

type ControlWatcherPayload struct {
	NewValue    string
	OldValue    string
	Topic       string
	ControlName string
}

type Dooya0X0104

type Dooya0X0104 struct {
	Name     string
	Controls *Dooya0X0104Controls
}

func NewDooya0X0104

func NewDooya0X0104(client *mqtt.Client) *Dooya0X0104

type Dooya0X0104Controls

type Dooya0X0104Controls struct {
	Position       *RangeControl
	Open           *PushbuttonControl
	Close          *PushbuttonControl
	Stop           *PushbuttonControl
	FactoryDefault *PushbuttonControl
}

type Hwmon

type Hwmon struct {
	Name     string
	Controls *HwmonControls
}

func NewHwmon

func NewHwmon(client *mqtt.Client) *Hwmon

type HwmonControls

type HwmonControls struct {
	BoardTemperature *ValueControl
	CpuTemperature   *ValueControl
}

type Knx

type Knx struct {
	Name     string
	Controls *KnxControls
}

func NewKnx

func NewKnx(client *mqtt.Client) *Knx

type KnxControls

type KnxControls struct {
	Data *TextControl
}

type LightMode

type LightMode struct {
	Name     string
	Controls *LightModeControls
}

func NewLightMode

func NewLightMode(client *mqtt.Client) *LightMode

type LightModeControls

type LightModeControls struct {
	Enabled *SwitchControl
	State   *ValueControl
}

type Metrics

type Metrics struct {
	Name     string
	Controls *MetricsControls
}

func NewMetrics

func NewMetrics(client *mqtt.Client) *Metrics

type MetricsControls

type MetricsControls struct {
	LoadAverage1Min   *ValueControl
	LoadAverage5Min   *ValueControl
	LoadAverage15Min  *ValueControl
	RamAvailable      *ValueControl
	RamUsed           *ValueControl
	RamTotal          *ValueControl
	SwapTotal         *ValueControl
	SwapUsed          *ValueControl
	DevRootUsedSpace  *ValueControl
	DevRootTotalSpace *ValueControl
	DevRootLinkedOn   *TextControl
	DataUsedSpace     *ValueControl
	DataTotalSpace    *ValueControl
}

type Network

type Network struct {
	Name     string
	Controls *NetworkControls
}

func NewNetwork

func NewNetwork(client *mqtt.Client) *Network

type NetworkControls

type NetworkControls struct {
	ActiveConnections            *TextControl
	DefaultInterface             *TextControl
	Ethernet2Ip                  *TextControl
	Ethernet2IpOnlineStatus      *SwitchControl
	EthernetIp                   *TextControl
	EthernetIpOnlineStatus       *SwitchControl
	GprsIp                       *TextControl
	GprsIpOnlineStatus           *SwitchControl
	InternetConnection           *TextControl
	WiFi2Ip                      *TextControl
	WiFi2IpOnlineStatus          *SwitchControl
	WiFiIp                       *TextControl
	WiFiIpOnlineStatus           *SwitchControl
	Ethernet2IpConnectionEnabled *SwitchControl
	EthernetIpConnectionEnabled  *SwitchControl
	GprsIpConnectionEnabled      *SwitchControl
	WiFi2IpConnectionEnabled     *SwitchControl
	WiFiIpConnectionEnabled      *SwitchControl
}

type Powerstatus

type Powerstatus struct {
	Name     string
	Controls *PowerstatusControls
}

func NewPowerstatus

func NewPowerstatus(client *mqtt.Client) *Powerstatus

type PowerstatusControls

type PowerstatusControls struct {
	Vin              *ValueControl
	WorkingOnBattery *SwitchControl
}

type PushbuttonControl

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

func NewPushbuttonControl

func NewPushbuttonControl(client *wb.Client, topic string) *PushbuttonControl

func (*PushbuttonControl) Push

func (pbc *PushbuttonControl) Push()

type RangeControl

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

func NewRangeControl

func NewRangeControl(client *wb.Client, topic string) *RangeControl

func (*RangeControl) AddWatcher

func (rc *RangeControl) AddWatcher(f func(payload RangeControlWatcherPayload))

func (*RangeControl) GetValue

func (rc *RangeControl) GetValue() int

func (*RangeControl) SetValue

func (rc *RangeControl) SetValue(value int)

type RangeControlWatcherPayload

type RangeControlWatcherPayload struct {
	NewValue    int
	OldValue    int
	Topic       string
	ControlName string
}

type Scriptsleep

type Scriptsleep struct {
	Name     string
	Controls *ScriptsleepControls
}

func NewScriptsleep

func NewScriptsleep(client *mqtt.Client) *Scriptsleep

type ScriptsleepControls

type ScriptsleepControls struct {
	Current          *ValueControl
	Enable           *SwitchControl
	State            *TextControl
	Target           *RangeControl
	Zone1RelayStatus *SwitchControl
	Zone1Status      *ValueControl
}

type SwitchControl

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

func NewSwitchControl

func NewSwitchControl(client *wb.Client, topic string) *SwitchControl

func (*SwitchControl) AddWatcher

func (sw *SwitchControl) AddWatcher(f func(payload SwitchControlWatcherPayload))

func (*SwitchControl) GetValue

func (sw *SwitchControl) GetValue() bool

func (*SwitchControl) SetValue

func (sw *SwitchControl) SetValue(value bool)

func (*SwitchControl) Toggle

func (sw *SwitchControl) Toggle()

func (*SwitchControl) TurnOff

func (sw *SwitchControl) TurnOff()

func (*SwitchControl) TurnOn

func (sw *SwitchControl) TurnOn()

type SwitchControlWatcherPayload

type SwitchControlWatcherPayload struct {
	NewValue    bool
	OldValue    bool
	Topic       string
	ControlName string
}

type System

type System struct {
	Name     string
	Controls *SystemControls
}

func NewSystem

func NewSystem(client *mqtt.Client) *System

type SystemControls

type SystemControls struct {
	BatchNo            *TextControl
	CurrentUptime      *TextControl
	DtsVersion         *TextControl
	HwRevision         *TextControl
	ManufacturingDate  *TextControl
	Reboot             *PushbuttonControl
	ReleaseName        *TextControl
	ReleaseSuite       *TextControl
	ShortSn            *TextControl
	TemperatureGrade   *TextControl
	Status             *TextControl
	ActivationLink     *TextControl
	CloudBaseUrl       *TextControl
	Name               *TextControl
	Uuid               *TextControl
	Type               *TextControl
	Active             *SwitchControl
	Device             *TextControl
	State              *TextControl
	Address            *TextControl
	Connectivity       *SwitchControl
	UpDown             *PushbuttonControl
	Operator           *TextControl
	SignalQuality      *TextControl
	AccessTechnologies *TextControl
}

type Termostat

type Termostat struct {
	Name     string
	Controls *TermostatControls
}

func NewTermostat

func NewTermostat(client *mqtt.Client) *Termostat

type TermostatControls

type TermostatControls struct {
	R01Ts161Lock     *SwitchControl
	R01Ts161Mode     *SwitchControl
	R01Ts161Setpoint *RangeControl
}

type TextControl

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

func NewTextControl

func NewTextControl(client *wb.Client, topic string) *TextControl

func (*TextControl) AddWatcher

func (tc *TextControl) AddWatcher(f func(payload ControlWatcherPayload))

func (*TextControl) GetValue

func (tc *TextControl) GetValue() string

func (*TextControl) SetValue

func (tc *TextControl) SetValue(value string)

type ValueControl

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

func NewValueControl

func NewValueControl(client *wb.Client, topic string) *ValueControl

func (*ValueControl) AddWatcher

func (c *ValueControl) AddWatcher(f func(payload ValueControlWatcherPayload))

func (*ValueControl) GetValue

func (c *ValueControl) GetValue() float64

type ValueControlWatcherPayload

type ValueControlWatcherPayload struct {
	NewValue    float64
	OldValue    float64
	Topic       string
	ControlName string
}

type WbAdc

type WbAdc struct {
	Name     string
	Controls *WbAdcControls
}

func NewWbAdc

func NewWbAdc(client *mqtt.Client) *WbAdc

type WbAdcControls

type WbAdcControls struct {
	A1          *ValueControl
	A2          *ValueControl
	A3          *ValueControl
	A4          *ValueControl
	Vin         *ValueControl
	V33         *ValueControl
	V50         *ValueControl
	VbusDebug   *ValueControl
	VbusNetwork *ValueControl
}

type WbGpio

type WbGpio struct {
	Name     string
	Controls *WbGpioControls
}

func NewWbGpio

func NewWbGpio(client *mqtt.Client) *WbGpio

type WbGpioControls

type WbGpioControls struct {
	A1Out  *SwitchControl
	A2Out  *SwitchControl
	A3Out  *SwitchControl
	A4Out  *SwitchControl
	A1In   *SwitchControl
	A2In   *SwitchControl
	A3In   *SwitchControl
	A4In   *SwitchControl
	C5VOut *SwitchControl
	W1In   *SwitchControl
	W2In   *SwitchControl
	VOut   *SwitchControl
}

type WbLed150

type WbLed150 struct {
	Name     string
	Controls *WbLed150Controls
}

func NewWbLed150

func NewWbLed150(client *mqtt.Client) *WbLed150

type WbLed150Controls

type WbLed150Controls struct {
	Cct1             *SwitchControl
	Cct2Temperature  *RangeControl
	Cct2Brightness   *RangeControl
	BoardTemperature *ValueControl
	AllowedPower     *ValueControl
	Overcurrent      *SwitchControl
	Input1           *SwitchControl
	Input2           *SwitchControl
	Input2Counter    *ValueControl
	Input3           *SwitchControl
	Cct1Temperature  *RangeControl
	Cct1Brightness   *RangeControl
	Cct2             *SwitchControl
	Input3Counter    *ValueControl
	Input4           *SwitchControl
	Input4Counter    *ValueControl
	Serial           *TextControl
}

type WbMdm381

type WbMdm381 struct {
	Name     string
	Controls *WbMdm381Controls
}

func NewWbMdm381

func NewWbMdm381(client *mqtt.Client) *WbMdm381

type WbMdm381Controls

type WbMdm381Controls struct {
	Input1                   *SwitchControl
	Input1Counter            *ValueControl
	Input1SinglePressCounter *ValueControl
	Input1LongPressCounter   *ValueControl
	Input2                   *SwitchControl
	Input2Counter            *ValueControl
	Input2SinglePressCounter *ValueControl
	Input2LongPressCounter   *ValueControl
	Input3                   *SwitchControl
	Input3Counter            *ValueControl
	Input3SinglePressCounter *ValueControl
	Input3LongPressCounter   *ValueControl
	Input4                   *SwitchControl
	Input4Counter            *ValueControl
	Input4SinglePressCounter *ValueControl
	Input4LongPressCounter   *ValueControl
	Input5                   *SwitchControl
	Input5Counter            *ValueControl
	Input5SinglePressCounter *ValueControl
	Input5LongPressCounter   *ValueControl
	Input6                   *SwitchControl
	Input6Counter            *ValueControl
	Input6SinglePressCounter *ValueControl
	Input6LongPressCounter   *ValueControl
	K1                       *SwitchControl
	Channel1                 *RangeControl
	K2                       *SwitchControl
	Channel2                 *RangeControl
	K3                       *SwitchControl
	Channel3                 *RangeControl
	Serial                   *TextControl
	AcOnLN                   *SwitchControl
	Overcurrent              *SwitchControl
}

type WbMr6Cu145

type WbMr6Cu145 struct {
	Name     string
	Controls *WbMr6Cu145Controls
}

func NewWbMr6Cu145

func NewWbMr6Cu145(client *mqtt.Client) *WbMr6Cu145

type WbMr6Cu145Controls

type WbMr6Cu145Controls struct {
	K1     *SwitchControl
	K2     *SwitchControl
	K3     *SwitchControl
	K4     *SwitchControl
	K5     *SwitchControl
	K6     *SwitchControl
	Serial *TextControl
}

type WbMrm2Mini61

type WbMrm2Mini61 struct {
	Name     string
	Controls *WbMrm2Mini61Controls
}

func NewWbMrm2Mini61

func NewWbMrm2Mini61(client *mqtt.Client) *WbMrm2Mini61

type WbMrm2Mini61Controls

type WbMrm2Mini61Controls struct {
	Input1        *SwitchControl
	Input1Counter *ValueControl
	Input2        *SwitchControl
	Input2Counter *ValueControl
	K1            *SwitchControl
	K2            *SwitchControl
	Serial        *TextControl
}

type WbMs235

type WbMs235 struct {
	Name     string
	Controls *WbMs235Controls
}

func NewWbMs235

func NewWbMs235(client *mqtt.Client) *WbMs235

type WbMs235Controls

type WbMs235Controls struct {
	Temperature     *ValueControl
	Humidity        *ValueControl
	AirQualityVoc   *ValueControl
	AirQualityIndex *ValueControl
	Illuminance     *ValueControl
	ExternalSensor1 *ValueControl
	ExternalSensor2 *ValueControl
	Serial          *TextControl
}

type WbMswV4151

type WbMswV4151 struct {
	Name     string
	Controls *WbMswV4151Controls
}

func NewWbMswV4151

func NewWbMswV4151(client *mqtt.Client) *WbMswV4151

type WbMswV4151Controls

type WbMswV4151Controls struct {
	Temperature       *ValueControl
	Humidity          *ValueControl
	Co2               *ValueControl
	AirQualityVoc     *ValueControl
	SoundLevel        *ValueControl
	Illuminance       *ValueControl
	MaxMotion         *ValueControl
	CurrentMotion     *ValueControl
	Buzzer            *SwitchControl
	RedLed            *SwitchControl
	GreenLed          *SwitchControl
	LedPeriods        *RangeControl
	LedGlowDurationms *RangeControl
	LearnToRam        *SwitchControl
	PlayFromRam       *PushbuttonControl
	LearnToRom1       *SwitchControl
	LearnToRom2       *SwitchControl
	LearnToRom3       *SwitchControl
	LearnToRom4       *SwitchControl
	LearnToRom5       *SwitchControl
	LearnToRom6       *SwitchControl
	LearnToRom7       *SwitchControl
	PlayFromRom1      *PushbuttonControl
	PlayFromRom2      *PushbuttonControl
	PlayFromRom3      *PushbuttonControl
	PlayFromRom4      *PushbuttonControl
	PlayFromRom5      *PushbuttonControl
	PlayFromRom6      *PushbuttonControl
	PlayFromRom7      *PushbuttonControl
	Serial            *TextControl
}

type WbMwacV293

type WbMwacV293 struct {
	Name     string
	Controls *WbMwacV293Controls
}

func NewWbMwacV293

func NewWbMwacV293(client *mqtt.Client) *WbMwacV293

type WbMwacV293Controls

type WbMwacV293Controls struct {
	P1Volume       *ValueControl
	P2Volume       *ValueControl
	InputF1        *SwitchControl
	InputF1Counter *ValueControl
	InputF2        *SwitchControl
	InputF2Counter *ValueControl
	InputF3        *SwitchControl
	InputF3Counter *ValueControl
	InputF4        *SwitchControl
	InputF4Counter *ValueControl
	InputF5        *SwitchControl
	InputF5Counter *ValueControl
	InputS6        *SwitchControl
	InputS6Counter *ValueControl
	OutputK1       *SwitchControl
	OutputK2       *SwitchControl
	LeakageMode    *SwitchControl
	CleaningMode   *SwitchControl
	Serial         *TextControl
}

type Wbrules

type Wbrules struct {
	Name     string
	Controls *WbrulesControls
}

func NewWbrules

func NewWbrules(client *mqtt.Client) *Wbrules

type WbrulesControls

type WbrulesControls struct {
	RuleDebugging *SwitchControl
}

Jump to

Keyboard shortcuts

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