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

Hi @J-N-K

Thanks for adding the Wan Block to the new OH3 binding :slight_smile:
I finally switched to OH3 and I am now testing …

I added an IP to the parameters for the Thing.
I tried to Scan again but no new SubDevice did show up and neither a new channel for blocking this IP came up in an existing Device.

Am I looking at the wrong place or anything I need to do after adding an IP to the WanBlock section?

Best

Please show your config. In general there should be a new channel on that device.

Ok - its not very special.
The Box itself is working and other channels are linked to items and work fine.

In the Wan Block IPs I added one IPv4 to test (it does exist on the network)
The Channels of the device don’t show anything new after I added it.
Also the channels of the subdevices don’t have a new channel.



I‘ll check that.

Unfortunately I can’t test that: Channel wanBlockByIP not available: Service 'urn:X_AVM-DE_HostFilter-com:serviceId:X_AVM-DE_HostFilter1' not found on my system. What is in the log for you?

14:50:02.527 [DEBUG] [nhab.binding.tr064.internal.util.Util] - Channel wanBlockByIP not available: Could not get required parameter for channel 'wanBlockByIP' from thing config (missing, empty or invalid)

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: