User Openhab has no access to FritzBox home automation functions, when using alexa

Hey,

I just set up openhab2 to controll my heating (Fritzbox Comet). It works just fine :smiley:
but next Step was integration with alexa and hue Emulation. Alexa found the heating and the commands are send but then the fritzbox and heating go offline in openhab. It says User Openhab has not access
 but its no problem to change the temp via Habpanel with the same user. My FB is set to use User and Password. Anyone got an Idea ?

Edit: Is normal that openhab can change Smarthome Things when the function activate “Smart-Home-Function in Homenet” is not active on the FritzBox ? (“Smart-Home-Funktion im FRITZ!Box-Heimnetz freigeben”) (Didnt solve the Problem :frowning:)

Edit2: You can actually see the change on the HabPanel, but its only a very brief change.(like its documented in the log)

Edit3: i already tried the following things: Use only password authentication, deativate the option “Confirm the execution of special settings and functions” and using root user.

some more info:

Fritz OS 6.80 (Fritz!Box 7490)
openHAB 2.0.0-1 (Release Build)

openjdk version "1.8.0_112"
OpenJDK Runtime Environment (Zulu Embedded 8.19.0.31-linux-aarch32hf) (build 1.8.0_112-b31)
OpenJDK Client VM (Zulu Embedded 8.19.0.31-linux-aarch32hf) (build 25.112-b31, mixed mode, Evaluation)

Item config:

Number alexa_set_temp_Wohn “Schlafzimmer” [ “TargetTemperature” ] {channel=“avmfritz:Comet_DECT:FB_IP:AIN:set_temp”}
Number alexa_set_temp_Bad “Badezimmer” [ “TargetTemperature” ] {channel=“avmfritz:Comet_DECT:FB_IP:AIN:set_temp”}

Changing temps via Alexa
2017-03-05 19:12:22.668 [ItemCommandEvent ] - Item ‘alexa_set_temp_Wohn’ received command 20
2017-03-05 19:12:22.712 [ItemStateChangedEvent ] - alexa_set_temp_Wohn changed from 21.5 to 20
2017-03-05 19:12:23.515 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:FB_IP’ changed from ONLINE: FritzBox online to OFFLINE (CONFIGURATION_ERROR): User Openhab has no access to FritzBox home automation functions
2017-03-05 19:12:23.557 [hingStatusInfoChangedEvent] - ‘avmfritz:Comet_DECT:FB_IP:AIN’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2017-03-05 19:12:23.576 [hingStatusInfoChangedEvent] - ‘avmfritz:Comet_DECT:FB_IP:AIN’ changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)
2017-03-05 19:12:34.969 [ItemStateChangedEvent ] - alexa_set_temp_Wohn changed from 20 to 21.5
2017-03-05 19:12:35.173 [hingStatusInfoChangedEvent] - ‘avmfritz:fritzbox:FB_IP’ changed from OFFLINE (CONFIGURATION_ERROR): User Openhab has no access to FritzBox home automation functions to ONLINE: FritzBox online

Changing temps via HABPanel
2017-03-05 19:14:43.505 [ItemCommandEvent ] - Item ‘alexa_set_temp_Wohn’ received command 21
2017-03-05 19:14:43.524 [ItemStateChangedEvent ] - alexa_set_temp_Wohn changed from 21.5 to 21

Does no one have any hint, that i haven’t tried yet ?

Hi Icekalt,

which version of the avmfritz binding do you use? Did you install it manually? Where did you download it?

Hey,
sorry for long responsetime busy weekend.

i use your latest version 2.1.0 (https://github.com/openhab/openhab2-addons/files/748906/org.openhab.binding.avmfritz-2.1.0_20170202-SNAPSHOT.zip)
https://github.com/openhab/openhab2-addons/issues/1687

I added it to to usr shares addon folder and it was available via paper UI

Hi Icekalt,

I uploaded a new version with additional logging in the authentication process. Would you like to update? And have a look at the debug logs?

Thanks :smiley:
Yeah i will try the new version on saturday and give feedback :thumbsup:

Hey i downloaded this folder https://github.com/cweitkamp/openhab2-addons/tree/AVMFritzComet
and copied the org.openhab.binding.avmfritz into /usr/share/openhab2/addons but it doesnt install anything new
and i get the same errors as before


oh and my Fritzbox updated to 6.83, but again nothing changed, at least in event.log.

in openhab.log i now get frequent error after pasting the org.openhab.binding.avmfritz into /usr/share/openhab2/addons
Erorr log is on the bottom
 I already removed it, but still get the same errors :confused:
i might make a clean install when i got time and be happy with using the webinterface of openhab, or wait till the cloud option is not that shaky anymore, even though i prefer a local version over cloud solution anytime.

2017-03-19 14:39:44.564 [ERROR] [org.openhab.binding.avmfritz ] - FrameworkEvent ERROR - org.openhab.binding.avmfritz
java.io.IOException: Exception in opening zip file: /var/lib/openhab2/cache/org.eclipse.osgi/216/0/bundleFile
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:305)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.basicOpen(ZipBundleFile.java:85)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.getZipFile(ZipBundleFile.java:98)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.checkedOpen(ZipBundleFile.java:65)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.getEntry(ZipBundleFile.java:232)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.BundleFile.getResourceURL(BundleFile.java:136)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findResourceImpl(ClasspathManager.java:420)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalResources(ClasspathManager.java:397)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalResources(ModuleClassLoader.java:320)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalResources(BundleLoader.java:813)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findResources(BundleLoader.java:674)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.getResources(ModuleClassLoader.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.ContextFinder.findResources(ContextFinder.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at java.lang.ClassLoader.getResources(ClassLoader.java:1142)[:1.8.0_112]
at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:348)[:1.8.0_112]
at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)[:1.8.0_112]
at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)[:1.8.0_112]
at javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:293)[:1.8.0_112]
at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_112]
at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:289)[:1.8.0_112]
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:267)[:1.8.0_112]
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:127)[:1.8.0_112]
at com.sun.xml.internal.bind.v2.util.XmlFactory.createParserFactory(XmlFactory.java:116)[:1.8.0_112]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getXMLReader(UnmarshallerImpl.java:139)[:1.8.0_112]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)[:1.8.0_112]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:214)[:1.8.0_112]
at org.openhab.binding.avmfritz.internal.hardware.callbacks.FritzAhaDiscoveryCallback.execute(FritzAhaDiscoveryCallback.java:59)[216:org.openhab.binding.avmfritz:2.0.0]
at org.openhab.binding.avmfritz.internal.hardware.FritzahaContentExchange.onComplete(FritzahaContentExchange.java:71)[216:org.openhab.binding.avmfritz:2.0.0]
at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:453)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:400)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:266)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1487)[71:org.eclipse.jetty.http:9.2.19.v20160908]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1245)[71:org.eclipse.jetty.http:9.2.19.v20160908]
at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:156)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:117)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:69)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:89)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:123)[69:org.eclipse.jetty.client:9.2.19.v20160908]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[72:org.eclipse.jetty.io:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
Caused by: java.io.FileNotFoundException: /var/lib/openhab2/cache/org.eclipse.osgi/216/0/bundleFile (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)[:1.8.0_112]
at java.util.zip.ZipFile.(ZipFile.java:219)[:1.8.0_112]
at java.util.zip.ZipFile.(ZipFile.java:149)[:1.8.0_112]
at java.util.zip.ZipFile.(ZipFile.java:163)[:1.8.0_112]
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:288)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

 43 more

Hi Icekalt,

I am sorry that I cannot help you to solve your problem. I can understand that you do not want to use experimental versions and tinker around in your setup. The new error disappears after a restart of the openhab service. A clean install is not necessary.

I hope my PR #1815 will be merged shortly. But we have to wait until one of the maintainers will review it and confirm to merge it.

Have a good one.

Hey Christoph,
no problem, its not that critical and two more month and the heat period is already over, i can “endure” this. But thanks for trying :thumbsup:

You are welcome. Feel free to ask again if you have any questions.