Skip to content
inflames2k edited this page Jun 16, 2018 · 10 revisions

Project description

Common informations

The PS.FritzBox.API is a library of classes for accessing AVM Fritz!Box devices by using the TR-064 API. It's based on sending SOAP-messages to the device. Currently the following TR-064 interfaces are available:

Using the API

The usage of the API is very simple. For each TR-064 interface there is a client class providing methods for accessing informations from the device and perform actions on the device.

A simple example for accessing the online monitor informations of the AVM Fritz!Box is:

DeviceLocator locator = new DeviceLocator();
var devices = await locater.DiscoverAsync();
if(devices.Count() > 0)
{
    var device = devices.First();
    ConnectionSettings settings = new ConnectionSettings()
    {
       UserName = "inflames2k";
       Password = "secret";
    };

    var client = await device.GetServiceClient<WANCommonInterfaceConfigClient>(settings);
    OnlineMonitorInfo monitor = await client.GetOnlineMonitorAsync(0);
}

All service clients can be accessed by the FritzDevice using the method "GetServiceClient()". If a client is not valid for the device (see http://fritz.box:49000/tr64desc.xml) an application exception will be thrown. To ensure the availability of a service client the method "ContainsService()" can be used.

API Description

Clone this wiki locally