IHC binding

Hi

I have problems with my ihc binding, it loses connection to the controller and then connects again many times a day

My items looks like this, and i have about 80 items connected to the controler

Number 		Temperature_Kontor		"Rum Temperatur [%.1f °C]" 	<temperature>   (Temperatur, Kontor) 	["CurrentTemperature"]  {ihc="0x9d4a14", autoupdate="false"}

Controler info:
HW2
Firmware 2.8.4

2018-05-30 21:10:26.118 [ERROR] [org.openhab.binding.ihc.ws.IhcClient] - New controller state change notification wait failed...

org.openhab.binding.ihc.ws.IhcExecption: java.io.InterruptedIOException: Connection has been shut down

	at org.openhab.binding.ihc.ws.IhcHttpsClient.sendQuery(IhcHttpsClient.java:103) [237:org.openhab.binding.ihc:1.11.0]

	at org.openhab.binding.ihc.ws.IhcControllerService.waitStateChangeNotifications(IhcControllerService.java:164) [237:org.openhab.binding.ihc:1.11.0]

	at org.openhab.binding.ihc.ws.IhcClient.waitStateChangeNotifications(IhcClient.java:347) [237:org.openhab.binding.ihc:1.11.0]

	at org.openhab.binding.ihc.ws.IhcClient.access$4(IhcClient.java:343) [237:org.openhab.binding.ihc:1.11.0]

	at org.openhab.binding.ihc.ws.IhcClient$IhcControllerStateListener.run(IhcClient.java:564) [237:org.openhab.binding.ihc:1.11.0]

Caused by: java.io.InterruptedIOException: Connection has been shut down

	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:344) ~[?:?]

	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) ~[?:?]

	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) ~[?:?]

	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[?:?]

	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[?:?]

	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[?:?]

	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[?:?]

	at org.openhab.binding.ihc.ws.IhcHttpsClient.sendQ(IhcHttpsClient.java:119) ~[?:?]

	at org.openhab.binding.ihc.ws.IhcHttpsClient.sendQuery(IhcHttpsClient.java:87) ~[?:?]

	... 4 more

Caused by: org.apache.http.impl.conn.ConnectionShutdownException

	at org.apache.http.impl.conn.CPoolProxy.getValidConnection(CPoolProxy.java:79) ~[?:?]

	at org.apache.http.impl.conn.CPoolProxy.getSSLSession(CPoolProxy.java:147) ~[?:?]

	at org.apache.http.impl.client.DefaultUserTokenHandler.getUserToken(DefaultUserTokenHandler.java:81) ~[?:?]

	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:327) ~[?:?]

	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) ~[?:?]

	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) ~[?:?]

	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[?:?]

	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[?:?]

	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[?:?]

	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) ~[?:?]

	at org.openhab.binding.ihc.ws.IhcHttpsClient.sendQ(IhcHttpsClient.java:119) ~[?:?]

	at org.openhab.binding.ihc.ws.IhcHttpsClient.sendQuery(IhcHttpsClient.java:87) ~[?:?]

	... 4 more

2018-05-30 21:10:26.211 [WARN ] [nhab.binding.ihc.internal.IhcBinding] - Error occurred on communication to IHC controller: java.io.InterruptedIOException: Connection has been shut down

2018-05-30 21:10:26.845 [INFO ] [nhab.binding.ihc.internal.IhcBinding] - Connecting to IHC / ELKO LS controller [IP='192.168.0.20' Username='mads' Password='******'].

Hi Zamzon,

Did you find a cause and/or a solution? I’m having the same issue.

Kerbje

Hi

It got fixed in the binding updates

Hi @pauli_anttila

For some reason which I have no idea of, I´m starting to get a problem with the IHC binding. It has been running fine for several months, and then the last coupple of weeks, it no longer do…

The symptom is very strange when it happesn…
Controller is online just fine. But I receive nothing from the controller, and cant control anything either.
Restarting the binding solves the problem. But after some days days, it happens again.

I´m using openhab 2.5.0 and the IHC binding 2.5.0 as well…
I just look in the openhab.log file… The last state received from the controller this morning was 08.55. And there is nothing in the log afterwards which indicate any problems with IHC binding. I normally would receive alot of states, cause I´m using IHC pir´s which is added to openhab. And since we´re working home, alot of motion is going on all the time :slight_smile:
After I restarted the bundle about 11:30 it started to receive updates again, and control is beeing send to the controller as well.

Do you have any idea why this may happen or what I can do?
Since this happens very rare I wonder if debug logging would make any good.

1 Like

Without debug/trace level logs it’s rather difficult to say anything. Next time when problem occurs, you could change ihc binding log level to trace (without restart) to see if that give any hint about the issue.

I am so glad someone else is experiencing this! It is so hard to pinpoint or recreate. I will turn on TRACE when it happens again. I had it running in DEBUG now and this is also being thrown I suppose every minute

2020-05-18 21:47:34.610 [DEBUG] [ding.ihc.internal.handler.IhcHandler] - Update RF device data
2020-05-18 21:47:34.740 [DEBUG] [ding.ihc.internal.handler.IhcHandler] - Error occured when fetching RF device information, reason: : Error occured during XML data parsing
org.openhab.binding.ihc.internal.ws.exeptions.IhcExecption: Error occured during XML data parsing
        at org.openhab.binding.ihc.internal.ws.services.IhcAirlinkManagementService.getDetectedDeviceList(IhcAirlinkManagementService.java:67) ~[?:?]
        at org.openhab.binding.ihc.internal.ws.IhcClient.getDetectedRFDevices(IhcClient.java:262) ~[?:?]
        at org.openhab.binding.ihc.internal.handler.IhcHandler.updateRfDeviceStates(IhcHandler.java:845) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
        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: java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_222]
        at java.lang.Integer.parseInt(Integer.java:592) ~[?:1.8.0_222]
        at java.lang.Integer.parseInt(Integer.java:615) ~[?:1.8.0_222]
        at org.openhab.binding.ihc.internal.ws.services.IhcAirlinkManagementService.parseResourceValue(IhcAirlinkManagementService.java:78) ~[?:?]
        at org.openhab.binding.ihc.internal.ws.services.IhcAirlinkManagementService.getDetectedDeviceList(IhcAirlinkManagementService.java:57) ~[?:?]
        ... 9 more

I have no wireless devices in my setup.

I will keep an eye on it and give it a shot with trace logging when it happens again

Issue doesn’t cause any harm, but just print out error in debug level. Could you enable trace level logs and post soap message here, so that I can see what control response when there is no rf devices at all (i will not remove my rf devices just to test this). I will then try to fixit and also add junit test for it.

:))

2020-05-18 22:24:40.851 [DEBUG] [ding.ihc.internal.handler.IhcHandler] - Update RF device data
2020-05-18 22:24:40.853 [TRACE] [.ihc.internal.ws.http.IhcHttpsClient] - Send query (url=https://192.168.xxx.x:xxxx/ws/AirlinkManagementService, connectionPool=1050848, clientId=2028801 requestId=0, timeout=5000, headers=[SOAPAction: getDetectedDeviceList, content-type: text/xml]): <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
 <soapenv:Body>
 </soapenv:Body>
</soapenv:Envelope>
2020-05-18 22:24:40.966 [TRACE] [.ihc.internal.ws.http.IhcHttpsClient] - Received response (connectionPool=1050848, clientId=2028801 requestId=0, in PT0.111S, headers=[content-type: text/xml; charset="utf-8", date: Mon, 18-May-2020 20:25:08 GMT, keep-alive: timeout=900, max=1000, connection: Keep-Alive, content-length: 421, server: Rogatkin's JWS based on Acme.Serve/$Revision: 1.39 $, mime-version: 1.0, set-cookie: JSESSIONID=-1589823081553-11-298]): <?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:getDetectedDeviceList1 xmlns:ns1="utcs">
<ns1:arrayItem xsi:nil="true" xsi:type="ns1:WSRFDevice">
</ns1:arrayItem>
</ns1:getDetectedDeviceList1>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

2020-05-18 22:24:40.982 [DEBUG] [ding.ihc.internal.handler.IhcHandler] - Error occured when fetching RF device information, reason: : Error occured during XML data parsing 
org.openhab.binding.ihc.internal.ws.exeptions.IhcExecption: Error occured during XML data parsing
	at org.openhab.binding.ihc.internal.ws.services.IhcAirlinkManagementService.getDetectedDeviceList(IhcAirlinkManagementService.java:67) ~[?:?]
	at org.openhab.binding.ihc.internal.ws.IhcClient.getDetectedRFDevices(IhcClient.java:262) ~[?:?]
	at org.openhab.binding.ihc.internal.handler.IhcHandler.updateRfDeviceStates(IhcHandler.java:845) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
	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: java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_222]
	at java.lang.Integer.parseInt(Integer.java:592) ~[?:1.8.0_222]
	at java.lang.Integer.parseInt(Integer.java:615) ~[?:1.8.0_222]
	at org.openhab.binding.ihc.internal.ws.services.IhcAirlinkManagementService.parseResourceValue(IhcAirlinkManagementService.java:78) ~[?:?]
	at org.openhab.binding.ihc.internal.ws.services.IhcAirlinkManagementService.getDetectedDeviceList(IhcAirlinkManagementService.java:57) ~[?:?]
	... 9 more
2020-05-18 22:24:41.293 [TRACE] [.ihc.internal.ws.http.IhcHttpsClient] - Received response (connectionPool=1050848, clientId=14148562 requestId=6, in PT5.16S, headers=[content-type: text/xml; charset="utf-8", date: Mon, 18-May-2020 20:25:04 GMT, keep-alive: timeout=900, max=1000, connection: Keep-Alive, content-length: 461, server: Rogatkin's JWS based on Acme.Serve/$Revision: 1.39 $, mime-version: 1.0, set-cookie: JSESSIONID=-1589823081553-11-298]): <?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:waitForControllerStateChange3 xmlns:ns1="utcs" xsi:type="ns1:WSControllerState">
<ns1:state xsi:type="xsd:string">text.ctrl.state.ready</ns1:state>
</ns1:waitForControllerStateChange3>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When I browse to that AirlinkManagementService URL, I get a 'Secure Connection Failed - PR_END_OF_FILE_ERROR".

1 Like