Control your AVM FRITZ!Box router and Smarthome devices.
✅ USE this skill when:
❌ DON'T use this skill when:
The following commands make high-impact, hard-to-reverse changes to the network or connected devices.
Always ask the user for explicit confirmation before running them:
| Command | Impact |
|---|---|
| --------- | -------- |
wlan off / wlan on | Disables or enables Wi-Fi — may cut network access |
reconnect | Forces internet disconnection and re-dial |
smarthome switch / on | Turns a physical device on or off |
smarthome toggle | Inverts the current device state |
Only invoke these after the user has clearly and explicitly requested the specific action.
Create a .env file:
FRITZBOX_USER=your_username
FRITZBOX_PASSWORD=your_password
FRITZBOX_HOST=fritz.box
python3 fritzbox.py --user admin --password YOURPASS wlan status
# Router info
python3 fritzbox.py info
# WLAN on/off/status
python3 fritzbox.py wlan on
python3 fritzbox.py wlan off
python3 fritzbox.py wlan status
# List connected network devices
python3 fritzbox.py hosts
# Reconnect internet
python3 fritzbox.py reconnect
# List all smarthome devices
python3 fritzbox.py smarthome list
# Switch device on/off (AIN with spaces needs quotes!)
python3 fritzbox.py smarthome switch "08761 0311726" on
python3 fritzbox.py smarthome switch "08761 0311726" off
Note: The AIN (identifier) is shown in the device list. Use quotes if it contains spaces!
FRITZ!Smart Energy 200 #1
AIN: 08761 0311726
State: ON, Power: 84.4W, Voltage: 237.3V, Temp: 20.5°C
"401 Unauthorized":
.env"No smarthome devices found":
Switch command fails:
"08761 0311726"If your FRITZ!Box is on a different IP:
python3 fritzbox.py --host 192.168.178.1 info
.env outside version control (it is listed in .gitignore). Restrict file permissions: chmod 600 .env.FRITZBOX_HOST points to your own local router. Do not route credentials through untrusted hosts.共 1 个版本