Vor einiger Zeit musste ich nach einem Firmware-Update der Fritz!Box feststellen, dass das FRITZBOX Modul des FHEM-Servers nicht mehr mit der Fritz!Box reden wollte. Grund dafür war, dass Telnet nicht mehr vorhanden ist und nun einige Funktionen nur noch per TR064 möglich sind. Zuvor hatte ich hauptsächlich die Möglichkeit, das Gäste-WLAN via des Tablets im Gang zu schalten, genutzt. Das wollte ich nun wieder haben.
Meine Fritzbox ist in diesem Beispiel das Gerät „FRITZBOXDEVICE“. Zunächst muss man dazu TR064-Befehle freischalten:
attr FRITZBOXDEVICE allowTR064Command 1
Für das Schalten der WLANs muss man sich nun den Befehl zusammenstellen, also z.B. fürs einschalten des Gäste-WLAN:
get FRITZBOXDEVICE tr064Command WLANConfiguration:3 wlanconfig3 SetEnable NewEnable 1
Ausschalten:
get FRITZBOXDEVICE tr064Command WLANConfiguration:3 wlanconfig3 SetEnable NewEnable 0
Um jetzt das so einfach wie möglich zu halten, habe ich einfach die Befehle via cmdalias ersetzt. Gäste-WLAN an:
define CMDALIAS_FRITZBOXDEVICE_GUESTWLAN_ON cmdalias set FRITZBOXDEVICE guestWlan on AS get FRITZBOXDEVICE tr064Command WLANConfiguration:3 wlanconfig3 SetEnable NewEnable 1
Und wieder aus:
define CMDALIAS_FRITZBOXDEVICE_GUESTWLAN_OFF cmdalias set FRITZBOXDEVICE guestWlan off AS get FRITZBOXDEVICE tr064Command WLANConfiguration:3 wlanconfig3 SetEnable NewEnable 0
Und nun noch für alle anderen. Schalten des 2,4Ghz WLAN:
get FRITZBOXDEVICE tr064Command WLANConfiguration:1 wlanconfig1 SetEnable NewEnable 1 get FRITZBOXDEVICE tr064Command WLANConfiguration:1 wlanconfig1 SetEnable NewEnable 0
Und des 5Ghz WLAN:
get FRITZBOXDEVICE tr064Command WLANConfiguration:2 wlanconfig2 SetEnable NewEnable 1 get FRITZBOXDEVICE tr064Command WLANConfiguration:2 wlanconfig2 SetEnable NewEnable 0
Und die cmdaliase für 2,4Ghz:
define CMDALIAS_FRITZBOXDEVICE_WLAN24_ON cmdalias set FRITZBOXDEVICE wlan2.4 on AS get FRITZBOXDEVICE tr064Command WLANConfiguration:1 wlanconfig1 SetEnable NewEnable 1 define CMDALIAS_FRITZBOXDEVICE_WLAN24_OFF cmdalias set FRITZBOXDEVICE wlan2.4 off AS get FRITZBOXDEVICE tr064Command WLANConfiguration:1 wlanconfig1 SetEnable NewEnable 0
Und für 5Ghz:
define CMDALIAS_FRITZBOXDEVICE_WLAN5_ON cmdalias set FRITZBOXDEVICE wlan5 on AS get FRITZBOXDEVICE tr064Command WLANConfiguration:2 wlanconfig2 SetEnable NewEnable 1 define CMDALIAS_FRITZBOXDEVICE_WLAN5_OFF cmdalias set FRITZBOXDEVICE wlan5 off AS get FRITZBOXDEVICE tr064Command WLANConfiguration:2 wlanconfig2 SetEnable NewEnable 0
Related posts:
- Lösung für FHEM 72_FRITZBOX.pm: ctlmgr_ctl: not found
- FHEM: Making of CUL V3
- FHEM update – Wie funktionieren Updates für Fehlerkorrekturen in FHEM?
- Einbindung des LW12 in das eigene WLAN – speziell einer Fritz!Box
- Extend devStateIcon in FHEM kurz erläutert
This feed is for personal, non-commercial use only.
The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint: d2a576b5311479d89eff39b7ca886f6b)