Homematic: Timeout and HM-CC-RT-DN

801 views
Skip to first unread message

sm5...@gmail.com

unread,
Oct 22, 2013, 4:37:21 PM10/22/13
to ope...@googlegroups.com
 I'm new to OpenHab and I like what I have seen so far. I running a house with Homematic since 2008 and I have about 60 devices connect and have just placed a new order for 20 more. I have run into 2 problems that might be related or maybe not. I'm still gathering data to better give an explanation but want to start with my early findings. I running OpenHab 1.4 snapshot.

 1. When OpenHab is connected to the CCU2 after a few hours they stop talking to each other. Openhab get RPC timeouts and the CCU displays 


 The only way to get it to reconnect is by rebooting the CCU and restart OpenHab. To check the network I have from a third device checked the CCU2 and OpenHab server constantly running ping and have had no fault when the timeout occur. It could be bullet 3 in the error message above that the device that is down is OpenHab RPC.

 2. I know that HM-CC-RT-DN is not yet supported, I have 4 with 4 more on its way so I look forward to them being supported. I get java exceptions each time they report status through OpenHab bus. I wonder if the exceptions avtually can be the cause of #1 above as well.

 I'm on business trip at the moment but when I'm back I will send some more data about the exceptions and timeout.

 Regards
 Roger

sm5...@gmail.com

unread,
Oct 22, 2013, 4:47:23 PM10/22/13
to ope...@googlegroups.com
I just looked at pull request #53. It seems quite easy to add support for new devices in Homematic Bindings, will play with that when I'm back home in a weeks time :) I wish I had a CCU2 and the device with me here at the hotel room.

 /Roger 

Thomas Letsch

unread,
Oct 23, 2013, 4:14:29 PM10/23/13
to ope...@googlegroups.com
a short google search did reveal the following parameters:

ACTUAL_TEMPERATURE 
BATTERY_STATE
CONTROL_MODE
FAULT_REPORTING
SET_TEMPERATURE
VALVE_STATE

Temperature is supported, Battery State also and valve state. With the correct xml file that should work...

R.,
Thomas

sm5...@gmail.com

unread,
Oct 23, 2013, 4:45:14 PM10/23/13
to ope...@googlegroups.com
 Agree.

 It is immediately after the devices report the ACTUAL_TEMPERATURE that I get the RPC exception. I will come back with more information as soon as I'm back home.

 /R

Christian Radermacher

unread,
Nov 11, 2013, 2:34:09 AM11/11/13
to ope...@googlegroups.com
Hello,

is there something new to the HM-CC-RT-DN Device.

I bought an CCU 2 for replacing the Windows Bidcos Service an bought some of the Devices for my Heating System to replace the old Version.

I get no information at the time.

Greetings
Christian

Thomas Letsch

unread,
Nov 11, 2013, 3:51:32 PM11/11/13
to ope...@googlegroups.com
unfortunately there is nothing new .Thanks to Roger and others I can see about three errors currently: 
1. org.apache.xmlrpc.XmlRpcException: Unknown instance: I have currently not even a slight idea why and where there is an unknown instance
2. rg.apache.xmlrpc.client.XmlRpcClientException: Failed to read server's response: Ogiltig byte 1 i UTF-8-sekvensen för 1-byte.
Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Ogiltig byte 1 i UTF-8-sekvensen för 1-byte.
	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:
This is a very strange problem where it seems that the CCU2 sends invalid UTF8 characters. 
3. The problem that the CCU2 stops working after certain period of time. I thought I could solve that one easily by returning empty messages back, but it doesn't seem to work.

Ok, I need more information (and ideas from you guys :-)

Please send me more log files, always a couple of CCU log and Openhab log of the same time. Perhaps give me more infos from the Homematic Binding with the following log settings:
<logger name="org.openhab.binding.homematic" level="TRACE"/>
<logger name="org.apache.xmlrpc" level="TRACE"/> 
<logger name="com.sun.org.apache.xerces" level="TRACE"/> 


Thanks!
Thomas

sm5...@gmail.com

unread,
Nov 11, 2013, 4:31:04 PM11/11/13
to ope...@googlegroups.com
 Thanks Thomas,

 I've looked at the CCU2 response in #2 with Wireshark and have not yet found anything that looks like an invalid UTF-8 character. I'm still investigating. The packet is huge, 146000 bytes when it throw the exception.

 I will send you new log files with extended loglevel but it might not be until the weekend.

 Have you been able to replicate any of the issues yourself?

 Your HM-CC-RT-DN.xml is not correct however with the CCU2 problems I have not been able to fully test my version. I have partly tested it with CCU1 without any problem.

 Regards
 Roger

Thomas Letsch

unread,
Nov 12, 2013, 4:29:16 PM11/12/13
to ope...@googlegroups.com
Hi Roger,

cool, that would be great. 
I have a new idea about #1, I think its the effect of #3. "Unknown instance" is probably the return of the CCU2 when it did remove the openhab instance from its list of known clients.

Still have to figure out what exactly to send back to the CCU2 :-(

R.,
Thomas

Christian Radermacher

unread,
Nov 14, 2013, 2:02:15 AM11/14/13
to ope...@googlegroups.com
Hello Thomas,

I have an Log from my CCU 2 for the HM-CC-RT-DN:

ov 14 07:52:59 homematic-ccu2 user.debug rfd: RX for KEQ0509363: @1432509906 RSSI=-41dB 0x220F97 -> 0x000000 Generic [GEQ0208030]:   CNT=24,RPTEN=1,RPTED=0,BIDI=0,BURST=0,WAKEUP=0,WAKEMEUP=1,BCAST=1,TYPE=0x10   DATA = 0A A8 E4 10 03 18 
Nov 14 07:52:59 homematic-ccu2 user.debug rfd: Event: KEQ0509363:4.CONTROL_MODE=0
Nov 14 07:52:59 homematic-ccu2 local0.info ReGaHss: Info: XmlRpcMethodEvent::execute: Event="KEQ0509363:4"."CONTROL_MODE"=0 [../Platform/DOM/iseXmlRpc.cpp (343)]
Nov 14 07:52:59 homematic-ccu2 user.debug rfd: Event: KEQ0509363:4.FAULT_REPORTING=0
Nov 14 07:52:59 homematic-ccu2 local0.info ReGaHss: Info: XmlRpcMethodEvent::execute: Event="KEQ0509363:4"."FAULT_REPORTING"=0 [../Platform/DOM/iseXmlRpc.cpp (343)]
Nov 14 07:52:59 homematic-ccu2 user.debug rfd: Event: KEQ0509363:4.BATTERY_STATE=3.100000
Nov 14 07:52:59 homematic-ccu2 user.debug rfd: Event: KEQ0509363:4.VALVE_STATE=3
Nov 14 07:52:59 homematic-ccu2 user.debug rfd: Event: KEQ0509363:4.ACTUAL_TEMPERATURE=22.800000
Nov 14 07:52:59 homematic-ccu2 user.debug rfd: Event: KEQ0509363:4.SET_TEMPERATURE=21.000000

The Battery_state send an Value like the Temperature. 

I hope this is helpful 

Regards
Christian

Thomas Letsch

unread,
Nov 16, 2013, 10:34:30 AM11/16/13
to ope...@googlegroups.com
HI Christian,

thanks for the log file. I already recognized that the temperatures were wrong in my first device config xml. The last one missing is the VALVE_STATE:
Could you please tell me what state the valve had when you took the log? In other words I need to know what means "3" and what values are there more...

R.,
Thomas

sm5...@gmail.com

unread,
Nov 16, 2013, 10:40:57 AM11/16/13
to ope...@googlegroups.com
 Thomas,

 VALVE_STATE is percentage open of the valve. I think IntegerPercentConverter should be fine. But as you know I cannot test :)

 /R

Thomas Letsch

unread,
Nov 16, 2013, 10:41:02 AM11/16/13
to ope...@googlegroups.com
HI Christian,

I have made a new preliminary device config for review:

<?xml version="1.0" encoding="UTF-8"?>
<device name="HM-CC-RT-DN" type="Wireless Thermostat">
    <channel name="1">
        <parameter name="ACTUAL_TEMPERATURE">
            <converter forType="DecimalType">
                <className>org.openhab.binding.homematic.internal.converter.TemperatureConverter</className>
            </converter>
        </parameter>
        <parameter name="SET_TEMPERATURE">
            <converter forType="DecimalType">
                <className>org.openhab.binding.homematic.internal.converter.TemperatureConverter</className>
            </converter>
        </parameter>
        <parameter name="VALVE_STATE">
            <converter forType="DecimalType">
                <className>org.openhab.binding.homematic.internal.converter.IntegerDecimalConverter</className>
            </converter>
        </parameter>
        <parameter name="BATTERY_STATE">
            <converter forType="DecimalType">
                <className>org.openhab.binding.homematic.internal.converter.DoubleDecimalConverter</className>
            </converter>
        </parameter>
        <parameter name="FAULT_REPORTING">
            <converter forType="OnOffType">
                <className>org.openhab.binding.homematic.internal.converter.IntegerOnOffConverter</className>
            </converter>
        </parameter>
        <parameter name="CONTROL_MODE">
            <converter forType="OnOffType">
                <className>org.openhab.binding.homematic.internal.converter.IntegerOnOffConverter</className>
            </converter>
        </parameter>
    </channel>
</device>

BTW, the  DoubleDecimalConverter is still only available in my personal openhab fork.

R.,
Thomas

Thomas Letsch

unread,
Nov 16, 2013, 10:43:39 AM11/16/13
to ope...@googlegroups.com
Hi Roger, 

thanks for your answer. And yes, I know ;-)
To all others:
You can add the following lines to have the percent value as well:
        <parameter name="VALVE_STATE">
            <converter forType="PercentType">
                <className>org.openhab.binding.homematic.internal.converter.IntegerPercentConverter</className>
            </converter>
        </parameter>

R.,
Thomas

thorsten...@gmail.com

unread,
Nov 27, 2013, 12:25:46 PM11/27/13
to ope...@googlegroups.com
Hello Thomas,

I tried to get my HM-CC-RT-DN running with a CCU2 and your openhab fork and I get the XmlRpcClientException too. I've captured the CCU's response with WireShark and there are indeed illegal chars in it. You can find it at line 3, col 78593 in the attached file. I think it should be the degrees sign, but is someting else.

Any ideas how to fix this or where to report the issue with the CCU?

Regards,
Thorsten


Am Dienstag, 12. November 2013 22:29:16 UTC+1 schrieb Thomas Letsch:
response.xml

sm5...@gmail.com

unread,
Nov 28, 2013, 2:08:57 AM11/28/13
to ope...@googlegroups.com, thorsten...@gmail.com
 Thorsten,

 I never found that. The interesting thing is now to check CCU1 if that also have the degree character. With CCU1 we don't get the error. I will try to do that tonight.

 When analyzing your xml-file it is not in UTF-8 format, instead it is in Latin-1 (ISO/IEC 8859-1). The degree sign in true UTF-8 format should be 2 bytes (C2 B0) but it is in the file only a single byte Latin-1 format (B0).

 Regards
 Roger

thorsten...@gmail.com

unread,
Nov 28, 2013, 2:47:20 AM11/28/13
to ope...@googlegroups.com, thorsten...@gmail.com
Hello Roger,

yes I think it is just an encoding issue: the CCU2's response lacks the encoding in the header (should be <?xml version="1.0" encoding="ISO-8859-1"> I think). I noticed that the exception also happens occasionally on other method calls too.

I'll have a look whether there is a way to tell the underlying Xerces to treat the messages as ISO-8859-1 by default.

Regards
Thorsten

Thomas Letsch

unread,
Nov 28, 2013, 3:50:48 PM11/28/13
to ope...@googlegroups.com, thorsten...@gmail.com
Hi Roger / Thorsten,

thats it! 
I am doing last tests, but the wrong UTF8 char error is solved. I pushed it already to my clone and just wait now for the local compile to go through to create a pull request for OpenHAB.

Thanks for the hint with the wrong decoding!  Cool stuff, I didn't recognize that...

R:,
Thomas

sm5...@gmail.com

unread,
Nov 29, 2013, 3:23:34 AM11/29/13
to ope...@googlegroups.com, thorsten...@gmail.com
 Thanks Thomas,

 I look forward to test.

 Regards
 Roger

thorsten...@gmail.com

unread,
Dec 4, 2013, 3:11:07 AM12/4/13
to ope...@googlegroups.com, thorsten...@gmail.com
Hello Thomas,

I can confirm that your fix is doing fine. Thx.

dong...@gmail.com

unread,
Dec 19, 2013, 3:37:05 AM12/19/13
to ope...@googlegroups.com
Not sure if I have the same problem with a wrong character in the XML response but somehow after updating to the latest snapshot build (1.4 yesterday) I get the error "org.apache.xmlrpc.XmlRpcException: Failed to read server's response: Connection refused" every time I try to trigger for example a light switch.
I attached the relevant openhab.log where you can see this error with the full exception. The strange thing is that I get now also this error if I try to use the current 1.3.1 release (the only thing I did was restarting the CCU after a very long time).
I also tried to use the latest firmware and XMLAPI patch but that also did not the trick. 
I'm using firmware 1.512 on the CCU and version 1.10 of theXMLAPI Patch.

Any tipps, ideas are welcome!
openhab.log

dong...@umc-project.de

unread,
Dec 19, 2013, 4:06:41 AM12/19/13
to ope...@googlegroups.com
openhab.log
Reply all
Reply to author
Forward
0 new messages