Busch-Jaeger Free@Home

Debug details:

==> /var/log/openhab2/openhab.log <==
2019-12-27 14:18:09.514 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing ‘freeathome:bridge:933a1e30’ takes more than 5000ms.
2019-12-27 14:18:09.696 [WARN ] [home.handler.FreeAtHomeBridgeHandler] - rocks.xmpp.core.session.NoResponseException: Timeout while waiting on advertised authentication mechanisms.

==> /var/log/openhab2/events.log <==
2019-12-27 14:18:09.697 [hingStatusInfoChangedEvent] - ‘freeathome:bridge:933a1e30’ changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Can not connect to SysAP with address: 10.100.100.134

==> /var/log/openhab2/openhab.log <==
2019-12-27 14:18:09.700 [WARN ] [home.handler.FreeAtHomeBridgeHandler] - Could not successfully get the getAll.xml from sysAP. Can happen if connecting to server takes too long.

Strange, based on your debug log, where you still have Timeout while waiting on advertised authentication mechanisms, it seems like you haven´t fully been able to clean cache.

For me, running OpenHabian, the following steps enabled me to run F@H binding successfully after downgrading from OH 2.5.0 to 2.4.0:

  • Delete F@H bridge from PaperUI
  • ssh into OpenHab service
  • Stop OpenHab service: sudo systemctl stop openhab2.service
  • Remove tmp files: sudo rm -rf /var/lib/openhab2/tmp/*
  • Remove cache files: sudo rm -rf /var/lib/openhab2/cache/*
  • Remove backup files: sudo rm -rf /var/lib/openhab2/jsondb/backup/*
  • Remove cache: sudo openhab-cli clean-cache
  • Restart OpenHab service: sudo reboot
  • Create new F@H bridge in PaperUI

So i pretty sure i did the same thing last time, maybe not in the exact same sequence, anyhow. It now works for me, thanks for the help :slight_smile:

1 Like

Thanks for the quick reply Stian!

Yes I am using OH 2.5, I think (latest OpenHabian release).

I am a bit confused when it comes to version numbers. OpenHabian (what I’m using) uses 1.x version numbers; now 1.5 is the latest version. But this contains OpenHab 2.5 I assume. But since I don’t know how to downgrade I just picked the OpenHabian v1.4.1 version for the RPI to see if that helps…

Well, that didn’t help; downloaded an older OpenHabian (1.4.1) image but it still installs the latest OpenHab version (2.5); now the question is; how do I downgrade openHAB 2.5 to 2.4 ?

EDIT: Nevermind; a downgrade is more simple then I thought. Just had to run
sudo apt-get install openhab2=2.4.0-1

Now I’m running OpenHab 2.4 and configured the FreeAtHome bridge and it went online instantly :D.

1 Like

Then I finally believe I made a breakthrough to update/enable Free@Home binding for OH 2.5.0. I myself have been struggling getting the binding running with 2.5.0, and have been “stuck” at OH 2.4.0. If others would be willing to test, the jar file could be downloaded at:

https://1drv.ms/u/s!Aoa2B3iUQJCngoBIKRn58RgfxwCKzA?e=8lJY5o

Steps to follow (based on an existing F@H setup in OH using jar file in openhab2-addons folder and running OH from Raspberry):

  • Delete existing F@H bridge (note thing ID: to be used for “new” Bridge)
  • Remove jar file from openhab2-addons folder
  • ssh into OpenHab service (Raspberry PI)
  • Stop OpenHab service: sudo systemctl stop openhab2.service
  • Remove tmp files: sudo rm -rf /var/lib/openhab2/tmp/*
  • Remove cache files: sudo rm -rf /var/lib/openhab2/cache/*
  • Remove backup files: sudo rm -rf /var/lib/openhab2/jsondb/backup/*
  • Remove cache: sudo openhab-cli clean-cache
  • Restart OpenHab service: sudo reboot
  • Update OH to 2.5.0
  • Add jar file from link above to openhab2-addons folder
  • Try to create new bridge from PaperUI (using thing ID from before to enable automatic link to existing things)
  • If not able to establish connection, try rebooting OH once again
    With successful connection, existing things should be automatically re-linked with the “new” bridge as long as the initial thing ID has been used during configuration in PaperUI.

Note
New OH 2.5.0 users, without having existing F@H setup in OH could do a fresh setup adding the jar file from link above into openhab2-addons folder and setting up bridge in PaperUI and performing an inbox scan for things to add.

Additional features from 2.4.0 version

  • Disovery/implementation of virtual switches as created from ABB development program
  • Disovery/implementation of motion detectors without relay

Hi Stian,

have you tried to create a virtual switch via fhapi (ABB developer programm)?

Every time when I try to register a virtual switch my access point do a restart. Thus the registration fails with error code 100A.

Thanks,

Yes, I have successfully created virtual switches under F@H SysAp (following ABB developer program), and I have implemented the switches in OH through revised code (as implemented in jar file from previous post).

Although, I also struggled in the beginning, and was in dialogue with ABB developers to trouble shoot issues. This was in the phase between SysAp version 2.3.2 and 2.4.0, and the issues should be resolved for SysAp 2.4.0 (at least for me). My issue was that I did not get the correct setup for the fhapi “user” under SysAp setup (as illustrated in the ABB tutorial) although following ABB guide, and I was not able to write/put anything to SysAp (using Postman). Got it working, and still works.

Next challenge for me, after having created virtual switch from Postman, was to be able to operate the switch under SysAp. The switch was found and implemented in SysAp, but it was not possible to perform state change (ON/OFF). I had to reboot SysAp, and eventually was able to operate switch, and could then implement switch in OpenHab.

1 Like

Thanks for your information.

So I have to contact the ABB developers to solve my issue. Which way did you use to contact the support? I didn’t find any contact information in the developer portal.

I have been in contact with ABB via:
Smarter Home Developer --> DE-SmarterHomeDeveloper@abb.com

Hello, I’m using successfully this binding with SysAP 2.4. I’m new to OpenHab and I want to start a bash script if a scene in free@home is started.

So I created a new rule “test.rules” with content

rule "test"
when
  Item FFFF48000003 received update
then
  logInfo("test", FFFF48000003.state)
end

The rule is loaded without error. If I active the scene over the f@h Android App nothing is written to log.

Maybe the ID of the item is wrong. In PaperUI " TV_Neue Szene_4800_FFFF48000003" is shown as the name of the item.

In events.log file is not shown that the scene is activated in f@h. Is it already possible to fetch it in OpenHab?

Does anyone have a hint?
Thanks :slight_smile:

Well, actually, if the scene is activated on the F@H side (i.e. via F@H switch, action etc), the F@H SysAp does not report the actual update/state change for the scene, and will thus not be able to trigger a OpenHab rule as you try to achieve. If the scene is triggered from OpenHab side, the update/state change for the scene should be reported.

For my own setup, I have created virtual switches (using the ABB developer program), which again are linked to the scene in F@H SysAp (virtual switch ON/OFF). I.e. when scene is triggered from the F@H system, the belonging virtual switch is switched ON. The virtual switches are included in the OpenHab setup, and these switches report “ON/OFF”, and could be used to trigger rules similar to what you try to achieve.

Also, I see you are using “Item FFFF4800003”, but is this item actually linked to a channel of your scene thing?

For instance, for one of my scenes, I have linked an item AltAvActivate which is linked to my scene thing as follows:

Switch   AltAv_Activate   "Activate scene" <mediacontrol>  {channel="freeathome:scene:FFFF48000006:activate"}

@kjoglums thanks for your fast feedback!

Is it transmitted from f@h to OpenHab when a hardware button is pressed?

When you activate a regular F@H switch (e.g. regular relay switch, dimmer switch etc), either via hardware switch or F@H app, the activation is reported by F@H SysAp (ON/OFF, dimmer value etc), and is transmitted from F@H to OH. However, scene activation itself on the “F@H side” (switch, F@H app etc) is not reported by the F@H SysAp (only state change of the things/channels involved in the scene), and there is thus “nothing” to transmit from F@H to OpenHab for scene activation, and one would therefore not be able to track/log scene activation as a ON/OFF feature. That is the reason why I have linked virtual switches to my scenes, to be able to detect actual scene activation from “F@H” side.

Okay, thanks again for feedback!

I read the documentation of ABB developer program (https://developer.eu.mybuildings.abb.com/getting-started). Am I right that you can only create virtual switches by connecting your SysAp to the cloud? I tried to use the URLs for local IP (eg. http://sysap/fhapi/v1/api/rest/configuration) but the response is HTTP 404

That is true: You will only be able to create virtual switches by connecting to SysAp via cloud. I.e. you need to follow the 3 steps shown in the bottom of page Sign up / Request / Subscribe. Then you will need to download the Postman software and follow the ABB Tutorials.

The cloud connection is only required for the creation of the virtual switches. Once the switches are created, and recognised in the SysAp GUI, you can play around with the switches under regular running environment.

Hi everyone, I’ve been messing around with the free @ home binding in OpenHAB for a while. And … by now I have reached the point where the binding is connected with my Sysap. Unfortunately I only see my BJ scenes in the list of Things. And adding a switch manually gives unfortunately no result. Is there anyone who can get me started? Do I have to configure something manually?

I am not very familiar with programming, so any explanation please in layman language;) Thanks in advance!

Ultimately, I want my free@home switches connect with Apple Homekit. Is there anyone who has this working already?

So, I understand you have your bridge Online.

However, are you not getting any autodiscovered things in PaperUI when you go to “Inbox” —> Add —> “Free@Home binding”? What is your log showing when you try to run autodiscovery from inbox?

Hi Stian,

This is how the logs look like (sorry, as a new user i can’t upload files so I had to copy/paste):

2020-01-14 18:10:56.909 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:switch:BEED7F330018_ch0000’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:56.920 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:switch:BEED7F330018_ch0001’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:56.919 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:switch:BEED7F330018_ch0001’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:56.927 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:switch:BEED7F330018_ch0002’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:56.928 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:switch:BEED7F330018_ch0002’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:56.936 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:switch:BEED7F330018_ch0003’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:56.935 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:switch:BEED7F330018_ch0003’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:56.949 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:scene:FFFF48000002’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:56.950 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:scene:FFFF48000002’ to inbox.

2020-01-14 18:10:56.958 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:scene:FFFF48000003’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:56.962 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:scene:FFFF48000003’ has been added.

2020-01-14 18:10:56.965 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:scene:FFFF48000004’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:56.966 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:scene:FFFF48000004’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:56.979 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:scene:FFFF48000006’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:56.979 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:scene:FFFF48000006’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:56.986 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:scene:FFFF48000008’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:56.986 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:scene:FFFF48000008’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:56.993 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:scene:FFFF48000009’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:56.993 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:scene:FFFF48000009’ to inbox.

==> /var/log/openhab2/events.log <==

2020-01-14 18:10:57.001 [home.event.InboxAddedEvent] - Discovery Result with UID ‘freeathome:scene:FFFF4800000E’ has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-14 18:10:57.001 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘freeathome:scene:FFFF4800000E’ to inbox.

2020-01-14 18:10:59.568 [ERROR] [rnal.handler.FreeAtHomeBridgeHandler] - Ops!

javax.xml.bind.UnmarshalException: null

at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335) ~[?:1.8.0_222]

at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:548) ~[?:?]

at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:234) ~[?:?]

at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:199) ~[?:?]

at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157) ~[?:1.8.0_222]

at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:214) ~[?:1.8.0_222]

at org.openhab.binding.freeathome.internal.xmpp.rocks.extensions.abb.com.protocol.data.Project$Builder.build(Project.java:164) ~[?:?]

at org.openhab.binding.freeathome.internal.handler.FreeAtHomeBridgeHandler.onMessageEvent(FreeAtHomeBridgeHandler.java:367) ~[?:?]

at org.openhab.binding.freeathome.internal.handler.FreeAtHomeBridgeHandler.lambda$0(FreeAtHomeBridgeHandler.java:206) ~[?:?]

at rocks.xmpp.util.XmppUtils.lambda$notifyEventListeners$1(XmppUtils.java:177) ~[?:?]

at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) ~[?:1.8.0_222]

at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:404) ~[?:1.8.0_222]

at rocks.xmpp.util.XmppUtils.notifyEventListeners(XmppUtils.java:175) ~[?:?]

at rocks.xmpp.core.session.XmppSession.lambda$handleElement$16(XmppSession.java:1208) ~[?:?]

at rocks.xmpp.util.concurrent.QueuedExecutorService.doExecute(QueuedExecutorService.java:154) ~[?:?]

at rocks.xmpp.util.concurrent.QueuedExecutorService.lambda$poll$0(QueuedExecutorService.java:126) ~[?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]

at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

Caused by: org.xml.sax.SAXParseException: The reference to entity “N” must end with the ‘;’ delimiter.

at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1850) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3061) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) ~[?:1.8.0_222]

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) ~[?:1.8.0_222]

at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:228) ~[?:?]

... 16 more

2020-01-14 18:10:59.594 [ERROR] [rnal.handler.FreeAtHomeBridgeHandler] - JaxbException null

What system are you running OH under, and which OH version are you running? And what java version?

Also, which F@H binding version are you using, are you using the latest jar (for OH 2.5.0) from link above: Link?

See from your log that you are discovering one switch, i.e. BEED7F330018. Not sure why you get the UnmarshalException, but it could relate to OH version vs F@H binding version (e.g. java version).

Have you tried deleting F@H bridge from PaperUI, rebooting OH and creating new bridge?