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.
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.
No, problem, not an important feature for me.
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”
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)
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.
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)
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!