Fritzbox call overview

…ah, I remember your post…

But not for that - thanks for your work!



Hello sidamos,

I had an Idea to display allways the last name (or unbekannt) of an

incoming call.

Like most of the Fritzbox and Habpaneluser I am using the script to

resolve the incomingCallerName using the phonebook.

So I dropped out the "if"-Statement from the widged and now I am

showing the item fbox_LastInCallName instead of

witch shows the name without my own number and if the number is not

found in my phonebook, the entry in the table is “unbekannt”.

    <div class="widget">

            <div class="name">Anruf von</div>

            <div class="valueGroup"><div


With that - there´s allways an entry at "Anruf von" and never a

simple “,”

Looks ok for me...;-)

Best regards


Where does this come from?

Hello Sidamos,
sorry - I thought it were part of the binding doku of fritzboxtr064.
There, at the end you can find a rule to resolve the phonenumber.
But the item I ment (or that part of the rule) was copied from a rule based on that of the doku:

rule "Phone is ringing"
    // fboxRinging is a switch item which switches to ON if call is detected
    Item fboxRinging changed from OFF to ON 
    logInfo("Anrufermeldung", "Generating caller name message...")
    val incCall = fboxIncomingCall.state as StringListType
    val callerNumber = incCall.getValue(1)
    val incCallResolved = fboxIncomingCallResolved.state as StringListType
    val callerName = incCallResolved.getValue(1)
	if (callerName.startsWith("Name not found for"))
    // Den Namen mit Unbekannt füllen
    callerName = "Unbekannt"
    // do something with callerName
	val tmpCallName   = callerName.removeStart("yourNumber##")
		postUpdate(fbox_LastInCallName, tmpCallName)
	val tmpCallNum0   = callerNumber
		postUpdate(fbox_LastInCall, tmpCallNum0)	

I think most of the binding-users use a similar rule…
For this one you need two more (string-)items:
As I said - works for me… :slight_smile:
and thanks again.

Hi Klaus.
I use your rule “Phone is ringing”. Works great. But i get this info in logview after saveing:

2019-03-01 01:17:42.095 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘Anrufbeantworter.rules’, using it anyway:

Assignment to final variable

2019-03-01 01:17:42.105 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘Anrufbeantworter.rules’

==> /var/log/openhab2/events.log <==

Any ideas?
Thanks and greetings,

I think callerName should be declared as var because a value is assigned a second time with
callerName = “Unbekannt”

Hello Manuel and Markus,
sorry, I stuck in work this week.
I think Manuel got it - it must be a var(iable) and not a fixed value.
As I told before, I´m not a developer - I just copied it from some other kind user, that got it made :slight_smile:
nice weekend

Nice Work! :slight_smile:
I tried the installation with the github files.

The script does not work for me.

I´m getting this error message from the script:

lock obtained
downloading message list for TAM 0...wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
0 bytes.
downloading call list...wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
0 bytes.

That is strange. What wget do you have?

$ wget --version
GNU Wget 1.20.3 built on linux-gnu.

Hello Sidamos,

I have:

wget --version
GNU Wget 1.18 built on linux-gnueabihf.

It seems that the URL variable is empty (as wget says).

I added a echo - line for the variable and get no output on the console:

function downloadMissingTamMessages() {
  while [ $tamidx -lt $TAM_COUNT ]; do 
    if [ ! -f $TMP/tam${tamidx}.xml ]; then
      echo -n "downloading message list for TAM $tamidx..."
      URL=$(soapCall "$BASEURL/upnp/control/x_tam" "urn:dslforum-org:service:X_AVM-DE_TAM:1" GetMessageList NewURL "<NewIndex>${tamidx}</NewIndex>")
      **echo -n "Test $URL"**
      wget --quiet -O - $URL | awk '/<Message>/,/<\/Message>/ { printf $0 } /<\/Message>/ { print }'>$TMP/tam${tamidx}.xml 
      echo "$(stat -c%s $TMP/tam${tamidx}.xml) bytes."

    tamidx=$(expr $tamidx + 1)

Now I got it.

After adding an echo line to the soapCall() function:

echo “test $RESPONSE”

I could see what is wrong:

test <HTML><HEAD><TITLE>401 Unauthorized (ERR_NONE)</TITLE></HEAD><BODY><H1>401 Unauthorized</H1><BR>ERR_NON

I´ve changed the Password for the user to something which contains no special characters. Now it works.
I´m no bash pro, but maybe somebody could add a debug line in the script on github?

I only change the UID and Secret vars and the path to the text file. The 16 bytes in the text file are:

First, I would like to mention that I really like this project and that this comment is not meant to criticize your work.
So I decided to integrate this call log in my Habpanel configuration.

But I‘m getting the same error as mentioned above. I don‘t see any mistake of mine so I would be happy to hear some ideas how to fix this issue.

Hi guys,

today I tried to implement this nice call overview with the FritzBox on my system.
Due to the very good explanation and all the files I was successful.
On a normal PC I see the call overview but on an Android tablet with the usage of Habmin App it don´t.
Does someone know that the “automatic update” script provided by vbier does not work with this App? Or are there known limitations?

Thank you.

I am running openhab in windows any idea how to run this script??
executeCommandLine(“sudo /path/to/your/script/”)
i cant make it work under windows.

An sh script isn’t going to run in Windows.

You might be able to rename it to [scriptName.bat] and get it to work. But you’d probably have to modify or replace the commands in the file, too.

I give up 3 days i am trying without success. Nobody here running openhab on windows with this script??? maybe a windows tool to download the call list from the fritzbox??
So looking now my panel

The call list off course its a repeat from incomingcall item.

Has anyone already adapted this to OH 3?

From the first look, it seems one has to use the AVMFritz and the TR064 binding together now?

But the AVMFritz binding has no channels at all for the FritzBox. I upgraded from 2.5.9 to 3.0.1.

Have a look here:

1 Like

Thank you, this is helpful.