Homematic binding doesn't find any things (Java Exception)

Hello everyone,

well, I am new to openHAB 2 and fighting with the Homematic binding several hours. Maybe one of you can help me with my problem:

I have a CCU2 with the latest software v2.27.7 which I’m trying to connect with my openHAB 2 instance (repository-based latest version) running on Ubuntu Server 16.04 LTS. After installing the Homematic binding (latest version installed via Paper UI, I think its 2.0.0) I can add the CCU2 as described without problems. After adding the CCU2 it is listed under Things and it is also marked with the green “online” tag. But then there are no other Homematic Devices found in the Inbox, neither the GATEWAY-EXTRAS thing nor any other Homematic Device which is connected to the CCU2.

I’ve tested this multiple times, with Oracle Java JRE and OpenJDK, both version 1.8.0_121, configured via Paper UI and manual text-file based configuration, every time with a new, fresh install of openHAB 2 to avoid any problems with old configs. But nothing of this worked, countless tests and reboots later still no devices found in the Inbox. There seems to be an problem with the HomematicDeviceDiscoveryService which throws an Java Exception, see logfile:

2017-03-21 11:20:03.210 [INFO ] [ternal.communicator.HomematicGateway] - HmGatewayInfo[id=CCU,type=CCU2,firmware=2.27.7,address=LEQ05XXXXX,wired=false,hmip=true,cuxd=true]
2017-03-21 11:20:03.211 [INFO ] [ternal.communicator.HomematicGateway] - Used Homematic transfer modes: RF:BIN_RPC, HMIP:XML_RPC, CUXD:BIN_RPC
2017-03-21 11:20:18.973 [ERROR] [very.HomematicDeviceDiscoveryService] - 
java.io.IOException
	at org.openhab.binding.homematic.internal.communicator.CcuGateway.sendScript(CcuGateway.java:235)[183:org.openhab.binding.homematic:2.0.0]
	at org.openhab.binding.homematic.internal.communicator.CcuGateway.sendScriptByName(CcuGateway.java:205)[183:org.openhab.binding.homematic:2.0.0]
	at org.openhab.binding.homematic.internal.communicator.CcuGateway.sendScriptByName(CcuGateway.java:193)[183:org.openhab.binding.homematic:2.0.0]
	at org.openhab.binding.homematic.internal.communicator.CcuGateway.loadDeviceNames(CcuGateway.java:125)[183:org.openhab.binding.homematic:2.0.0]
	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.getDeviceDescriptions(AbstractHomematicGateway.java:421)[183:org.openhab.binding.homematic:2.0.0]
	at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.loadAllDeviceMetadata(AbstractHomematicGateway.java:358)[183:org.openhab.binding.homematic:2.0.0]
	at org.openhab.binding.homematic.discovery.HomematicDeviceDiscoveryService$1.run(HomematicDeviceDiscoveryService.java:108)[183:org.openhab.binding.homematic:2.0.0]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: java.util.concurrent.TimeoutException
	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:109)[69:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:655)[69:org.eclipse.jetty.client:9.2.19.v20160908]
	at org.openhab.binding.homematic.internal.communicator.CcuGateway.sendScript(CcuGateway.java:225)[183:org.openhab.binding.homematic:2.0.0]
	... 13 more

Maybe someone of you can help me, I slowly get desperate :wink:

Thank you :slight_smile:

Pottrocker

Looks like a firewall issue, make sure all the ports mentioned in the docs are open: http://docs.openhab.org/addons/bindings/homematic/readme.html

Scripts are sent over port 8181

Sorry for my bad English :wink:

The Problem is that since CCU2 Firmware 2.27.7 the Firewall starts on Boot…

You must change your Firewall Settings in CCU… Give the Script API -> “Vollzugriff”

Then the Thing Discovery works …

1 Like

Hello everyone,

yes, this solved the problem, thank you very much.
I just saw, that port 8181 of the CCU was closed. After configuring the CCUs firewall the discovery works fine.

Thank you :slight_smile:

1 Like

Hi pottrocker,

I have got the same problem since I have got CCU2 version 2.27.7 (now 2.27.8) and the “System Sicherheitsschlüssel” is set. The CCU firewall is set to “Vollzugriff” for all API versions. Anyhow I get the same error message. How did you discover that Port 8181 is closed on the CCU. I only know the already mentioned firewall configuration settings in the system menue.
Thanks a lot for your help.

Hi Palatin,

hmm…Well, I just used the android app “IP Tools” which includes a port scanner. When I used this app for scanning my CCU2 port 8181 was not listed and therefore it was not rechable.

Hi pottrocker,

thanks a lot for this hint. I will look for a similar app on IOS.