NAME

Net::Fritz::Box - main configuration and entry point for Net::Fritz distribution

VERSION

version v0.0.5

SYNOPSIS

my $fritz = Net::Fritz::Box->new();
$fritz->dump();

my $fritz_ssl = Net::Fritz::Box->new(
    upnp_url => 'https://fritz.box:49000'
);

my $fritz_auth = Net::Fritz::Box->new(
    username => 'admin',
    password => 's3cr3t'
);

DESCRIPTION

This class the global configuration state and provides discovery of Net::Fritz::Devices.

ATTRIBUTES (read-only, defaults can be changed)

upnp_url

Default value: http://fritz.box:49000

Base URL for all operations. This must point to your device. The default value expects a standard Fritz!Box installation with working local DNS.

If you can't do DNS lookups for your router, use an IP address instead.

If you have a Fritz!Box and don't know its IP, you can try 192.168.179.1 or 169.254.1.1, these adresses seem to be hardcoded for "emergency use" after a misconfiguration.

An address starting with https:// enables secure communication over SSL, but see "SSL" in Net::Fritz for bugs and limitations.

trdesc_path

Default value: /tr64desc.xml

The path below "upnp_url" from where the TR064 service description is fetched. There should be no need to change the default.

username

Default value: none

Sets the username to use for authentication against a device.

password

Default value: none

Sets the password to use for authentication against a device.

error

See "error" in Net::Fritz::IsNoError.

METHODS

new

Creates a new Net::Fritz::Box object. This is propably the first thing to do when using Net::Fritz. Expects parameters in key => value form with the following keys to overwrite the default values:

"upnp_url"
"trdesc_path"
"username"
"password"

discover

Tries to discover the TR064 device at the current "upnp_url". Returns a Net::Fritz::Device on success. Accepts no parameters.

dump(indent)

Returns some preformatted multiline information about the object. Useful for debugging purposes, printing or logging. The optional parameter indent is used for indentation of the output by prepending it to every line.

errorcheck

See "errorcheck" in Net::Fritz::IsNoError.

SEE ALSO

See Net::Fritz for general information about this package, especially "INTERFACE" in Net::Fritz for links to the other classes.

AUTHOR

Christian Garbs <mitch@cgarbs.de>

COPYRIGHT AND LICENSE

Copyright (C) 2017 Christian Garbs

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.