Openhab 4.0: TR-064 binding does not support several Fritzboxes

I was using the TR-064 binding with 3 Fritzboxes in place under OpenHAB 3.4.4 without any issues. After migrating to OpenHAB 4.0 M4 I can only activate one of the boxes at a time (one bridge thing).

Activating more than one bridge thing results in errors/warnings and all channels stop updating. I already deleted and recreated all TR-064 things. Was there anything changed in the configuration I may have overseen?

2023-07-03 13:44:41.987 [ERROR] [com.sun.xml.messaging.saaj.soap     ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden

2023-07-03 13:44:41.989 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wifi24GHzEnable, getAction=GetInfo, dataType='boolean, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 

2023-07-03 13:44:42.819 [ERROR] [com.sun.xml.messaging.saaj.soap     ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden

2023-07-03 13:44:42.821 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanTotalBytesSent, getAction=GetTotalBytesSent, dataType='ui4, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 

2023-07-03 13:44:42.940 [ERROR] [com.sun.xml.messaging.saaj.soap     ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden

2023-07-03 13:44:42.942 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanMaxDownstreamRate, getAction=GetCommonLinkProperties, dataType='ui4, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 

2023-07-03 13:44:43.071 [ERROR] [com.sun.xml.messaging.saaj.soap     ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden

2023-07-03 13:44:43.074 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanTotalBytesReceived, getAction=GetTotalBytesReceived, dataType='ui4, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 

2023-07-03 13:44:43.209 [ERROR] [com.sun.xml.messaging.saaj.soap     ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden

2023-07-03 13:44:43.212 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanPhysicalLinkStatus, getAction=GetCommonLinkProperties, dataType='string, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 

2023-07-03 13:44:43.348 [ERROR] [com.sun.xml.messaging.saaj.soap     ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden

2023-07-03 13:44:43.350 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanAccessType, getAction=GetCommonLinkProperties, dataType='string, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 

2023-07-03 13:44:43.469 [ERROR] [com.sun.xml.messaging.saaj.soap     ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden

2023-07-03 13:44:43.472 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanMaxUpstreamRate, getAction=GetCommonLinkProperties, dataType='ui4, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 

I have the same problem since I upgraded to OH 4.0.1 - everything worked before well with all version til 3.4.5
With OH4.0.1 only a single FritzBox TR64 thing can be active at any time.
Channels are only updated for the lastest thing changed to online. All channels from the other things are not updated anymore, however the thing remains online!

Would be great if this issue can be fixed :slight_smile:

Update: I have restarted the docker Container with OH4 and the problem seems to be solved. Will monitor the behavior.

The problem re-occured again.
I can only make TR064 binding working with a single Fritzbox at the same time.
Multiple FritzBoxes doesn’t work anymore in OH4.

@J-N-K - any idea what could be the issue?

No idea. Can you enable TRACE logging?

Hello Jan,

I capture a long log file, but I guess the following errors and traces could give a good hint.

Once the 2nd tr064 things gets online, the channels for previously working 1st device failing with the following messages - does this helps?

6:17:40.716 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Request: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><u:GetInfo xmlns:u="urn:dslforum-org:service:WANPPPConnection:1"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
16:17:40.725 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Re-Auth needed.
16:17:40.732 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Received response: <HTML><HEAD><TITLE>401 Unauthorized (ERR_NONE)</TITLE></HEAD><BODY><H1>401 Unauthorized</H1><BR>ERR_NONE<HR><B>Webserver</B> Sat, 12 Aug 2023 14:17:38 GMT</BODY></HTML>

16:17:40.733 [ERROR] [com.sun.xml.messaging.saaj.soap      ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden
16:17:40.733 [WARN ] [ing.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanPppConnectionStatus, getAction=GetInfo, dataType='string, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 
16:17:40.733 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Request: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><u:GetInfo xmlns:u="urn:dslforum-org:service:WANIPConnection:1"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
16:17:40.734 [INFO ] [openhab.event.ItemStateUpdatedEvent  ] - Item 'WANConnectionDeviceFRITZBox7590_ConnectionStatus' updated to UNDEF
16:17:40.734 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'WANConnectionDeviceFRITZBox7590_ConnectionStatus' changed from Connected to UNDEF
16:17:40.740 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Re-Auth needed.
16:17:40.787 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Received response: <HTML><HEAD><TITLE>401 Unauthorized (ERR_NONE)</TITLE></HEAD><BODY><H1>401 Unauthorized</H1><BR>ERR_NONE<HR><B>Webserver</B> Sat, 12 Aug 2023 14:17:38 GMT</BODY></HTML>

16:17:40.787 [ERROR] [com.sun.xml.messaging.saaj.soap      ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden
16:17:40.788 [WARN ] [ing.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=uptime, getAction=GetInfo, dataType='ui4, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 
16:17:40.788 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Request: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><u:GetInfo xmlns:u="urn:dslforum-org:service:WANPPPConnection:1"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
16:17:40.789 [INFO ] [openhab.event.ItemStateUpdatedEvent  ] - Item 'WANConnectionDeviceFRITZBox7590_Uptime' updated to UNDEF
16:17:40.789 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'WANConnectionDeviceFRITZBox7590_Uptime' changed from 206178 to UNDEF
16:17:40.795 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Re-Auth needed.
16:17:40.802 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Received response: <HTML><HEAD><TITLE>401 Unauthorized (ERR_NONE)</TITLE></HEAD><BODY><H1>401 Unauthorized</H1><BR>ERR_NONE<HR><B>Webserver</B> Sat, 12 Aug 2023 14:17:38 GMT</BODY></HTML>

16:17:40.803 [ERROR] [com.sun.xml.messaging.saaj.soap      ] - SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden
16:17:40.803 [WARN ] [ing.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanPppIpAddress, getAction=GetInfo, dataType='string, parameter='null'}: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: 

I think I found the issue. I can’t try it on my system though, because I only have one FritzBox. Can you please check if the fix works by typing

update org.openhab.binding.tr064 <location removed, no longer available>

on the karaf console?

3 Likes

Hello Jan,

thanks a lot for sharing the update - it solved the problem :slight_smile:
I get data for all channels on the three FritzBoxes and both Fritz Repeaters again.

1 Like

Jan,

your fix also works for me, where two Fritz!Boxes raised the described issue before. Thank you for sharing the update.

Hi Jan,

I found the following log entries frequently - something I have to change?


==> /log/openhab.log <==
2023-08-19 17:25:35.044 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=uptime, getAction=GetInfo, dataType='ui4, parameter='null'}: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 401 (Invalid Action)
==> /log/events.log <==
2023-08-19 17:25:35.044 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WANConnectionDeviceFRITZBox7590_Uptime' changed from 91700 to UNDEF
2023-08-19 17:25:35.045 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WANConnectionDeviceFRITZBox7590_Uptime' changed from UNDEF to 91761

I don’t know. According to AVM’s documentation:

If an unknown action is used the returned code is 401. This return code is used for obsoleted actions, too.

However, it seems that most of the time the call succeeds. So it seems that the action is neither unknown nor obsoleted.

I enabled the trace again and found a channelType NewUptime, with the same value

Could this be the problem?

<NewUptime>168265</NewUptime>
2023-08-20 14:40:38.719 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=uptime, getAction=GetInfo, dataType='ui4, parameter='null'}: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 401 (Invalid Action)
2023-08-20 14:40:38.720 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WANConnectionDeviceFRITZBox7590_Uptime' changed from 168204 to UNDEF
2023-08-20 14:40:38.720 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WANConnectionDeviceFRITZBox7590_Uptime' changed from UNDEF to 168265
<NewUptime>168325</NewUptime>
2023-08-20 14:41:39.059 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=uptime, getAction=GetInfo, dataType='ui4, parameter='null'}: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 401 (Invalid Action)
2023-08-20 14:41:39.059 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WANConnectionDeviceFRITZBox7590_Uptime' changed from 168265 to UNDEF
2023-08-20 14:41:39.060 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WANConnectionDeviceFRITZBox7590_Uptime' changed from UNDEF to 168325
    <channel name="uptime" label="Uptime">
		<item type="Number:Time" unit="s" statePattern="%d s"/>
		<service deviceType="urn:dslforum-org:device:InternetGatewayDevice:1"
			serviceId="urn:DeviceInfo-com:serviceId:DeviceInfo1"/>
		<getAction name="GetInfo" argument="NewUpTime"/>
	</channel>

This is the channel definition, so NewUptime is the variable used for getting the uptime.

1 Like