AVM FRITZ!Box Call Monitor
The fritzbox_callmonitor
sensor monitors the call monitor exposed by AVM FRITZ!Boxidle
, 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.
Prerequisites
To use the FRITZ!Box call monitor in your installation, a user with at least Voice messages, faxes, FRITZ!App Fon and call list
rights has to be created:
- Open the web user interface via
fritz.box
or the IP address of your FRITZ!Box (e.g.192.168.1.1
). - Log in with your admin user credentials. The default admin user credentials can be found at the bottom of your FRITZ!Box.
- Navigate to System -> FRITZ!Box User.
- Click the
Add User
button. - Enable the option
User account enabled
. - Enter a username and password.
- Check the rights box next to
Voice messages, faxes, FRITZ!App Fon and call list
. - Click the
Apply
button.
You also need network access from HA to your FRITZ!Box on port tcp/1012
for the call monitoring, as well as one time access to port tcp/80
for setting up the integration.
Setup
To activate the call monitor on your FRITZ!Box, dial #96*5* from any phone connected to it.
配置
要将 AVM FRITZ!Box Call Monitor device 添加到您的 Home Assistant 实例中,请使用此 My 按钮:
手动配置步骤
如果上述 My 按钮不起作用,您也可以手动执行以下步骤:
-
浏览到您的 Home Assistant 实例。
-
转到
设置 > 设备与服务。 -
在右下角,选择
Add Integration 按钮。 -
从列表中选择 AVM FRITZ!Box Call Monitor。
-
按照屏幕上的说明完成设置。
If you want Home Assistant to resolve numbers to names based on your FRITZ!Box phone book, you have to configure the correct prefixes. Usually, you just need one single prefix, which equals your country calling code, e.g. +49
for Germany or +33
for France. Find the right prefix on Wikipedia
Examples
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.
automation:
- alias: "Notify about phone state"
triggers:
- trigger: state
entity_id: sensor.phone
actions:
- action: notify.notify
data:
title: "Phone"
message: >-
{% if is_state("sensor.phone", "idle") %}
Phone is idle
{% elif is_state("sensor.phone", "dialing") %}
Calling {{ state_attr('sensor.phone', 'to_name') }} ({{ state_attr('sensor.phone', 'to') }})
{% elif is_state("sensor.phone", "ringing") %}
Incoming call from {{ state_attr('sensor.phone', 'from_name') }} ({{ state_attr('sensor.phone', 'from') }})
{% else %}
Talking to {{ state_attr('sensor.phone', 'with_name') }} ({{ state_attr('sensor.phone', 'with') }})
{% endif %}