-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
FritzBox TR064 Binding
This is a binding for communication with AVM Fritz!Box using SOAP requests (TR064 protocol). I tested it on
- 7270
- 7360SL (v6.30)
- 7390
- 6360 Cable (v6.04)
- 7490
Features:
- detect if MAC is online in network (presence detection)
- switching on/off 2,4Hz Wifi, 5GHz Wifi and Guest Wifi (if any)
- getting external IP address of fbox
- getting fbox model name
- call monitor
- Switch Item: Receives "ON" state when call is incoming
- Call Items: Shows external an internal number for incoming/outgoing calls
- Resolve external call number to phonebook name
- enabling/disabling telephone answering machines (TAMs)
- getting new messages per TAM
- getting missed calls for the last x days
Prerequisites
Java JRE 1.8.0+ (version 1.7 / openJDK7 is not working)
Until I manage it to integrate the binding in the build process, you may download the latest version [here] (https://github.com/gitbock/fritzboxtr064/releases)
Put the *.jar file into your openHAB "addons" directory.
- Enable TR064: In the webui goto "Heimnetz" - "Netzwerkeinstellungen": enable option "Zugriff für Anwendungen zulassen" (enabled by default)
- Only if you want to use the call monitor feature (items starting with callmonitor_...), enable the interface by dialing #96*5* You may disable it again by dialing #96*4*
String fboxName "FBox Model [%s]" {fritzboxtr064="modelName"}
String fboxWanIP "FBox WAN IP [%s]" {fritzboxtr064="wanip"}
Switch fboxWifi24 "2,4GHz Wifi" {fritzboxtr064="wifi24Switch"}
Switch fboxWifi50 "5,0GHz Wifi" {fritzboxtr064="wifi50Switch"}
Switch fboxGuestWifi "Guest Wifi" {fritzboxtr064="wifiGuestSwitch"}
Contact cFboxMacOnline "Presence (WiFi) [%s]" {fritzboxtr064="maconline:11-11-11-11-11-11" }
# only when using call monitor
Switch fboxRinging "Phone ringing [%s]" {fritzboxtr064="callmonitor_ringing" }
Switch fboxRinging_Out "Phone ringing [%s]" {fritzboxtr064="callmonitor_outgoing" }
Call fboxIncomingCall "Incoming call: [%1$s to %2$s]" {fritzboxtr064="callmonitor_ringing" }
Call fboxOutgoingCall "Outgoing call: [%1$s to %2$s]" {fritzboxtr064="callmonitor_outgoing" }
# resolve numbers to names according phonebook
Call fboxIncomingCallResolved "Incoming call: [%1$s to %2$s]" {fritzboxtr064="callmonitor_ringing:resolveName" }
# Telephone answering machine (TAM) items
# Number after tamSwitch is ID of configured TAM, start with 0
Switch fboxTAM0Switch "Answering machine ID 0" {fritzboxtr064="tamSwitch:0"}
Number fboxTAM0NewMsg "New Messages TAM 0 [%s]" {fritzboxtr064="tamNewMessages:0"}
# Missed calls: specify the number of last days which should be searched for missed calls
Number fboxMissedCalls "Missed Calls [%s]" {fritzboxtr064="missedCallsInDays:5"}
Add the following to your openhab.cfg and configure the parameters. Or if using openHab v2 create a config file in $openhabhome/conf/services/fritzboxtr064.conf and insert the following:
############################# Fritz!Box TR064 Binding #######################################
#
## Binding for accessing FritzBoxes using the TR064 protocol. Uses http(s) requests.
# URL. Either use http://<fbox-ip>:49000 or https://<fbox-ip>:49443 (https preferred!)
fritzboxtr064:url=https://192.168.178.1:49443
# Refresh Interval (60000ms default)
fritzboxtr064:refresh=60000
# User Name (only use this value if you configured a user in fbox webui/config!)
# If this parameter is missing, "dslf-config" is used as default username
# It is recommended to to switch to authentication by username in fritzbox config
# and add a separate config user for this binding.
#fritzboxtr064:user=dslf-config
# PW
fritzboxtr064:pass=Fr!tZP@ssw0rd
see issues [here] (https://github.com/gitbock/fritzboxtr064/issues?q=is%3Aissue+is%3Aclosed)
Insert the following line into you logback.xml or logback_debug.xml inside the configuration tag.
<configuration scan="true">
[...]
<!-- FritzBox TR064 binding -->
<logger name="org.openhab.binding.fritzboxtr064" level="DEBUG" />
[...]
</configuration>
After that, watch your openhab.log file for extended log output. You may use level="TRACE"
for even more debug information.
For the "Call" items use "Text" in your sitemap
Use a map for presence detection item: Create file $openhab_home/configurations/transform/presence.map and add
-=unknown
1=present
0=not present
Now, as item configuration use:
Contact cFboxMacOnline "Presence (Wifi) [MAP(presence.map):%d]" <present> {fritzboxtr064="maconline:11-22-33-44-55-66 }
If you need the caller name (resolved from the fritzbox phonebook) in a rule, extract it like this:
rule "Phone is ringing"
when
// fboxRinging is a switch item which switches to ON if call is detected
Item fboxRinging changed from OFF to ON
then
logInfo("Anrufermeldung", "Generating caller name message...")
// fboxIncoming call receives numbers/name of incoming call
val CallType incCall = fboxIncomingCall.state as CallType
var callerName = incCall.destNum //destNum is external number OR resolved Name if no phonebook entry exists
// do something with callerName
end
ℹ Please find all documentation for openHAB 2 under http://docs.openhab.org.
The wiki pages here contain (outdated) documentation for the older openHAB 1.x version. Please be aware that a lot of core details changed with openHAB 2.0 and this wiki as well as all tutorials found for openHAB 1.x might be misleading. Check http://docs.openhab.org for more details and consult the community forum for all remaining questions.
- Classic UI
- iOS Client
- Android Client
- Windows Phone Client
- GreenT UI
- CometVisu
- Kodi
- Chrome Extension
- Alfred Workflow
- Cosm Persistence
- db4o Persistence
- Amazon DynamoDB Persistence
- Exec Persistence
- Google Calendar Presence Simulator
- InfluxDB Persistence
- JDBC Persistence
- JPA Persistence
- Logging Persistence
- mapdb Persistence
- MongoDB Persistence
- MQTT Persistence
- my.openHAB Persistence
- MySQL Persistence
- rrd4j Persistence
- Sen.Se Persistence
- SiteWhere Persistence
- AKM868 Binding
- AlarmDecoder Binding
- Anel Binding
- Arduino SmartHome Souliss Binding
- Asterisk Binding
- Astro Binding
- Autelis Pool Control Binding
- BenQ Projector Binding
- Bluetooth Binding
- Bticino Binding
- CalDAV Binding
- Chamberlain MyQ Binding
- Comfo Air Binding
- Config Admin Binding
- CUL Transport
- CUL Intertechno Binding
- CUPS Binding
- DAIKIN Binding
- Davis Binding
- DD-WRT Binding
- Denon Binding
- digitalSTROM Binding
- DIY on XBee Binding
- DMX512 Binding
- DSC Alarm Binding
- DSMR Binding
- eBUS Binding
- Ecobee Binding
- EDS OWSever Binding
- eKey Binding
- Energenie Binding
- EnOcean Binding
- Enphase Energy Binding
- Epson Projector Binding
- Exec Binding
- Expire Binding
- Fatek PLC Binding
- Freebox Binding
- Freeswitch Binding
- Frontier Silicon Radio Binding
- Fritz AHA Binding
- Fritz!Box Binding
- FritzBox-TR064-Binding
- FS20 Binding
- Garadget Binding
- Global Caché IR Binding
- GPIO Binding
- HAI/Leviton OmniLink Binding
- HDAnywhere Binding
- Heatmiser Binding
- Homematic / Homegear Binding
- Horizon Mediabox Binding
- HTTP Binding
- IEC 62056-21 Binding
- IHC / ELKO Binding
- ImperiHome Binding
- Insteon Hub Binding
- Insteon PLM Binding
- IPX800 Binding
- IRtrans Binding
- jointSPACE-Binding
- KM200 Binding
- KNX Binding
- Koubachi Binding
- LCN Binding
- LightwaveRF Binding
- Leviton/HAI Omnilink Binding
- Lg TV Binding
- Logitech Harmony Hub
- MailControl Binding
- MAX!Cube-Binding
- MAX! CUL Binding
- MCP23017 I/O Expander Binding
- MCP3424 ADC Binding
- MiLight Binding
- MiOS Binding
- Mochad X10 Binding
- Modbus Binding
- MPD Binding
- MQTT Binding
- MQTTitude binding
- MystromEcoPower Binding
- Neohub Binding
- Nest Binding
- Netatmo Binding
- Network Health Binding
- Network UPS Tools Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- Open Energy Monitor Binding
- OpenPaths presence detection binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Panasonic TV Binding
- panStamp Binding
- Philips Hue Binding
- Picnet Binding
- Piface Binding
- PiXtend Binding
- pilight Binding
- Pioneer-AVR-Binding
- Plex Binding
- Plugwise Binding
- PLCBus Binding
- PowerDog Local API Binding
- Powermax alarm Binding
- Primare Binding
- Pulseaudio Binding
- Raspberry Pi RC Switch Binding
- RFXCOM Binding
- RWE Smarthome Binding
- Sager WeatherCaster Binding
- Samsung AC Binding
- Samsung TV Binding
- Serial Binding
- Sallegra Binding
- Satel Alarm Binding
- Siemens Logo! Binding
- SimpleBinary Binding
- Sinthesi Sapp Binding
- Smarthomatic Binding
- Snmp Binding
- Somfy URTSI II Binding
- Sonance Binding
- Sonos Binding
- Souliss Binding
- Squeezebox Binding
- Stiebel Eltron Heatpump
- Swegon ventilation Binding
- System Info Binding
- TA CMI Binding
- TCP/UDP Binding
- Tellstick Binding
- TinkerForge Binding
- Tivo Binding
- UCProjects.eu Relay Board Binding
- UPB Binding
- VDR Binding
- Velleman-K8055-Binding
- Wago Binding
- Wake-on-LAN Binding
- Waterkotte EcoTouch Heatpump Binding
- Weather Binding
- Wemo Binding
- Withings Binding
- XBMC Binding
- xPL Binding
- Yamahareceiver Binding
- Zibase Binding
- Z-Wave Binding
- Asterisk
- DoorBird
- FIND
- Foscam IP Cameras
- LG Hombot
- Worx Landroid
- Heatmiser PRT Thermostat
- Google Calendar
- Linux Media Players
- Osram Lightify
- Rainforest EAGLE Energy Access Gateway
- Roku Integration
- ROS Robot Operating System
- Slack
- Telldus Tellstick
- Zoneminder
- Wink Hub (rooted)
- Wink Monitoring
- openHAB Cloud Connector
- Google Calendar Scheduler
- Transformations
- XSLT
- JSON
- REST-API
- Security
- Service Discovery
- Voice Control
- BritishGasHive-Using-Ruby
- Dropbox Bundle
A good source of inspiration and tips from users gathered over the years. Be aware that things may have changed since they were written and some examples might not work correctly.
Please update the wiki if you do come across any out of date information.
- Rollershutter Bindings
- Squeezebox
- WAC Binding
- WebSolarLog
- Alarm Clock
- Convert Fahrenheit to Celsius
- The mother of all lighting rules
- Reusable Rules via Functions
- Combining different Items
- Items, Rules and more Examples of a SmartHome
- Google Map
- Controlling openHAB with Android
- Usecase examples
- B-Control Manager
- Spell checking for foreign languages
- Flic via Tasker
- Chromecast via castnow
- Speedtest.net integration