]> git.basschouten.com Git - openhab-addons.git/commitdiff
[tr064] Improve PHONEBOOK profile documentation (#9854)
authort2000 <t2000@users.noreply.github.com>
Wed, 20 Jan 2021 22:09:36 +0000 (23:09 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Jan 2021 22:09:36 +0000 (23:09 +0100)
* [tr064] Improve PHONEBOOK profile documentation

Signed-off-by: Stefan Triller <github@stefantriller.de>
bundles/org.openhab.binding.tr064/README.md

index 1da6bded01df5b77956232a3770e8ae5e065854b..daa270a635f46d8633c73c44dde66f74efa7fc93 100644 (file)
@@ -170,6 +170,7 @@ In case the format of the number in the phonebook and the format of the number f
 The configured `matchCount` is counted from the right end and denotes the number of matching characters needed to consider this number as matching.
 A `matchCount` of `0` is considered as "match everything".
 Matching is done on normalized versions of the numbers that have all characters except digits, '+' and '*' removed.
+There is an optional configuration parameter called `phoneNumberIndex` that should be used when linking to a channel with item type `StringListType` (like `Call` in the example below), which determines which number to be picked, i.e. to or from.
 
 ## Rule Action
 
@@ -218,3 +219,9 @@ Switch PresXX "[%s]" {channel="tr064:subdeviceLan:rootuid:LAN:macOnline_XX_3AXX_
 Switch PresYY "[%s]" {channel="tr064:subdeviceLan:rootuid:LAN:macOnline_YY_3AYY_3AYY_3AYY_3AYY_3AYY"}
 
 ```
+
+Example `*.items` file using the `PHONEBOOK` profile for storing the name of a caller in an item. it matches 8 digits from the right of the "from" number (note the escaping of `:` to `_3A`):
+
+```
+Call IncomingCallResolved "Caller name: [%s]" { channel="avmfritz:fritzbox:fritzbox:incoming_call" [profile="transform:PHONEBOOK", phonebook="tr064_3Afritzbox_3AfritzboxTR064", phoneNumberIndex="1", matchCount="8"] }
+```