OH3 TR-064 Wan Block /Fritz Box AVM Kindersicherung Blacklist Internet

sorry … one more question while I still hope that the above issue can be solved :wink:

while fiddeling with that Wan Block and other features like MAC Online I also asked myself if there is a way I could “comment” an IP or Mac in the parameter…
Otherwise this is hard to “maintain” for a user…
I mean instead of:
image

Something like:
image

That means: it’s a bug.

I also implemented the comments. You can add comments, they have to start with # (with or without spaces around it).

PR merged

1 Like

thank you so much! :slight_smile:

So channels work and I added a Switch Item to that channel.

Unfortunately when I use the switch I see:

13:43:26.303 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'FBOX_WANBlock1' received command ON
13:43:26.306 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'FBOX_WANBlock1' predicted to become ON
13:43:26.309 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'FBOX_WANBlock1' changed from UNDEF to ON
13:43:26.312 [DEBUG] [ing.tr064.internal.soap.SOAPConnector] - Sending ON as 1 to urn:X_AVM-DE_HostFilter-com:serviceId:X_AVM-DE_HostFilter1/DisallowWANAccessByIP
13:43:26.325 [WARN ] [ing.tr064.internal.soap.SOAPConnector] - Could not send command ON: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 402 (Invalid Args)

Bitte mal TRACE logging einschalten. Und dann den Request senden. Ist vermutlich was einfaches, aber ich müsste sehen, was da genau geschickt wird.

Edit: Sorry. Wrong forum :slight_smile:

Please turn on TRACE logging. Then send the request. It’s perhaps something simple, but I need to see what is actually send.

kein Problem :wink:

so it says UPNP error… I can retry with allowing UPNP in the FB … however I would not like UPNP standard to be turned on. EDIT: Enabling UPNP in the FB does not help. same error.
Also maybe a “switch item” is wrong? As the “Kindersicherung” can have more states.

image

2021-01-03 13:47:04.243 [DEBUG] [ng.tr064.internal.soap.SOAPConnector] - Sending ON as 1 to urn:X_AVM-DE_HostFilter-com:serviceId:X_AVM-DE_HostFilter1/DisallowWANAccessByIP
2021-01-03 13:47:04.247 [TRACE] [ng.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:DisallowWANAccessByIP xmlns:u="urn:dslforum-org:service:X_AVM-DE_HostFilter:1"><NewDisallow>1</NewDisallow><NewIPv4Address>192.168.1.84 #IPCamGarten</NewIPv4Address></u:DisallowWANAccessByIP></SOAP-ENV:Body></SOAP-ENV:Envelope>
2021-01-03 13:47:04.302 [TRACE] [ng.tr064.internal.soap.SOAPConnector] - Re-Auth needed.
2021-01-03 13:47:04.366 [TRACE] [ng.tr064.internal.soap.SOAPConnector] - Received response: <?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>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:dslforum-org:control-1-0">
<errorCode>402</errorCode>
<errorDescription>Invalid Args</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
2021-01-03 13:47:04.372 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Could not send command ON: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 402 (Invalid Args)
2021-01-03 13:47:05.646 [INFO ] [nhab.core.model.script.Wetterstation] - Rule: Check_Health_Wetterstation triggered
2
2021-01-03 13:47:06.938 [TRACE] [ng.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:GetWANAccessByIP xmlns:u="urn:dslforum-org:service:X_AVM-DE_HostFilter:1"><NewIPv4Address>192.168.1.84 #IPCamGarten</NewIPv4Address></u:GetWANAccessByIP></SOAP-ENV:Body></SOAP-ENV:Envelope>
2021-01-03 13:47:06.959 [TRACE] [ng.tr064.internal.soap.SOAPConnector] - Received response: <?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>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:dslforum-org:control-1-0">
<errorCode>402</errorCode>
<errorDescription>Invalid Args</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
2021-01-03 13:47:06.964 [WARN ] [ng.tr064.internal.soap.SOAPConnector] - Failed to get Tr064ChannelConfig{channelType=wanBlockByIP, getAction=GetWANAccessByIP, dataType='boolean, parameter='192.168.1.84 #IPCamGarten'}: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 402 (Invalid Args)

As I said. something easy. Parameter is send with the comment. Should be the stripped one.

1 Like

Fixed: update org.openhab.binding.tr064 https://janessa.me/esh/org.openhab.binding.tr064-3.1.0-SNAPSHOT.jar

1 Like

I uninstalled the former on the shell and dropped the new one in the addons folder
should it still read a yesterday date?
288 │ Active │ 80 │ 3.1.0.202101021630 │ org.openhab.binding.tr064

if this is the correct one I still see:

14:12:53.433 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'FBOX_WANBlock1' received command ON
14:12:53.444 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'FBOX_WANBlock1' predicted to become ON
14:12:53.450 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'FBOX_WANBlock1' changed from UNDEF to ON
14:12:53.455 [DEBUG] [ing.tr064.internal.soap.SOAPConnector] - Sending ON as 1 to urn:X_AVM-DE_HostFilter-com:serviceId:X_AVM-DE_HostFilter1/DisallowWANAccessByIP
14:12:53.460 [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:DisallowWANAccessByIP xmlns:u="urn:dslforum-org:service:X_AVM-DE_HostFilter:1"><NewDisallow>1</NewDisallow><NewIPv4Address>192.168.1.84 #IPCamGarten</NewIPv4Address></u:DisallowWANAccessByIP></SOAP-ENV:Body></SOAP-ENV:Envelope>
14:12:53.472 [TRACE] [ing.tr064.internal.soap.SOAPConnector] - Received response: <?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>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:dslforum-org:control-1-0">
<errorCode>402</errorCode>
<errorDescription>Invalid Args</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
14:12:53.476 [WARN ] [ing.tr064.internal.soap.SOAPConnector] - Could not send command ON: HTTP-Response-Code 500 (Internal Server Error), SOAP-Fault: 402 (Invalid Args)

No. 3.1.0.202101031302 should be the correct one.

Ok
I verified that I drop the correct one in the addons folder.
bundle:list shows it is uninstalled before I do that

However the old version seems to get loaded again once I drop the new one in addons folder
OH3 seems to use a cached version … need to find it

I recommend installing the distribution version and then use the update command.

1 Like

Well seems I still work too much Oh2 style :wink:
that did the trick
thank you

and also Blocking via OH works now :slight_smile:
will love to use this feature to dynamically block devices from the cloud :stars:

If there are three options to set, could you find out what to send for these? We could change that to a string channel with the three options as commands.

How to do that: Change the parameter in the FB UI, check what value is reported in the TRACE logging for the status, check next and so on.

I checked that and I think AVM also changed the logic in 7.20 there a little.

There are 2 parameters now on the Box UI:

  1. Internet Access: Blocked / Unblocked
  2. Internet Usage: You can select Pofiles there. Standard / Blocked / Unblocked (Default but can be extented / edited: see below)

For 2. the Profiles are done in another section and allows you to create multiple new profiles like time budgets for access or based on time of day.
I think after looking at it again that only 1. is affected by the new WAN Block feature and has is only boolean.
If a Trace helps you nevertheless I will do that for you of course.

1 Like

I think we control „Internet Access blocked/unblocked“. So a Switch is Fine. Thanks.

1 Like

yes correct
I gets more clear on that UI:
The WAN Block feature over TR64 only controls the “Gerätesperre”.
So a switch is perfect :slight_smile: Thanks again! :slight_smile:

1 Like

hi
could you add the comment feature # also for MacOnline.
It is not working there.

cheers

Bug. [tr064] fix parameter patterns by J-N-K · Pull Request #9749 · openhab/openhab-addons (github.com)