Documentation ¶
Index ¶
- type Alarms
- type AlarmsControls
- type Buzzer
- type BuzzerControls
- type Control
- type ControlWatcherPayload
- type Dooya0X0104
- type Dooya0X0104Controls
- type Hwmon
- type HwmonControls
- type Knx
- type KnxControls
- type LightMode
- type LightModeControls
- type Metrics
- type MetricsControls
- type Network
- type NetworkControls
- type Powerstatus
- type PowerstatusControls
- type PushbuttonControl
- type RangeControl
- type RangeControlWatcherPayload
- type Scriptsleep
- type ScriptsleepControls
- type SwitchControl
- type SwitchControlWatcherPayload
- type System
- type SystemControls
- type Termostat
- type TermostatControls
- type TextControl
- type ValueControl
- type ValueControlWatcherPayload
- type WbAdc
- type WbAdcControls
- type WbGpio
- type WbGpioControls
- type WbLed150
- type WbLed150Controls
- type WbMdm381
- type WbMdm381Controls
- type WbMr6Cu145
- type WbMr6Cu145Controls
- type WbMrm2Mini61
- type WbMrm2Mini61Controls
- type WbMs235
- type WbMs235Controls
- type WbMswV4151
- type WbMswV4151Controls
- type WbMwacV293
- type WbMwacV293Controls
- type Wbrules
- type WbrulesControls
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 }
type AlarmsControls ¶
type AlarmsControls struct {
Log *TextControl
}
type Buzzer ¶
type Buzzer struct { Name string Controls *BuzzerControls }
type BuzzerControls ¶
type BuzzerControls struct { Enabled *SwitchControl Frequency *RangeControl Volume *RangeControl }
type Control ¶
type Control struct {
// contains filtered or unexported fields
}
func (*Control) AddWatcher ¶
func (c *Control) AddWatcher(f func(payload ControlWatcherPayload))
type ControlWatcherPayload ¶
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 }
type HwmonControls ¶
type HwmonControls struct { BoardTemperature *ValueControl CpuTemperature *ValueControl }
type Knx ¶
type Knx struct { Name string Controls *KnxControls }
type KnxControls ¶
type KnxControls struct {
Data *TextControl
}
type LightMode ¶
type LightMode struct { Name string Controls *LightModeControls }
func NewLightMode ¶
type LightModeControls ¶
type LightModeControls struct { Enabled *SwitchControl State *ValueControl }
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 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 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 System ¶
type System struct { Name string Controls *SystemControls }
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 ¶
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 WbAdc ¶
type WbAdc struct { Name string Controls *WbAdcControls }
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 }
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 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 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 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 WbrulesControls ¶
type WbrulesControls struct {
RuleDebugging *SwitchControl
}
Source Files ¶
- Termostat.go
- alarms.go
- buzzer.go
- control.go
- dooya_0x0104.go
- hwmon.go
- knx.go
- light-mode.go
- metrics.go
- network.go
- power_status.go
- pushbutton_control.go
- range_control.go
- script_sleep.go
- switch_control.go
- system.go
- text_control.go
- value_control.go
- wb-adc.go
- wb-gpio.go
- wb-led_150.go
- wb-mdm3_81.go
- wb-mr6cu_145.go
- wb-mrm2-mini_61.go
- wb-ms_235.go
- wb-msw-v4_151.go
- wb-mwac-v2_93.go
- wbrules.go
Click to show internal directories.
Click to hide internal directories.