fritz_api v1.0.2 FritzApi.Client View Source

Stateful API Client that takes care of renewing the session id when needed.

It supports the same commands as the FritzApi module.

Usage

iex> FritzApi.Client.start("admin", "changeme")
iex> FritzApi.Client.get_device_list_infos()
{:ok, [%{
  ain: "687690315761",
  fwversion: "03.87",
  id: 21,
  manufacturer: "AVM",
  name: "FRITZ!DECT #1",
  powermeter: %{energy: 0.475, power: 0.0},
  present: true,
  productname: "FRITZ!DECT 200",
  switch: %{
    devicelock: false,
    lock: false,
    mode: :manual,
    state: false
  },
  temperature: %{
    celsius: 23.5,
    offset: 0.0
  }
}]}
iex> FritzApi.Client.set_switch_off("687690315761")
:ok
iex> FritzApi.Client.get_temperature("687690315761")
{:ok, 23.5}

Link to this section Summary

Link to this section Functions