FRITZ!Box Call Monitor

The fritzbox_callmonitor sensor monitors the call monitor exposed by AVM Fritz!Box routers on TCP port 1012. It will assume the values idle, ringing, dialing or talking with the phone numbers involved contained in the state attributes. It can also access the internal phone book of the router to look up the names corresponding to the phone numbers and store them in the state attributes.


To build the package you have to install some dependencies first.

$ sudo apt-get update
$ sudo apt-get install libxml2-dev libxslt-dev \
  python3-setuptools zlib1g-dev build-essential

If you installed Home Assistant in a virtualenv, also run the following command inside it. Be patient this will take a while.

pip3 install lxml


To activate the call monitor on your Fritz!Box, dial #96*5* from any phone connected to it.


To use the Fritz!Box call monitor in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
  - platform: fritzbox_callmonitor

Configuration Variables



Give the sensor a friendly name for in the front-end.

Default value:




The IP address of your router, e.g., It is optional since every fritzbox is also reachable by using the IP address

Default value:



The TCP port of the call monitor. There is usually no reason to change this.

Default value:




Fritz!Box user’s user name. This is required to use the phone book lookup feature. The user needs to have the “voice message, fax message, Fritz!App Fon and call list” permission.



Fritz!Box user’s user password. This is required to use the phone book lookup feature.



Numerical ID identifying the phonebook to be used. If there is just one phonebook, this is usually 0.

Default value:




In case of a local call, the phone number seen by the router might differ from the one stored in the phone book by an area code, similarly for the international prefix. To remedy this, a list of prefixes, that can be appended to the phone number in case it is not found in the phone book, can be given.


Full configuration

The example below shows a full configuration for a call monitor with phone book support.

# Example configuration.yaml entry
  - platform: fritzbox_callmonitor
    name: Phone
    username: my_username
    password: my_password
    phonebook: 0
      - '+49'
      - '+4989'
      - '089'

Send notifications on state change

This example shows how to send notifications whenever the sensor’s state changes. You will get notified both when you receive a call and also when a call is placed.

# Example configuration.yaml entry.
  - alias: "Notify about phone state"
      - platform: state
      - service: notify.notify
          title: "Phone"
          message: >-
            {% if is_state("", "idle") %}
              Phone is idle
            {% elif is_state("", "dialing") %}
              Calling {{ state_attr('', 'to_name') }} ({{ state_attr('', 'to') }})
            {% elif is_state("", "ringing") %}
              Incoming call from {{ state_attr('', 'from_name') }} ({{ state_attr('', 'from') }})
            {% else %}
              Talking to {{ state_attr('', 'with_name') }} ({{ state_attr('', 'with') }})
            {% endif %}