fritz_tr064 0.1.0 copy "fritz_tr064: ^0.1.0" to clipboard
fritz_tr064: ^0.1.0 copied to clipboard

A Dart library for accessing Fritz!Box routers via the TR-064 protocol (SOAP over HTTP with content-level digest authentication).

example/example.dart

import 'package:fritz_tr064/fritz_tr064.dart';

import 'config.dart';

void main() async {
  final client = await createClient();

  try {
    print('Connected! Found ${client.description!.allServices.length} services.');

    // Use the DeviceInfo service
    final deviceInfo = client.deviceInfo();
    if (deviceInfo != null) {
      final info = await deviceInfo.getInfo();
      print('Model: ${info.modelName}');
      print('Software: ${info.softwareVersion}');
      print('Serial: ${info.serialNumber}');
      print('Uptime: ${info.upTime} seconds');
    }

    // Or call any service action generically
    final result = await client.call(
      serviceType: 'urn:dslforum-org:service:DeviceInfo:1',
      controlUrl: '/upnp/control/deviceinfo',
      actionName: 'GetSecurityPort',
    );
    print('Security port: ${result['NewSecurityPort']}');
  } finally {
    client.close();
  }
}
1
likes
0
points
220
downloads

Publisher

verified publisherhaumacher.de

Weekly Downloads

A Dart library for accessing Fritz!Box routers via the TR-064 protocol (SOAP over HTTP with content-level digest authentication).

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto, http, xml

More

Packages that depend on fritz_tr064