Versions in this module Expand all Collapse all v1 v1.0.0 Jan 12, 2020 Changes in this version + type Capability int + const AlertTrigger + const DECTRepeater + const HANFUNCompatibility + const HANFUNUnit + const HeatControl + const Microphone + const PowerSensor + const StateSwitch + const TemperatureSensor + type Client struct + BaseURL url.URL + Password string + Username string + func New(baseURL, username, password string, logger *zap.Logger) (*Client, error) + func (c *Client) Close() error + func (c *Client) Devices(ctx context.Context) ([]Device, error) + func (c *Client) NetworkStats(ctx context.Context) (*TrafficMonitoringData, error) + type Device struct + AlertSensor struct{ ... } + Button struct{ ... } + CapabilitiesBitmap string + FirmwareVersion string + Identifier string + InternalID string + Manufacturer string + Name string + Power PowerInfo + Present int + ProductName string + Switch SwitchInfo + Temperature TemperatureInfo + Thermostat struct{ ... } + func (d *Device) CanMeasurePower() bool + func (d *Device) CanMeasureTemperature() bool + func (d *Device) Has(cs ...Capability) bool + func (d *Device) IsSwitch() bool + type DeviceList struct + Devices []Device + type Permissions struct + AccessLevels []string + Names []string + type PowerInfo struct + Energy string + Power string + Voltage string + func (i PowerInfo) GetEnergy() float64 + func (i PowerInfo) GetPower() float64 + func (i PowerInfo) GetVoltage() float64 + type Session struct + BlockTime string + Challenge string + Rights Permissions + SID string + type SwitchInfo struct + DeviceLock string + Lock string + Mode string + State string + func (i SwitchInfo) IsPoweredOn() bool + type TemperatureInfo struct + Celsius string + Offset string + func (i TemperatureInfo) GetCelsius() float64 + type TrafficMonitoringData struct + DownStreamGuest []float64 + DownStreamMedia []float64 + DownstreamInternet []float64 + UpstreamDefaultPriority []float64 + UpstreamGuest []float64 + UpstreamHighPriority []float64 + UpstreamLowPriority []float64 + UpstreamRealtime []float64