tronghuyict56 / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

ClassCastException for window contacts in Homematic Binding #275

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, I tried to integrate my window shutter contact sensors like this

Contact         lrWdwRight      "Window Right"                  <window>        
(gLivingRoom, gLocking)         {homematic="IEQ0203214:1#STATE"}

and received this debug output from openhab:

13:02:18.335 DEBUG o.o.b.h.i.bus.HomematicBinding[:341] - Received new value 2 
for device at IEQ0203214:1#STATE
13:02:18.339 ERROR o.a.x.server.XmlRpcErrorLogger[:36] - Failed to invoke 
method event in class 
org.openhab.binding.homematic.internal.xmlrpc.callback.CallbackHandler: 
java.lang.Integer cannot be cast to java.lang.Boolean
org.apache.xmlrpc.common.XmlRpcInvocationException: Failed to invoke method 
event in class 
org.openhab.binding.homematic.internal.xmlrpc.callback.CallbackHandler: 
java.lang.Integer cannot be cast to java.lang.Boolean
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:129)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
        at org.openhab.binding.homematic.internal.xmlrpc.callback.SystemHandler.multicall(SystemHandler.java:108)
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
        at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:46)
        at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86)
        at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200)
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
java.lang.Boolean
        at org.openhab.binding.homematic.internal.converter.BooleanOpenCloseConverter.convertToImpl(BooleanOpenCloseConverter.java:1)
        at org.openhab.binding.homematic.internal.converter.StateConverter.convertTo(StateConverter.java:85)
        at org.openhab.binding.homematic.internal.bus.HomematicBinding.event(HomematicBinding.java:349)
        at org.openhab.binding.homematic.internal.xmlrpc.callback.CallbackHandler.event(CallbackHandler.java:75)
        at org.openhab.binding.homematic.internal.xmlrpc.callback.CallbackHandler.event(CallbackHandler.java:142)
        at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
        at org.openhab.binding.homematic.internal.xmlrpc.callback.SystemHandler.multicall(SystemHandler.java:108)
13:02:19.393 DEBUG o.o.b.h.i.x.c.CallbackServer[:141] - called event (Integer) 
=> dispatching to event (Object)
13:02:19.394 DEBUG o.o.b.h.i.x.c.CallbackServer[:73] - dispatching event to 2 
receivers
13:02:19.394 DEBUG o.o.b.h.i.bus.HomematicBinding[:341] - Received new value 1 
for device at IEQ0203214:1#STATE
13:02:19.397 ERROR o.a.x.server.XmlRpcErrorLogger[:36] - Failed to invoke 
method event in class 
org.openhab.binding.homematic.internal.xmlrpc.callback.CallbackHandler: 
java.lang.Integer cannot be cast to java.lang.Boolean
org.apache.xmlrpc.common.XmlRpcInvocationException: Failed to invoke method 
event in class 
org.openhab.binding.homematic.internal.xmlrpc.callback.CallbackHandler: 
java.lang.Integer cannot be cast to java.lang.Boolean
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:129)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
        at org.openhab.binding.homematic.internal.xmlrpc.callback.SystemHandler.multicall(SystemHandler.java:108)
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
        at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:46)
        at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86)
        at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200)
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
java.lang.Boolean
        at org.openhab.binding.homematic.internal.converter.BooleanOpenCloseConverter.convertToImpl(BooleanOpenCloseConverter.java:1)
        at org.openhab.binding.homematic.internal.converter.StateConverter.convertTo(StateConverter.java:85)
        at org.openhab.binding.homematic.internal.bus.HomematicBinding.event(HomematicBinding.java:349)
        at org.openhab.binding.homematic.internal.xmlrpc.callback.CallbackHandler.event(CallbackHandler.java:75)
        at org.openhab.binding.homematic.internal.xmlrpc.callback.CallbackHandler.event(CallbackHandler.java:142)
        at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115)
        at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
        at org.openhab.binding.homematic.internal.xmlrpc.callback.SystemHandler.multicall(SystemHandler.java:108)

cheers
Mathias

Original issue reported on code.google.com by mathias....@googlemail.com on 5 May 2013 at 11:06

GoogleCodeExporter commented 8 years ago
Don't you mean Homematic binding?

Original comment by kai.openhab on 5 May 2013 at 11:07

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 8 May 2013 at 9:55

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 8 May 2013 at 9:57

GoogleCodeExporter commented 8 years ago

Original comment by teichsta on 13 Aug 2013 at 4:02

GoogleCodeExporter commented 8 years ago
Thomas, will you be able to deliver a fix for this by tomorrow?

Original comment by kai.openhab on 6 Sep 2013 at 12:38

GoogleCodeExporter commented 8 years ago
Looks like this was already discussed at 
https://groups.google.com/forum/#!topic/openhab/Qkji3J6Rr7s ?

Original comment by thomas.letsch.de on 7 Sep 2013 at 1:46

GoogleCodeExporter commented 8 years ago
Hab noch etwas Analyse betrieben:
Ich vermute es geht hier um ein HM-Sec-RHS. Der lässt sich in der Tat momentan 
nur auf ein NumberItem mappen. Ich sehe aber auch ein, dass ein Mapping auf ein 
ContactItem sehr sinnvoll wäre. 
Mit der neuen XML basierten Konfiguration für Devices geht das sogar :-)

@Mathias: Liege ich richtig, dass es ein HM-Sec-RHS ist?

Original comment by thomas.letsch.de on 7 Sep 2013 at 6:25

GoogleCodeExporter commented 8 years ago
Very likely to be an HM-Sec-RHS, yes. Is this fixed for 1.3 or not?

Original comment by kai.openhab on 8 Sep 2013 at 9:46

GoogleCodeExporter commented 8 years ago
Yes, please pull the latest version from my repo at 
https://code.google.com/r/thomasletschde-openhab/

Original comment by thomas.letsch.de on 8 Sep 2013 at 9:58

GoogleCodeExporter commented 8 years ago
Thanks. Question: Did you do this change on purpose:
https://code.google.com/r/thomasletschde-openhab/source/diff?spec=svna84c923436e
06692784404c1704e236f0c0ad00b&r=a84c923436e06692784404c1704e236f0c0ad00b&format=
side&path=/bundles/binding/org.openhab.binding.homematic/src/main/java/org/openh
ab/binding/homematic/internal/config/HomematicGenericBindingProvider.java

This was a fix that I had committed recently that you have now reverted again.

Original comment by kai.openhab on 8 Sep 2013 at 10:02

GoogleCodeExporter commented 8 years ago
Damn, no. I somehow lost my local changes on my last pull from the original OH 
repo. So I had to restore them from local history. That was too far in the 
history. I fix it.

Original comment by thomas.letsch.de on 8 Sep 2013 at 10:04

GoogleCodeExporter commented 8 years ago
Thanks, I have pushed your changes to the main repo.

Original comment by kai.openhab on 8 Sep 2013 at 12:42