Issues connecting with the TR-064 binding to FRITZ!BOX 7490

My configuration

  • openHAB3.0 on Raspberrypi 3b
  • Java Version running openHAB
    $ java -version
    openjdk version “11.0.8” 2020-07-14 LTS
    OpenJDK Runtime Environment Zulu11.41+75-CA (build 11.0.8+10-LTS)
    OpenJDK Client VM Zulu11.41+75-CA (build 11.0.8+10-LTS, mixed mode)
  • Latest build of the TR-064 binding
    244 │ Active │ 80 │ 3.1.0.202101091645 │ openHAB Add-ons :: Bundles :: TR-064 Binding
  • FritzBox!7490 with FRITZ!OS 7.21

The TR-064 binding connects to my Fritz!Box and three subdevices “LANDevice - FRITZ!Box 7490”, “WANDevice - FRITZ!Box 7490”, “WANDevice - FRITZ!Box 7490” are online. All the items of subdevices LANDevice and WANDevice work perfectly.

Anyway please help out with some issues remaining:

1. PhoneBook Lookup

The code in one of my rules

val incCall = FRITZBox7490_EingehenderAnruf.state as StringListType
val callerNumber = incCall.getValue(1)
val tr064Actions = getActions("tr064","tr064:fritzbox:2e95f885f3")
val callerName = tr064Actions.phonebookLookup(callerNumber)

(the item FRITZBox7490_EingehenderAnruf is connected to the channel incomingCall(Call) of the “avmfritz” binding)
results in filling the “callerName” variable with the value of the “callerNumber” value. There exists an entry in the phonebook with the number in variable “callerNumber”, but this code can’t find it. The old TR064 binding of openHAB2 found the numbers in the phonebook of the same FritzBox.

2. Channel of WANConnectionDevice throwing errors in the openhab.log
Linking any channel of the subdevice WANConnectionDevice creates a similar message in the openhab.log
Here is one example of the channelType “wanIpAddress”
2021-01-10 00:19:22.583 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanIpAddress, getAction=GetInfo, dataType='string, parameter='null'}: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 401 (Invalid Action)
The value of the corresponding item remaines undefined and is never instantiated.

3. Missing Channels of the Bridge

The documentation TR-064 - Bindings | openHAB states, that these channel were existing:

  • callDeflectionEnable
  • callList
  • missedCalls
  • outboundCalls
  • inboundCalls
  • rejectedCalls
  • tamEnable
  • tamNewMessages

but they don’t appear in the GUI, even when the checkbox “Show advanced” is checked in the things page.

  1. Did you check it is exactly the same number (including prefix like + or 00?

  2. Fixed in 3.1, DSL connections use different channels than cable connections.

  3. You need to configure these channels in the thing parameters. After you did, they appear.

Thanks for your quick response.

  1. I believe, that it is exactly the same number. I have a Fritz!Fon, that also consults the phonebook of the Fritz!Box. This Fritz!Fon does find the entry in the phonebook and shows the name of the caller in the display.
    Is there a way to trace the query of the phonebook in the Fritz!Box? I believe, setting the log level of the TR-064 binding to TRACE would trace it inside of openHAB.

  2. No, problem, not an important feature for me.

  3. Ah, now I understand!

  • I first have to ckeck the “Show advanced” checkbox of the things parameters page of the Fritz!Bix

  • Then I have to fill in a number in the parameter fields, e.g. “Missed Call Days”, “Rejected Call Days”, “Inbound Call Days”, “Outbound Call Days”

  • Then new channels appear, that I can use.

These new channel works for me now! Thank You!

1 Like

You could set org.openhab.binding.tr064.internal.phonebook to TRaCE logging

Oh, this is my fault. I hadn’t restarted openHAB after installing the latest version of the TR-064 binding with the karaf console:
openhab> update org.openhab.binding.tr064 https://ci.openhab.org/job/openHAB-Addons/lastSuccessfulBuild/artifact/bundles/org.openhab.binding.tr064/target/org.openhab.binding.tr064-3.1.0-SNAPSHOT.jar

After performing a restart of openHAB entries in the phonebook are found.

By the way tracing gave these results:
openhab> log:set TRACE org.openhab.binding.tr064.internal.phonebook
openhab> log:tail org.openhab.binding.tr064.internal.phonebook
16:19:37.516 [DEBUG] [internal.phonebook.Tr064PhonebookImpl] - Downloaded phonebook Telefonbuch: {015212345678=MyMobilePhonenumber, 015212345679=MyWifesMobilePhonenumber, <following a long list of comma separated phonebook entries, which are left out here for privacy reasons>}
16:21:48.458 [TRACE] [internal.phonebook.Tr064PhonebookImpl] - Normalized ‘015212345678’ to ‘015212345678’, matchString is ‘015212345678’
16:26:28.722 [TRACE] [internal.phonebook.Tr064PhonebookImpl] - Normalized ‘015212345679’ to ‘015212345679’, matchString is ‘015212345679’
(phone numbers changed manually)

I believe, the traces show it, like it should be.

Thanks for your help, great binding!

For number 3: Ist there a way to do this in a things file?

Probably, but no idea. Only advice from me is: don‘t use things-file.

For number 3: Ist there a way to do this in a things file?

Found this out while playing around with the binding:

You can specify the parameters in the bridge definition, same as the password and othe connection parameters, e.g.: missedCallDays=“1”

The channel for the item definition corresponds to the number of days in the parameters, e.g.:
channel=“tr064:fritzbox:fritzbox-tr064:missedCalls_1”

You have to specify the number of days in quotes, like above, specifying an integer results in an error

After having updated to openHAB 3.1 stable version recently, I just want to share feedback, that issue 2 still exists with my Fritz!Box7490. Same eror messages in the log and same behaviour.

Did you change to the „new“ channels? They have different names.

I deleted the items, channels and the thing “WANConnectionDevice - FRITZ!Box 7490”, rescanned the binding and recreated the thing “WANConnectionDevice - FRITZ!Box 7490” again. Then I restarted openhab. Afterwards the item “WANConnectionDeviceFRITZBox7490_WANPPPIPAddress” shows the correct value. But for the other items of this subdevice I find these entries in the log:

2021-07-10 23:49:59.457 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=uptime, getAction=GetInfo, dataType='ui4, parameter='null'}: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 401 (Invalid Action)
2021-07-10 23:50:00.129 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanIpAddress, getAction=GetInfo, dataType='string, parameter='null'}: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 401 (Invalid Action)
2021-07-10 23:50:00.185 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanConnectionStatus, getAction=GetInfo, dataType='string, parameter='null'}: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 401 (Invalid Action)

There are new channels with PPP for that, too.

After upgrading from openHAB 3.0.2 I had to delete all the channels, things and I deinstalled the binding. After installing the binding again, creating all the things and channels all channels worked with version 3.1.0. Thanks for the hints!