Documentation ¶
Index ¶
- Variables
- type AvmButton
- type AvmDataObject
- type AvmDataResponse
- type AvmDevice
- type AvmDeviceAlert
- type AvmDeviceColorcontrol
- type AvmDeviceHkr
- type AvmDeviceInfo
- type AvmDeviceLevelcontrol
- type AvmDeviceList
- type AvmDevicePowermeter
- type AvmDeviceSimpleonoff
- type AvmDeviceSwitch
- type AvmDeviceTemperature
- type AvmNextChange
- type AvmSessionInfo
- type AvmTemplate
- type AvmTemplateList
- type FBconfig
- type Freeps
- func (f *Freeps) CallUpnpActionWithArgument(serviceName string, actionName string, argName string, argValue interface{}) (map[string]interface{}, error)
- func (f *Freeps) GetData() (*AvmDataResponse, error)
- func (f *Freeps) GetDeviceList() (*AvmDeviceList, error)
- func (f *Freeps) GetDeviceUID(mac string) (string, error)
- func (f *Freeps) GetMetrics() (FritzBoxMetrics, error)
- func (f *Freeps) GetSuggestedSwitchCmds() map[string][]string
- func (f *Freeps) GetTemplateList() (*AvmTemplateList, error)
- func (f *Freeps) GetUpnpDataMap(serviceName string, actionName string) (map[string]interface{}, error)
- func (f *Freeps) GetUpnpServiceActionArguments(serviceName string, actionName string) ([]string, error)
- func (f *Freeps) GetUpnpServiceActions(serviceName string) ([]string, error)
- func (f *Freeps) GetUpnpServices() ([]string, error)
- func (f *Freeps) GetUpnpServicesShort() ([]string, error)
- func (f *Freeps) HomeAutoSwitch(switchcmd string, ain string, payload map[string]string) error
- func (f *Freeps) HomeAutomation(switchcmd string, ain string, payload map[string]string) ([]byte, error)
- func (f *Freeps) SetLevel(ain string, level int) error
- func (f *Freeps) WakeUpDevice(uid string) error
- type FritzBoxMetrics
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = FBconfig{Address: "fritz.box", User: "freeps", Password: "password"}
Functions ¶
This section is empty.
Types ¶
type AvmDataObject ¶
type AvmDataObject struct { Active []*AvmDeviceInfo Passive []*AvmDeviceInfo // contains filtered or unexported fields }
type AvmDataResponse ¶
type AvmDataResponse struct {
Data *AvmDataObject
}
type AvmDevice ¶
type AvmDevice struct { Name string `xml:"name" json:",omitempty"` AIN string `xml:"identifier,attr"` ProductName string `xml:"productname,attr" json:",omitempty"` Present bool `xml:"present" json:",omitempty"` Switch *AvmDeviceSwitch `xml:"switch" json:",omitempty"` Temperature *AvmDeviceTemperature `xml:"temperature" json:",omitempty"` Powermeter *AvmDevicePowermeter `xml:"powermeter" json:",omitempty"` SimpleOnOff *AvmDeviceSimpleonoff `xml:"simpleonoff" json:",omitempty"` LevelControl *AvmDeviceLevelcontrol `xml:"levelcontrol" json:",omitempty"` ColorControl *AvmDeviceColorcontrol `xml:"colorcontrol" json:",omitempty"` HKR *AvmDeviceHkr `xml:"hkr" json:",omitempty"` Alert *AvmDeviceAlert `xml:"alert" json:",omitempty"` Button *AvmButton `xml:"button" json:",omitempty"` }
type AvmDeviceAlert ¶ added in v1.3.0
type AvmDeviceColorcontrol ¶
type AvmDeviceHkr ¶
type AvmDeviceHkr struct { Tist int `xml:"tist"` Tsoll int `xml:"tsoll"` Komfort int `xml:"komfort"` Absenk int `xml:"absenk"` Batterylow bool `xml:"batterylow"` Battery int `xml:"battery"` Windowopenactive bool `xml:"windowopenactiv"` // cannot ignore the typo here Windowopenactiveendtime int `xml:"windowopenactiveendtime"` Boostactive bool `xml:"boostactive"` Boostactiveendtime int `xml:"boostactiveendtime"` Holidayactive bool `xml:"holidayactive"` Summeractive bool `xml:"summeractive"` Lock bool `xml:"lock"` Devicelock bool `xml:"devicelock"` NextChange *AvmNextChange `xml:"nextchange"` }
type AvmDeviceLevelcontrol ¶
type AvmDeviceList ¶
type AvmDeviceList struct {
Device []AvmDevice `xml:"device"`
}
type AvmDevicePowermeter ¶
type AvmDeviceSimpleonoff ¶
type AvmDeviceSimpleonoff struct {
State bool `xml:"state"`
}
type AvmDeviceSwitch ¶
type AvmDeviceTemperature ¶
type AvmNextChange ¶ added in v1.0.2
type AvmSessionInfo ¶
type AvmTemplate ¶
type AvmTemplate struct { Name string `xml:"name"` Identifier string `xml:"identifier,attr"` ID string `xml:"id,attr"` Devices *AvmDeviceList `xml:"devices"` }
type AvmTemplateList ¶
type AvmTemplateList struct {
Template []AvmTemplate `xml:"template"`
}
type Freeps ¶
type Freeps struct { SID string // contains filtered or unexported fields }
func NewFreepsLib ¶
func NewFreepsLibWithLogger ¶ added in v1.1.0
func NewFreepsLibWithLogger(conf *FBconfig, logger logrus.FieldLogger) (*Freeps, error)
func (*Freeps) CallUpnpActionWithArgument ¶ added in v1.2.0
func (*Freeps) GetData ¶
func (f *Freeps) GetData() (*AvmDataResponse, error)
func (*Freeps) GetDeviceList ¶
func (f *Freeps) GetDeviceList() (*AvmDeviceList, error)
func (*Freeps) GetMetrics ¶
func (f *Freeps) GetMetrics() (FritzBoxMetrics, error)
func (*Freeps) GetSuggestedSwitchCmds ¶
GetSuggestedSwitchCmds returns all known switch commands and their expected parameters
func (*Freeps) GetTemplateList ¶
func (f *Freeps) GetTemplateList() (*AvmTemplateList, error)
func (*Freeps) GetUpnpDataMap ¶
func (*Freeps) GetUpnpServiceActionArguments ¶ added in v1.2.0
func (*Freeps) GetUpnpServiceActions ¶
func (*Freeps) GetUpnpServices ¶
func (*Freeps) GetUpnpServicesShort ¶
func (*Freeps) HomeAutoSwitch ¶
func (*Freeps) HomeAutomation ¶
func (*Freeps) WakeUpDevice ¶
type FritzBoxMetrics ¶
type FritzBoxMetrics struct { DeviceModelName string DeviceFriendlyName string Uptime int64 BytesReceived int64 `json:"X_AVM_DE_TotalBytesReceived64,string"` BytesSent int64 `json:"X_AVM_DE_TotalBytesSent64,string"` TransmissionRateUp int64 `json:"ByteReceiveRate"` TransmissionRateDown int64 `json:"ByteSendRate"` }
Directories ¶
Path | Synopsis |
---|---|
Package fritzbox_upnp Query UPNP variables from Fritz!Box devices.
|
Package fritzbox_upnp Query UPNP variables from Fritz!Box devices. |
Click to show internal directories.
Click to hide internal directories.