Problems binding to fritzbox

Hello

it is strange but i can’t add my Fritzbox to openhab2.

Fritzbox Binding (using TR064 protocol)

this file is created but the information added to the gui are not written down to
openHAB2-conf\services\fritzboxtr064.cfg

changeing the file on cli itself
the http to https and ports conection, I never see any information in the log nor a connections

/var/log/openhab2/openhab.log
/var/log/openhab2/events.log

so what i am doing wrong with it

on the fritzbox side i created a user
openhab
and the rights are for (FRITZ!Box Einstellungen) (prachnachrichten, Faxnachrichten, FRITZ!App Fon und Anrufliste) (Smart Home)

have a nice day
vinc

As fritzboxtr0641 is an openHAB1 Binding, I doubt that there is any option to set its configuration via GUI. That is the reason why the file openHAB2-conf\services\fritzboxtr064.cfg is generated. You have to change the settings in this file.
Please post your openHAB2-conf\services\fritzboxtr064.cfg here (using code fences)
It’s ok to xxx the password :slight_smile:

/etc/openhab2/services/fritzboxtr064.cfg

1 ## Binding for accessing FritzBoxes using the TR064 protocol. Uses http(s) requests.
2
3 # URL. Either use http://:49000 or https://:49443 (https preferred!)
4 url=http://10.147.42.1:49000
5
6 # Refresh Interval (60000ms default)
7 #refresh=60000
8
9 # User Name (only use this value if you configured a user in fbox webui/config!)
10 # If this parameter is missing, “dslf-config” is used as default username
11 # It is recommended to to switch to authentication by username in fritzbox config
12 # and add a separate config user for this binding.
13 user=openhab
14
15 # PW
16 pass=mypassword

You must not add line numbers. you must not add spaces at the beginning of a parameter. So the file should be more like
/etc/openhab2/services/fritzboxtr064.cfg

## Binding for accessing FritzBoxes using the TR064 protocol. Uses http(s) requests.

# URL. Either use http://:49000 or https://:49443 (https preferred!)
url=http://10.147.42.1:49000

# Refresh Interval (60000ms default)
#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.
user=openhab

# PW
pass=mypassword

ok yes looks better how did you do it with? the preformated or blockquote
but still with this information should be a conection to the fritzbox and this should be visible on the log file

when i do some change on the cfg file i got a error

       at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) [84:org.eclipse.jetty.server:9.4.11.v20180605]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [82:org.eclipse.jetty.security:9.4.11.v20180605]
        at jdk.internal.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:334) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:947) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:919) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:741) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:708) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:647) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:435) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:288) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:91) [39:org.apache.felix.scr:2.1.2]
        at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1667) [9:org.apache.felix.configadmin:1.9.4]
        at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1635) [9:org.apache.felix.configadmin:1.9.4]
        at org.apache.felix.cm.impl.UpdateThread$1.run(UpdateThread.java:126) [9:org.apache.felix.configadmin:1.9.4]
        at org.apache.felix.cm.impl.UpdateThread$1.run(UpdateThread.java:123) [9:org.apache.felix.configadmin:1.9.4]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) [9:org.apache.felix.configadmin:1.9.4]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [9:org.apache.felix.configadmin:1.9.4]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.ClassNotFoundException: javax.xml.soap.SOAPException cannot be found by org.openhab.binding.fritzboxtr064_1.13.0
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484) ~[?:?]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395) ~[?:?]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387) ~[?:?]
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
        ... 28 more

the java running is

# java --version
openjdk 11.0.2 2019-01-15 LTS
OpenJDK Runtime Environment Zulu11.29+11-CA (build 11.0.2+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.29+11-CA (build 11.0.2+9-LTS, mixed mode)

i think i found what’s wrong

i read this “…Zulu is currently the recommended Java platform for openHAB…”
so i did install the newest version.

but
“…Please download and install the Java 8 version of the JVM. openHAB is known not to work on Java 9 and Java 10…”

so mybe to install the newest Zulu Java was wrong

Definitely. openHAB will be compatible to Java 11, but not for now :slight_smile:

@Udo_Hartmann
merci udo, i will crash my VM and start again, it will be more easy and will install the zulu 8

have a nice day
vinc

@Udo_Hartmann
reinstalling it with java 8 works better without error, or much less,
i still geht on

2019-03-22 22:18:26.969 [WARN ] [itzboxtr064.internal.SoapValueParser] - Fault received from FritzBox for item externalWanip in SOAP response <?xml version="1.0"?><s:Envelop
e 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>401</errorCode>
<errorDescription>Invalid Action</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

hmmm… did you setup the fritz!box to grant TR064 access for the configured user?

yes and the log file shows also some information

2019-03-22 23:01:07.272 [vent.ItemStateChangedEvent] - fboxWanTotalBytesSent changed from 1612771547 to 1613084570
2019-03-22 23:01:07.279 [vent.ItemStateChangedEvent] - fboxWanTotalBytesReceived changed from 2053148440 to 2053217366
2019-03-22 23:01:07.284 [vent.ItemStateChangedEvent] - fboxDslDownstreamMaxRate changed from 140263 to 140607
2019-03-22 23:01:07.289 [vent.ItemStateChangedEvent] - fboxWanLayer1DownstreamMaxBitRate changed from 140607000 to 140

Ah. So there is only some information missing. Maybe your box isn’t fully supported. Another option would be the firmware version (possible changed options…)

this part is strange missing the fr at first place

No, that’s normal behavior. The logger name is truncated. :slight_smile: It starts with org.openhab.binding. and it’s very likely you will never see this in a log file…

1 Like