AVM FRITZ!Box Tools
The AVM FRITZ!Box Tools integration allows you to control your AVM FRITZ!Box
There is support for the following platform types within Home Assistant:
- Device tracker设备跟踪器用于跟踪设备的存在或位置。 [Learn more] - presence detection by looking at connected devices.
- Binary sensor二进制传感器返回只有两种状态的信息 - 例如开或关。 [Learn more] - connectivity status.
- Image图像集成允许其他集成显示静态图像。 [Learn more] - QR code for Guest Wi-Fi.
- Button按钮实体可以触发事件或触发对设备或服务的动作。它可以与物理按钮进行比较。按钮实体没有像“开”或“关”这样的状态,但在 Home Assistant UI 或通过动作按下时会保留最后按下的时间戳。 [Learn more] - reboot, reconnect, firmware update.
- Sensor传感器返回有关事物的信息,例如水箱中的水位。 [Learn more] - external IP address, uptime and network monitors.
- Switch开关是具有两种状态的东西,您可以在这两种状态之间进行选择,例如打开或关闭插座。 [Learn more] - call deflection, port forward, parental control and Wi-Fi networks.
- Update更新实体是指示设备或服务是否有可用更新的实体。 [Learn more] - firmware status of the device.
配置
要将 AVM FRITZ!Box Tools integration 添加到您的 Home Assistant 实例中,请使用此 My 按钮:
AVM FRITZ!Box Tools 可以被 Home Assistant 自动发现。如果发现了实例, 它将显示为 已发现。您可以立即进行设置。
手动配置步骤
如果没有自动发现,请不要担心!您可以设置一个 手动集成条目:
-
浏览到您的 Home Assistant 实例。
-
转到
设置 > 设备与服务。 -
在右下角,选择
Add Integration 按钮。 -
从列表中选择 AVM FRITZ!Box Tools。
-
按照屏幕上的说明完成设置。
Both the TR-064 (Permit access for apps) and UPnP (Transmit status information over UPnP) protocol needs to be enabled in the FRITZ!Box under Home Network > Network > Network settings > Access Settings in the Home Network for Home Assistant to login and read device info.
Username
It is recommended to create a separate user to connect Home Assistant to your FRITZ!Box. To create a user, in the FRITZ!Box go to System > FRITZ!Box Users > Users > Add User. Make sure the user has the FRITZ!Box Settings permission.
If you still want to use the predefined user, please note that as of FRITZ!OS 7.24, the FRITZ!Box creates a random username for the admin user if you didn’t set one yourself. This can be found after logging into the FRITZ!Box and visiting System > FRITZ!Box Users > Users. The username starts with fritz
followed by four random numbers. Under properties on the right it says created automatically
. Prior to FRITZ!OS 7.24, the default username was admin
.
Actions
Available actions动作在 Home Assistant 的多个地方使用。作为脚本或自动化的一部分,动作定义了触发器被激活后将发生的事情。在脚本中,动作被称为序列。 [Learn more]: set_guest_wifi_password
Action set_guest_wifi_password
Set a new password for the guest wifi. The password Length must be between 8 and 63 characters long.
Data attribute | Required | Description |
---|---|---|
device_id |
yes | Only act on a specific router |
password |
no | New password for the guest wifi (will be auto-generated if not defined) |
length |
no | Length of the auto-generated password. (default 12) |
Integration options
It is possible to change some behaviors through the integration options. To change the settings, go to Settings > Devices & services. Select the AVM FRITZ!Box Tools integration, then select Configure.
Consider home
Number of seconds that must elapse before considering a disconnected device “not at home”.
Enable old discovery method
Needed on some scenarios like no mesh support (FritzOS <= 6.x) or mixed brands network devices or LAN switches.
Additional information
Parental control switches
Parental control switches开关是具有两种状态的东西,您可以在这两种状态之间进行选择,例如打开或关闭插座。 [Learn more] can be used to enable and disable internet access of individual devices. You can also find the current blocking state of the individual devices in the UI of the FRITZ!Box under Internet > Filters > Parental Controls > Device Block.
Device tracker
Note: If you don’t want to automatically track newly detected devices, disable the integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] system option Enable new added entities
.
Port forward switches
Due to security reasons, AVM implemented the ability to enable/disable a port forward rule only from the host involved in the rule. As a result, this integration will create entities only for rules that have your Home Assistant host as a destination.
Note 1: On your FRITZ!Box under Internet > Permit Access, enable the setting Permit independent port sharing for this device
for the device which runs HA.
Note 2: Only works if you have a dedicated IPv4 address (it won’t work with DS-Lite)
WiFi switches
WiFi switches开关是具有两种状态的东西,您可以在这两种状态之间进行选择,例如打开或关闭插座。 [Learn more] are created for each SSID the FRITZ!Box is serving. With these switches, one can activate and deactivate each single SSID.
Note 1: In a mesh setup, the WiFi settings are adopted by each mesh repeater (Home Network > Mesh > Mesh Settings > Automatically Adopting Settings from the Mesh)
Note 2: For mesh repeaters, these switches are disabled by default, but can be enabled. When your mesh is based on a WiFi connection between the mesh master and the mesh repeater, the WiFi switches won’t be created for the mesh repeater either.
Example Automations and Scripts
Script: Reconnect / get new IP
The following script脚本是允许用户指定 Home Assistant 打开时要执行的动作序列的组件。 [Learn more] can be used to easily add a reconnect button to your UI. If you want to reboot your FRITZ!Box, you can use fritz.reboot
instead.
fritz_box_reconnect:
alias: "Reconnect FRITZ!Box"
sequence:
- action: button.press
target:
entity_id: button.fritzbox_7530_reconnect
Automation: Reconnect / get new IP every night
automation:
- alias: "Reconnect FRITZ!Box"
triggers:
- trigger: time
at: "05:00:00"
actions:
- action: button.press
target:
entity_id: button.fritzbox_7530_reconnect
Automation: Phone notification with Wi-Fi credentials when guest Wi-Fi is created
automation:
- alias: "Guests Wi-Fi Turned On -> Send Password To Phone"
triggers:
- trigger: state
entity_id: switch.fritzbox_7530_wifi_myssid
to: "on"
actions:
- action: notify.notify
data:
title: "Guest Wi-Fi is enabled"
message: "Password: ..."
Troubleshooting
In any case, when reporting an issue, please enable debug logging, restart the integration, and as soon as the issue re-occurs stop the debug logging again (download of debug log file will start automatically). Further if still possible, please also download the diagnostics诊断集成提供了一种从设备或集成下载诊断数据以在问题报告中共享的方法。在报告问题时共享诊断数据可以让开发人员更快地诊断和修复您报告的问题。 [Learn more] data. If you have collected the debug log and the diagnostics data, provide them with the issue report.
Device presence detection is not working as expected
Check if one of the following cases applies:
- You see a device as still present, even if it is offline or disconnected for more than the configured consider home seconds.
- You’re using additional network equipment like a network switch or Wi-Fi access point other than an AVM Fritz!Repeater or other AVM components, but not configured as a mesh
in your home network.
If one of the above cases applies to your setup, try enabling the old discovery method in the integration options. This might resolve the issue.