Fritz Connection

v1.0.0

Dieser Skill ermöglicht die Abfrage von Statusinformationen und die Steuerung einer AVM FRITZ!Box über die TR-064 Schnittstelle. Er bietet Funktionen für Sta...

1· 165·0 current·0 all-time
byWolf@wolf128058

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for wolf128058/fritz-connection.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Fritz Connection" (wolf128058/fritz-connection) from ClawHub.
Skill page: https://clawhub.ai/wolf128058/fritz-connection
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install fritz-connection

ClawHub CLI

Package manager switcher

npx clawhub@latest install fritz-connection
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the code and instructions: the files use the fritzconnection library and implement status, traffic, hosts, WLAN, calls, reconnect and reboot via TR-064/AHA-HTTP. The requested capabilities are appropriate for a router-control skill.
Instruction Scope
SKILL.md and the script operate only against the local FRITZ!Box (TR-064 and AHA-HTTP). The runtime instructions require creating a venv and installing requirements, and the script reads credentials from ~/.openclaw/skills/.env (or a skill-local .env). This is expected, but the skill can execute disruptive operations (reboot, reconnect, disable WLAN) — the docs require explicit confirmation for those, which you should enforce.
Install Mechanism
No automated install spec; user-guided pip install into a virtualenv is suggested. requirements.txt only lists fritzconnection and python-dotenv — reasonable and proportional for the stated functionality.
Credentials
The skill requires FRITZBOX_HOST and FRITZBOX_PASSWORD (used by the script), which are appropriate and minimal. However, the registry metadata shows no required env vars declared — a metadata inconsistency that should be corrected so users know the skill needs local router credentials.
Persistence & Privilege
No 'always: true' privilege; the skill does not modify other skills or system-wide settings. It can be invoked autonomously (platform default) — this increases impact if misused, but is not unusual for skills.
Assessment
This skill legitimately controls a local FRITZ!Box and needs the router host and password stored in ~/.openclaw/skills/.env. Before installing: (1) verify you trust the skill source (no remote download was included), (2) keep FRITZBOX_PASSWORD secret and set restrictive permissions on the .env file, (3) be aware commands like reboot/reconnect and WLAN on/off affect all devices — don’t allow automated runs of those without explicit user confirmation, and (4) consider adding the required env vars to the skill metadata or asking the publisher to do so so the platform can warn you up front.

Like a lobster shell, security has layers — review code before you run it.

latestvk97fwj1qdvshaevkxqxz6j93g5833mmt
165downloads
1stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Fritz Connection

FritzBox Router-Status über die TR-064 API mit fritzconnection.

⚠️ Sicherheitshinweise

Folgende Befehle erfordern IMMER eine Rückfrage vor der Ausführung:

  • reconnect – Kappt die Internetverbindung für alle Geräte kurzzeitig (10-30 Sekunden)
  • reboot – Startet den Router neu, alles fällt aus (Internet, WLAN, Telefonie) für 2-5 Minuten
  • wlan on/off – Systemweite Auswirkung auf alle Geräte
  • Router-Konfiguration ändern – Kann alle Devices betreffen

Ausnahme: Nur wenn explizit genehmigt ("mach mal", "ja bitte", etc.)

Diese Befehle betreffen nicht nur den User, sondern alle Geräte und Personen im Netzwerk.

Voraussetzungen

cd ~/.openclaw/workspace/skills/fritz-status
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

Konfiguration

In ~/.openclaw/skills/.env:

FRITZBOX_HOST=192.168.178.1
FRITZBOX_PASSWORD=dein_passwort

Hinweis: FritzBox nutzt nur Passwort-Auth, kein Username.

Nutzung

cd ~/.openclaw/workspace/skills/fritz-status

# Router-Status (Model, Uptime, WAN-IP)
.venv/bin/python scripts/fritz_status.py status

# Traffic-Statistiken (Bytes In/Out, Downstream/Upstream)
.venv/bin/python scripts/fritz_status.py traffic

# Verbundene Geräte (Name, IP, MAC, Status)
.venv/bin/python scripts/fritz_status.py hosts -v

# WLAN-Status (2.4GHz, 5GHz, Gastzugang)
.venv/bin/python scripts/fritz_status.py wlan

# Anrufliste (letzte 10 Anrufe)
.venv/bin/python scripts/fritz_status.py calls

# Anrufliste (letzte 20 Anrufe)
.venv/bin/python scripts/fritz_status.py calls -n 20

# Reconnect (neue IP anfordern) ⚠️ Rückfrage erforderlich!
.venv/bin/python scripts/fritz_status.py reconnect

# Reboot (Router neu starten) ⚠️ Rückfrage erforderlich!
.venv/bin/python scripts/fritz_status.py reboot

Verfügbare Befehle

status

Router-Status und Verbindungsinformationen.

Output:

🖥️  AVM FRITZ!Box 6660 Cable
📍 Host: 192.168.178.1
🔌 Connection: Connected
⏱️  Uptime: 456789 seconds (126h 49m)
🌐 External IP: 203.0.113.42

traffic

Bandbreite und Datenvolumen.

Output:

📥 Max Downstream: 274 Mbit/s
📤 Max Upstream: 52 Mbit/s
📊 Total Received: 299.68 GB
📊 Total Sent: 20.34 GB

hosts

Alle bekannten Geräte mit Status.

Output:

📱 Verbundene Geräte: 5

   ✅ Smartphone (192.168.178.10, AA:BB:CC:DD:EE:01)
   ✅ Laptop (192.168.178.20, AA:BB:CC:DD:EE:02)
   ✅ fritz.box (192.168.178.1, AA:BB:CC:DD:EE:03)
   ⏸️  Tablet (192.168.178.30, AA:BB:CC:DD:EE:04)
   ⏸️  SmartTV (192.168.178.40, AA:BB:CC:DD:EE:05)

Legende: ✅ = aktiv, ⏸️ = offline/inaktiv

wlan

WLAN-Status aller Netzwerke (2.4 GHz, 5 GHz, Gastzugang).

Output:

📡 WLAN-Status

📶 2.4 GHz:
   Status: ✅ Enabled
   SSID: MeinWLAN
   Kanal: 6
   Standard: ax

📡 5 GHz:
   Status: ✅ Enabled
   SSID: MeinWLAN
   Kanal: 36
   Standard: ax

🏠 Gastzugang:
   Status: ❌ Disabled
   SSID: MeinWLAN Gast

📡 WLAN ist AN

WLAN-Netzwerke:

  • 📶 2.4 GHz – Hauptnetz (WLANConfiguration:1)
  • 📡 5 GHz – Hauptnetz (WLANConfiguration:2)
  • 🏠 Gastzugang – Gäste-WLAN (WLANConfiguration:3)

calls

Anrufliste mit Typ, Nummer und Zeitstempel.

Output:

📋 Anrufliste (10 Einträge)

📞 Eingehend
   📞 01234567890
   🕐 03.03.2026 18:54 (0:39)

📵 Verpasst
   📞 09876543210
   🕐 02.03.2026 15:30 (0:00)

📱 Ausgehend
   📞 017000000000
   🕐 01.03.2026 12:15 (2:30)

📌 Letzter Anruf: 📞 Eingehend von 01234567890 am 03.03.26 18:54

Optionen:

  • -n, --limit N - Anzahl Einträge (default: 10)

Call-Typen:

  • 📞 Eingehend (Type 1) - Angenommene eingehende Anrufe
  • 📵 Verpasst (Type 2) - Verpasste eingehende Anrufe
  • 📱 Ausgehend (Type 3) - Ausgehende Anrufe

reconnect

Erzwingt einen Reconnect und fordert eine neue externe IP an.

.venv/bin/python scripts/fritz_status.py reconnect

Output:

🔄 Reconnect angefordert. Warte auf neue Verbindung...

⚠️ Systemweiter Eingriff:

  • Kappt die Internetverbindung für alle Geräte kurzzeitig
  • Neue externe IP wird zugewiesen
  • Dauert normalerweise 10-30 Sekunden
  • Niemals ohne Rückfrage ausführen!

reboot

Startet die FRITZ!Box neu.

.venv/bin/python scripts/fritz_status.py reboot

Output:

🔄 Reboot angefordert. Die FRITZ!Box startet jetzt neu.
   ⏱️  Das dauert normalerweise 2-5 Minuten.
   📡 Alle Geräte verlieren die Verbindung (Internet, WLAN, Telefonie).

⚠️ Systemweiter Eingriff:

  • Kappt ALLE Verbindungen (Internet, WLAN, Telefonie) für 2-5 Minuten
  • Alle Geräte im Netz verlieren die Verbindung
  • Router startet komplett neu
  • Niemals ohne Rückfrage ausführen!

fritzconnection Library

Python-Library für FritzBox TR-064 API.

Dokumentation: https://fritzconnection.readthedocs.io/

Zwei API-Interfaces

fritzconnection nutzt zwei unterschiedliche APIs:

APIMethodeVerwendung
TR-064fc.call_action(service, action, args)Netzwerk, Status, Konfiguration, Smart Home
AHA-HTTPfc.call_http(command, ain)Smart Home DECT, Device Stats, XML-Responses

TR-064 gibt Python-Datentypen zurück (Dict mit konvertierten Werten). HTTP-Interface gibt rohe HTTP-Response (text/plain oder text/xml, braucht oft Parsen).

Grundlegende Nutzung

from fritzconnection import FritzConnection

fc = FritzConnection(address="192.168.178.1", password="pw")

# Router-Info
print(fc)  # Model-Informationen

# TR-064: Neue IP via Reconnect
fc.call_action("WANIPConn1", "ForceTermination")
fc.reconnect()  # Shortcut für obiges

# HTTP: Device-Stats für Smart-Home
response = fc.call_http("getbasicdevicestats", ain="12345 7891011")

Haupt-Services (TR-064)

ServiceBeschreibungStatus
WANIPConnectionWAN-Status, IP, Uptime, Reconnect✅ Implementiert
WANCommonInterfaceConfigTraffic-Stats, Bandbreite✅ Implementiert
HostsVerbundene Geräte, MAC-Filter✅ Implementiert
DeviceInfoModel, Firmware, Serial✅ Implementiert
X_AVM-DE_OnTelAnrufliste, Telefonbuch✅ Implementiert
WLANConfigurationWLAN-Netzwerke, Gäste-WLAN✅ Implementiert
DeviceConfigRouter-Reboot✅ Implementiert
X_AVM-DE_HomeautoDECT-Smart-Home (Steckdosen, Thermostate)🔲 Geplant
LANHostConfigManagementDHCP-Einstellungen🔲 Geplant

Geräte-Unterstützung

  • Fritz!Box - Vollständig unterstützt (alle Services)
  • Fritz!Repeater - Teilweise unterstützt (TR-064, aber weniger Services)
  • Fritz!Fon - Nur über Box erreichbar

Die verfügbaren Services hängen vom Router-Modell und der Firmware ab.

Erweiterungsideen

WLAN-Steuerung

# Gäste-WLAN an/aus
fc.call_action('WLANConfiguration:3', 'SetEnable', NewEnable=True)

# Haupt-WLAN an/aus (2.4 GHz)
fc.call_action('WLANConfiguration:1', 'SetEnable', NewEnable=False)

# Alle WLANs global an/aus
fc.call_action('WLANConfiguration:1', 'SetWLANGlobalEnable', NewWLANGlobalEnable=True)

Smart Home (DECT via TR-064)

# DECT-Geräte auflisten
devices = fc.call_action('X_AVM-DE_Homeauto', 'GetGenericDeviceInfos')

# Steckdose schalten
fc.call_action('X_AVM-DE_Homeauto', 'SetSwitch', NewSwitchState='ON')

Smart Home (DECT via HTTP-Interface)

# Device-Stats für ein DECT-Gerät
response = fc.call_http("getbasicdevicestats", ain="12345")

# Response enthält:
# - content-type: 'text/plain' oder 'text/xml'
# - encoding: z.B. 'utf-8'
# - content: Rohe Daten (muss geparst werden)

Anrufliste (TR-064)

# CallList-URL holen
result = fc.call_action('X_AVM-DE_OnTel:1', 'GetCallList')
call_list_url = result.get("NewCallListURL")

# XML herunterladen und parsen
import urllib.request
import xml.etree.ElementTree as ET

with urllib.request.urlopen(call_list_url) as response:
    xml_data = response.read()

root = ET.fromstring(xml_data)
for call in root.findall(".//Call"):
    call_type = call.find("Type").text  # 1=eingehend, 2=verpasst, 3=ausgehend
    caller = call.find("Caller").text
    timestamp = call.find("Date").text

Call-Monitoring (Realtime)

from fritzconnection.lib.fritzcallmonitor import FritzCallMonitor

# Realtime-Monitor für eingehende/ausgehende Anrufe
monitor = FritzCallMonitor(address="192.168.178.1", password="pw")
monitor.connect()

# Events:
# - ring: Eingehender Anruf
# - call: Ausgehender Anruf
# - connect: Verbindung hergestellt
# - disconnect: Verbindung beendet

Reconnect (Neue IP)

# WANIPConn1 - ForceTermination
fc.reconnect()

# Oder manuell:
fc.call_action("WANIPConn1", "ForceTermination")

Reboot

# DeviceConfig:1 - Reboot
fc.call_action("DeviceConfig:1", "Reboot")

Python-API

from scripts.fritz_status import FritzBoxClient

client = FritzBoxClient()

# Status
info = client.get_status()
print(info['model'], info['uptime'])

# Traffic
traffic = client.get_traffic()
print(traffic['bytes_received'], traffic['bytes_sent'])

# Hosts
hosts = client.get_hosts()
print(f"{hosts['count']} Geräte verbunden")
for device in hosts['devices']:
    print(f"  {device['name']}: {device['ip']} ({'active' if device['active'] else 'offline'})")

Architektur

fritz-status/
├── SKILL.md              # Diese Datei
├── requirements.txt      # fritzconnection>=1.15.0
├── .gitignore
└── scripts/
    └── fritz_status.py   # CLI-Interface

Links

Comments

Loading comments...