The tr064 Plugin¶
Todo
Automatische Screenshot-Generierung (aus Dummy-Daten)
Description¶
The plugin is an interface to routers that implement the TR-064 protocol, like
the widely used Fritz!Box. The calllist
widget from this plugin displays
a call list that contains the name of the callers (when known to the router)
as well as the records of the answering machine.
Settings¶
For a general understanding of how the configuration files are structured and what elements and attributes are it is recommended to read this section first: Pages and structure of CometVisu.
The behaviour and appearance of the powerspectrum plugins can be influenced by using certain attributes and elements. The following tables show the allowed attributes and elements and their possible values. The screenshots show, how both can be edited in the editor.
Attributes underlined by ..... are mandatory, all the others are optional and be omitted.
Allowed attributes in the calllist-element¶
Element | Attribute | |||
---|---|---|---|---|
Name | Content | Description | ||
calllist | device | string | ID/Name of the device as used in the hidden configuration. | |
max | decimal | Maximum numer of entries to fetch from the router. | ||
columns | string | By semicolon separated list of column types (allowed types: caller, date, name, nameOrCaller, tam, type) | ||
TAM | string | Icon for telephone answering machine. | ||
TAMColor | string | |||
TAMwait | string | Icon for waiting for telephone answering machine. | ||
TAMwaitColor | string | |||
TAMplay | string | Icon for playing the telephone answering machine. | ||
TAMplayColor | string | |||
TAMstop | string | Icon for stopping the telephone answering machine. | ||
TAMstopColor | string | |||
typeIncoming | string | Icon for incoming call. | ||
typeIncomingColor | string | |||
typeMissed | string | Icon for missed call. | ||
typeMissedColor | string | |||
typeOutgoing | string | Icon for outgoing call. | ||
typeOutgoingColor | string | |||
typeActiveIncoming | string | Icon for active incoming call. | ||
typeActiveIncomingColor | string | |||
typeRejectedIncoming | string | Icon for rejected incoming call. | ||
typeRejectedIncomingColor | string | |||
typeActiveOutgoing | string | Icon for active outgoing call. | ||
typeActiveOutgoingColor | string | |||
typeUnknown | string | Icon for unknown call type. | ||
typeUnknownColor | string | |||
refresh | decimal | Sets the update rate for the call list in seconds |
Allowed child-elements und their attributes¶
Element | Attribute | |||
---|---|---|---|---|
Structure | Name | Content | Description | |
|
colspan | decimal | Amount of coloumns this widget sould be wide. | |
colspan-m | decimal | Overrules the amount of coloumns on a medium screen. | ||
colspan-s | decimal | Overrules the amount of coloumns on a small screen. | ||
rowspan | decimal | Amount of rows this widget should be high. | ||
x | string | Horizontal position of the widget for 2D pages. | ||
x-s | string | Horizontal position of the widget for 2D pages on a small screen. | ||
x-m | string | Horizontal position of the widget for 2D pages on a medium screen. | ||
y | string | Vertical position of the widget for 2D pages. | ||
y-s | string | Vertical position of the widget for 2D pages on a small screen. | ||
y-m | string | Vertical position of the widget for 2D pages on a medium screen. | ||
z | string | Reserved for future use. | ||
width | string | Width for the widget for 2D pages. | ||
width-s | string | Width for the widget for 2D pages on a small screen. | ||
width-m | string | Width for the widget for 2D pages on a medium screen. | ||
scale | true or false | Enable/Disable scaling layout values relative to backdrop on 2d pages (default: true). | ||
scale-s | true or false | Enable/Disable scaling layout values relative to backdrop on 2d pages on a small screen (default: true). | ||
scale-m | true or false | Enable/Disable scaling layout values relative to backdrop on 2d pages on a medium screen (default: true). |
Element | Attribute | |||
---|---|---|---|---|
Structure | Name | Content | Description | |
|
name | string | ||
type | string | |||
flavour | string | Selection of a display variant. See also Flavour. | ||
color | string | |||
styling | string | Change the color of the dispayed value depending on its value. See also Styling | ||
class | string | Add this value to the CSS class so that it can be formated by a user provided style sheet. | ||
|
string | Text to display a label for the widget. |
Element | Attribute | |||
---|---|---|---|---|
Structure | Name | Content | Description | |
|
transform | string | ||
mode | disable, read, write or readwrite | |||
variant | string | |||
format-pos | decimal | |||
|
string | The GA (like: 12/0/7) for KNX-backends or the item name for openHAB-backend |
XML syntax¶
Alternatively it is possible to manually add the tr064 plugin entry to the visu_config.xml.
Caution
In the config only the UTF-8 charset is allowed. So an editor that is set to UTF-8 mode must be used.
The minimale example code for the calllist widget to create the shown screenshot is:
<?xml version="1.0" encoding="UTF-8"?>
<meta>
<plugins>
<plugin name="tr064" />
</plugins>
</meta>
<page name="TR-064" type="text">
<calllist device="fritzbox">
<label>calllist</label>
</calllist>
</page>
...
<meta>
<plugins>
<plugin name="tr064"/>
</plugins>
</meta>
...
<calllist device="fritzbox">
<label>calllist</label>
</calllist>
Prerequisites / setup of the server¶
To be able to use the plugin the server must support PHP with the extension of the SoapClient package.
On debian based systems it means that the php-soap
package must be
installed.
Setup of the Fritz!Box¶
To get access to the call list of the Fritz!Box a user with according permissons must be created (or an existing user account must be used). This is possible on the user page:
The user itself needs the rights to access the call list:
The plugin needs to know the credentials to be able to use this user. This uses the “hidden configuration” infrastructure which can be accessed by the CometVisu manager [2].
The used name must be given in the calllist widget in the attribute device
.
The key and value pairs of the hidden configuration” are:
Key | Value | Example |
---|---|---|
uri | The URI to access the TR-064 interface | https://192.168.0.1:49443/ |
user | The username for the TR-064 access | CometVisuTestUser |
pass | The password for the TR-64 access | pa3bvNM4j9z4 |
selfsigned | Allow self signed certificates when true |
false |
Apart from the manager it is possible to edit the file config/hidden.php
manually and add a line like:
<?php
// File for configurations that shouldn't be shared with the user
$hidden = array(
'fritzbox' => array('uri' => 'https://192.168.0.1:49443/', 'user' => 'CometVisuTestUser', 'pass' => 'pa3bvNM4j9z4')
);
?>
Hint
When the connection to the router is secured by SSL (i.e. the URI starts with
https
) it is usual that selfsigned
must be set to true
as a
router in the home network will work usually with a self signed certificate.
Footnotes
[1] | In the simple view some things might be not visible. The expert view will show all entries. |
[2] | The “hidden configuration” contains configuration data that is not transmitted to the client any stay on the server. So there information is “hidden” to the user. On the server it is still readable in clear text. This is also true for the manager. This by itself doesn’t create a secure environment, but it supports building one. There at least the manager must be inaccessible to the user. |