Problems with fritzbox TR064 binding

I try to get the fritzbox-tr064 binding running. However I get the following errors in the log:

15:49:54.646 [INFO ] [marthome.event.ItemStateChangedEvent] - fboxName changed from NULL to FRITZ!Box 6360 Cable (kbw)
15:49:54.689 [ERROR] [ing.fritzboxtr064.internal.Tr064Comm] - Error received from FritzBox: <?xml version="1.0"?><s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”>
<s:Body>
<s:Fault>
s:Client
UPnPError


402
Invalid Args


</s:Fault>
</s:Body>
</s:Envelope>. SOAP request was: maconline:24:e3:14:25:57:31
15:49:54.696 [INFO ] [marthome.event.ItemStateChangedEvent] - cFboxiPhoneDominik changed from NULL to CLOSED
15:49:54.758 [ERROR] [ing.fritzboxtr064.internal.Tr064Comm] - FritzBox returned unexpected response. Could not find expected datavalue NewExternalIPAddress in response.

The only Item that works is the FritzBox name. For the presence detection and for the external IP I get errors.

I use openhab 2.0 build #688 and a FritzBox 6330.

Any Ideas?

For reference this is the list of provided services (http://fritz.box:49000/tr64desc.xml)

This XML file does not appear to have any style information associated with it. The document tree is shown below.


1
0


urn:dslforum-org:device:InternetGatewayDevice:1
FRITZ!Box 6360 Cable (kbw)
AVM
www.avm.de
FRITZ!Box 6360 Cable (kbw)
FRITZ!Box 6360 Cable (kbw)
- kabelbw
www.avm.de
uuid:739f2409-bccb-40e7-8e6c-3431C45D8D6D


image/gif
118
119
8
/ligd.gif




urn:dslforum-org:service:DeviceInfo:1
urn:DeviceInfo-com:serviceId:DeviceInfo1
/upnp/control/deviceinfo
/upnp/control/deviceinfo
/deviceinfoSCPD.xml


urn:dslforum-org:service:DeviceConfig:1
urn:DeviceConfig-com:serviceId:DeviceConfig1
/upnp/control/deviceconfig
/upnp/control/deviceconfig
/deviceconfigSCPD.xml


urn:dslforum-org:service:Layer3Forwarding:1

urn:Layer3Forwarding-com:serviceId:Layer3Forwarding1

/upnp/control/layer3forwarding
/upnp/control/layer3forwarding
/layer3forwardingSCPD.xml


urn:dslforum-org:service:LANConfigSecurity:1

urn:LANConfigSecurity-com:serviceId:LANConfigSecurity1

/upnp/control/lanconfigsecurity
/upnp/control/lanconfigsecurity
/lanconfigsecuritySCPD.xml


urn:dslforum-org:service:ManagementServer:1

urn:ManagementServer-com:serviceId:ManagementServer1

/upnp/control/mgmsrv
/upnp/control/mgmsrv
/mgmsrvSCPD.xml


urn:dslforum-org:service:Time:1
urn:Time-com:serviceId:Time1
/upnp/control/time
/upnp/control/time
/timeSCPD.xml


urn:dslforum-org:service:UserInterface:1
urn:UserInterface-com:serviceId:UserInterface1
/upnp/control/userif
/upnp/control/userif
/userifSCPD.xml


urn:dslforum-org:service:X_VoIP:1
urn:X_VoIP-com:serviceId:X_VoIP1
/upnp/control/x_voip
/upnp/control/x_voip
/x_voipSCPD.xml


urn:dslforum-org:service:X_AVM-DE_Storage:1

urn:X_AVM-DE_Storage-com:serviceId:X_AVM-DE_Storage1

/upnp/control/x_storage
/upnp/control/x_storage
/x_storageSCPD.xml


urn:dslforum-org:service:X_AVM-DE_OnTel:1
urn:X_AVM-DE_OnTel-com:serviceId:X_AVM-DE_OnTel1
/upnp/control/x_contact
/upnp/control/x_contact
/x_contactSCPD.xml


urn:dslforum-org:service:X_AVM-DE_WebDAVClient:1

urn:X_AVM-DE_WebDAV-com:serviceId:X_AVM-DE_WebDAVClient1

/upnp/control/x_webdav
/upnp/control/x_webdav
/x_webdavSCPD.xml


urn:dslforum-org:service:X_AVM-DE_UPnP:1
urn:X_AVM-DE_UPnP-com:serviceId:X_AVM-DE_UPnP1
/upnp/control/x_upnp
/upnp/control/x_upnp
/x_upnpSCPD.xml


urn:dslforum-org:service:X_AVM-DE_Speedtest:1

urn:X_AVM-DE_Speedtest-com:serviceId:X_AVM-DE_Speedtest1

/upnp/control/x_speedtest
/upnp/control/x_speedtest
/x_speedtestSCPD.xml


urn:dslforum-org:service:X_AVM-DE_RemoteAccess:1

urn:X_AVM-DE_RemoteAccess-com:serviceId:X_AVM-DE_RemoteAccess1

/upnp/control/x_remote
/upnp/control/x_remote
/x_remoteSCPD.xml


urn:dslforum-org:service:X_AVM-DE_MyFritz:1

urn:X_AVM-DE_MyFritz-com:serviceId:X_AVM-DE_MyFritz1

/upnp/control/x_myfritz
/upnp/control/x_myfritz
/x_myfritzSCPD.xml


urn:dslforum-org:service:X_AVM-DE_TAM:1
urn:X_AVM-DE_TAM-com:serviceId:X_AVM-DE_TAM1
/upnp/control/x_tam
/upnp/control/x_tam
/x_tamSCPD.xml


urn:dslforum-org:service:X_AVM-DE_AppSetup:1

urn:X_AVM-DE_AppSetup-com:serviceId:X_AVM-DE_AppSetup1

/upnp/control/x_appsetup
/upnp/control/x_appsetup
/x_appsetupSCPD.xml


urn:dslforum-org:service:X_AVM-DE_Homeauto:1

urn:X_AVM-DE_Homeauto-com:serviceId:X_AVM-DE_Homeauto1

/upnp/control/x_homeauto
/upnp/control/x_homeauto
/x_homeautoSCPD.xml


urn:dslforum-org:service:X_AVM-DE_Homeplug:1

urn:X_AVM-DE_Homeplug-com:serviceId:X_AVM-DE_Homeplug1

/upnp/control/x_homeplug
/upnp/control/x_homeplug
/x_homeplugSCPD.xml


urn:dslforum-org:service:X_AVM-DE_Dect:1
urn:X_AVM-DE_Dect-com:serviceId:X_AVM-DE_Dect1
/upnp/control/x_dect
/upnp/control/x_dect
/x_dectSCPD.xml


urn:dslforum-org:service:X_AVM-DE_Filelinks:1

urn:X_AVM-DE_Filelinks-com:serviceId:X_AVM-DE_Filelinks1

/upnp/control/x_filelinks
/upnp/control/x_filelinks
/x_filelinksSCPD.xml




urn:dslforum-org:device:LANDevice:1
LANDevice - FRITZ!Box 6360 Cable (kbw)
AVM
www.avm.de
LANDevice - FRITZ!Box 6360 Cable (kbw)
LANDevice - FRITZ!Box 6360 Cable (kbw)
- kabelbw
www.avm.de
uuid:75802409-bccb-40e7-8e6b-3431C45D8D6D
AVM TR-064


urn:dslforum-org:service:WLANConfiguration:1

urn:WLANConfiguration-com:serviceId:WLANConfiguration1

/upnp/control/wlanconfig1
/upnp/control/wlanconfig1
/wlanconfigSCPD.xml

urn:dslforum-org:service:WLANConfiguration:2 urn:WLANConfiguration-com:serviceId:WLANConfiguration2 /upnp/control/wlanconfig2 /upnp/control/wlanconfig2 /wlanconfigSCPD.xml urn:dslforum-org:service:Hosts:1 urn:LanDeviceHosts-com:serviceId:Hosts1 /upnp/control/hosts /upnp/control/hosts /hostsSCPD.xml urn:dslforum-org:service:LANEthernetInterfaceConfig:1 urn:LANEthernetIfCfg-com:serviceId:LANEthernetInterfaceConfig1 /upnp/control/lanethernetifcfg /upnp/control/lanethernetifcfg /ethifconfigSCPD.xml urn:dslforum-org:service:LANHostConfigManagement:1 urn:LANHCfgMgm-com:serviceId:LANHostConfigManagement1 /upnp/control/lanhostconfigmgm /upnp/control/lanhostconfigmgm /lanhostconfigmgmSCPD.xml urn:dslforum-org:device:WANDevice:1 WANDevice - FRITZ!Box 6360 Cable (kbw) AVM www.avm.de WANDevice - FRITZ!Box 6360 Cable (kbw) WANDevice - FRITZ!Box 6360 Cable (kbw) - kabelbw www.avm.de uuid:75802409-bccb-40e7-8e6a-3431C45D8D6D AVM TR-064 urn:dslforum-org:service:WANCommonInterfaceConfig:1 urn:WANCIfConfig-com:serviceId:WANCommonInterfaceConfig1 /upnp/control/wancommonifconfig1 /upnp/control/wancommonifconfig1 /wancommonifconfigSCPD.xml urn:dslforum-org:service:WANDSLInterfaceConfig:1 urn:WANDSLIfConfig-com:serviceId:WANDSLInterfaceConfig1 /upnp/control/wandslifconfig1 /upnp/control/wandslifconfig1 /wandslifconfigSCPD.xml urn:dslforum-org:device:WANConnectionDevice:1 WANConnectionDevice - FRITZ!Box 6360 Cable (kbw) AVM www.avm.de WANConnectionDevice - FRITZ!Box 6360 Cable (kbw) WANConnectionDevice - FRITZ!Box 6360 Cable (kbw) - kabelbw www.avm.de uuid:75802409-bccb-40e7-8e69-3431C45D8D6D AVM TR-064 urn:dslforum-org:service:WANDSLLinkConfig:1 urn:WANDSLLinkConfig-com:serviceId:WANDSLLinkConfig1 /upnp/control/wandsllinkconfig1 /upnp/control/wandsllinkconfig1 /wandsllinkconfigSCPD.xml urn:dslforum-org:service:WANEthernetLinkConfig:1 urn:WANEthernetLinkConfig-com:serviceId:WANEthernetLinkConfig1 /upnp/control/wanethlinkconfig1 /upnp/control/wanethlinkconfig1 /wanethlinkconfigSCPD.xml urn:dslforum-org:service:WANPPPConnection:1 urn:WANPPPConnection-com:serviceId:WANPPPConnection1 /upnp/control/wanpppconn1 /upnp/control/wanpppconn1 /wanpppconnSCPD.xml urn:dslforum-org:service:WANIPConnection:1 urn:WANIPConnection-com:serviceId:WANIPConnection1 /upnp/control/wanipconnection1 /upnp/control/wanipconnection1 /wanipconnSCPD.xml http://fritz.box

I have the same error message with a Fritzbox 6490. Does anyone has an idea?

What exactly does your item configuration for the presence detection look like?

This is very basic:

Contact MeikelsiPhone "Meikels iPhone im WLAN [MAP(presence.map):%d]" <present> {fritzboxtr064="maconline:10:41:7F:3E:75:69"}

Try changing the configuration string to { fritzboxtr064=“maconline:10-41-7F-3E-75-69” }. The colons in the MAC address might be the problem.

I am a fool! This was so obvious, but I am used to the syntax with colons.

Thank you very much for your help. This was so quick.
Have a nice evening.

You’re welcome. :slight_smile:
Have a nice evening, too!

Although the item was working there was still an error which caused an “internal server error 500” in the control panel of the paper UI and in the app on the iPhone. The “%d” has to be replaced by “%s”. The correct line is:

Contact MeikelsiPhone "Meikels iPhone im WLAN [MAP(presence.map):%s]" <present> {fritzboxtr064="maconline:10:41:7F:3E:75:69"}