Hierarchy

  • Fritz

Constructors

  • Default constructor

    Parameters

    • username: string
    • password: string
    • Optional url: string

      if not set default is 'http://fritz.box'

    Returns Fritz

Properties

deviceList: null | AVMDevice[]
getBatteryCharge: IExt<unknown> = ...

get battery charge Attention: this function queries the whole device list to get the value for one device. If multiple device will be queried for the battery status, a better approach would be to get the device list once and then filter out the devices of interest.

Param

getBulbList: IBase<string[]> = ...

get a list of all bulbs

getButtonList: IBase<string[]> = ...

get a list of all button devices

getColorBulbList: IBase<string[]> = ...

get a list of bulbs which support colors

getSwitchEnergy: IExt<number> = ...

get the total enery consumption. returns the value in Wh

Param

getSwitchName: IExt<string> = ...

get switch name

Param

getSwitchPower: IExt<null | number> = ...

get the current enery consumption of an outlet. returns the value in mW

Param

getSwitchPresence: IExt<boolean> = ...

get the outet presence status

Param

getSwitchState: IExt<boolean> = ...

get switch state

Param

getTempComfort: IExt<ITemp> = ...

get comfort temperature (Komforttemperatur)

Param

getTempNight: IExt<ITemp> = ...

get night temperature (Absenktemperatur)

Param

getTempTarget: IExt<ITemp> = ...

get target temperature (Solltemperatur)

Param

getTemplateList: IBase<any[]> = ...

get template information (json)

getThermostatList: IBase<any> = ...

get the thermostat list

getWindowOpen: IExt<boolean> = ...

Get the window open flag of a thermostat Attention: this function queries the whole device list to get the value for one device. If multiple device will be queried for the window open status, a better approach would be to get the device list once and then filter out the devices of interest.

Param

password: string
setSwitchOff: IExt<boolean> = ...

turn an outlet off. returns the state the outlet was set to

Param

setSwitchOn: IExt<boolean> = ...

turn an outlet on. returns the state the outlet was set to

Param

setSwitchToggle: IExt<boolean> = ...

toggle an outlet. returns the state the outlet was set to

Param

sid: null | string
url: string = defaultUrl
username: string

Methods

  • apply template

    Parameters

    • ain: string

    Returns Promise<unknown>

  • check if session id is OK

    Returns Promise<boolean>

  • Execute Fritz API command for device specified by AIN

    Type Parameters

    • T

    Parameters

    • sid: boolean
    • command: null | string
    • ain: null | string
    • Optional path: string
    • Rest ...param: string[]

    Returns Promise<T>

  • get basic device info (XML)

    Parameters

    • ain: string

    Returns Promise<unknown>

  • get device list by filter criteria

    Parameters

    • filter: any

    Returns Promise<AVMDevice[]>

  • get detailed device information (XML)

    Returns Promise<string>

  • Returns Promise<any>

  • get OS version

    Returns Promise<null | string>

  • get phone devices

    Returns Promise<unknown>

  • get presence from deviceListInfo

    Parameters

    • ain: string

    Returns Promise<boolean>

  • get SID

    Returns Promise<string>

  • Private

    get session id

    Parameters

    • username: string
    • password: string

    Returns Promise<string>

  • get switch list

    Returns Promise<any[]>

  • get temperature- both switches and thermostats are supported, but not powerline modules

    Parameters

    • ain: string

    Returns Promise<number>

  • get template information (XML)

    Returns Promise<string>

  • Parameters

    • html: string

    Returns void

  • Parameters

    • ain: string
    • blindState: string | number

    Returns Promise<string | number>

  • Set the color and saturation of a color bulb Valid color values are: red, orange, yellow, lime, green, turquoise, cyan, lightblue, blue, purple, magenta and pink Valid satindex values are: 0, 1 or 2

    Parameters

    • ain: string
    • color: ColorName
    • satindex: number
    • duration: number

    Returns Promise<ColorName>

  • Set the color temperature of a bulb.

    Parameters

    • ain: string
    • temperature: number

      Valid values are 2700, 3000, 3400,3800, 4200, 4700, 5300, 5900 and 6500.

    • duration: number

    Returns Promise<6500 | 5900 | 5300 | 4700 | 4200 | 3800 | 3400 | 3000 | 2700>

  • Parameters

    • enable: boolean

    Returns Promise<void>

  • activate boost with end time or deactivate boost

    Parameters

    • ain: string
    • endtime: number

    Returns Promise<number>

  • activate window open with end time or deactivate boost

    Parameters

    • deviceId: string
    • offset: number

    Returns Promise<number>

  • activate window open with end time or deactivate boost

    Parameters

    • ain: string
    • endtime: number

    Returns Promise<void>

  • Dimm the device, allowed values are 0 - 255

    Parameters

    • ain: string
    • level: number

    Returns Promise<number>

  • Dimm the device, allowed values are 0 - 100

    Parameters

    • ain: string
    • levelInPercent: number

    Returns Promise<number>

  • switch the device on, of or toggle its current state

    Parameters

    Returns Promise<IState>

  • set target temperature (Solltemperatur)

    Parameters

    • ain: string
    • temp: number

    Returns Promise<number>

  • Private

    Request helper

    Type Parameters

    • T

    Parameters

    • request: string
    • Optional options: ReqOption

    Returns Promise<T>

Generated using TypeDoc