MAX! binding not working anymore

Hi,
some weeks ago i configured a openhab2 (2.0 beta4) environment with the use of the MAX! binding on a Raspberry Pi. Everything was running fine. Now i have some time to work again on my home automation. But i had to realize that the MAX! binding isn’t working anymore. In the “Things Overview” only the MAX! Cube is marked with “online” but all other “Things” like “Wallmounted Thermostat” or normal “Thermostat” are marked as “UNINITIALIZED - HANDLER_INITIALIZING_ERROR” and i got no values on the channels.

But in the karaf console i got the following messages:

13:25:45.223 [DEBUG] [nternal.handler.MaxCubeBridgeHandler] - Sending request #369 to MAX! Cube
13:25:45.305 [DEBUG] [b.binding.max.internal.device.Device] - Device 0f8034 (Thermostat+): Actual Temperature : 0.0
13:25:45.320 [DEBUG] [b.binding.max.internal.device.Device] - Device 1592a2 (Wallmounted Thermostat): Actual Temperature : 20.9
13:25:45.336 [DEBUG] [b.binding.max.internal.device.Device] - Device 0f7af7 (Thermostat+): Actual Temperature : 0.0
13:25:45.352 [DEBUG] [b.binding.max.internal.device.Device] - Device 0f806b (Thermostat+): Actual Temperature : 0.0
13:25:45.367 [DEBUG] [b.binding.max.internal.device.Device] - Device 11c528 (Thermostat+): Actual Temperature : 0.0
13:25:45.382 [DEBUG] [b.binding.max.internal.device.Device] - Device 11c52b (Thermostat+): Actual Temperature : 0.0
13:25:45.398 [DEBUG] [b.binding.max.internal.device.Device] - Device 0f7b01 (Thermostat+): Actual Temperature : 0.0
13:25:45.413 [DEBUG] [b.binding.max.internal.device.Device] - Device 09af27 (Wallmounted Thermostat): Actual Temperature : 14.8

If i remove all the “Things” and let them discover again, i got the following error message in the log output, if i try add a newly discovered MAX! “Thing”:

10:22:31.943 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'max:wallthermostat:MEQ0375507:NEQ0906289': java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_112]
	at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_112]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:186)[98:org.eclipse.smarthome.core:0.9.0.201610101820]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:79)[98:org.eclipse.smarthome.core:0.9.0.201610101820]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:63)[98:org.eclipse.smarthome.core:0.9.0.201610101820]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$9.run(ThingManager.java:755)[105:org.eclipse.smarthome.core.thing:0.9.0.201610101820]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_112]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_112]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_112]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_112]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_112]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_112]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
Caused by: java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;
	at org.openhab.binding.max.internal.handler.MaxDevicesHandler.getMaxCubeBridgeHandler(MaxDevicesHandler.java:330)
	at org.openhab.binding.max.internal.handler.MaxDevicesHandler.initialize(MaxDevicesHandler.java:117)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:758)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_112]
	... 3 more

I have removed the MAX! binding and performed a new install but the error still exists. Any hint hats wrong with my setup now?

Thanks,

Lars

Lars,
Think this has to do with recent changes in the smarthome framework wrt to initializing.
I’ll update my environment to see if I can replicate this issue.

Hi Marcel,
Thanks for your replay! Today I tried to use my RFXCOM with openhab but the binding shows the same behaviour like the MAX! binding! The RFXCOM device was discovered successfully and the RFXCOM “Thing” is “online” also all my senders are shown in the inbox. But if I try to add one of them into the “Things” list, i got:

2016-11-27 18:26:56.378 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'rfxcom:temperaturehumidity:usb0:30465': java.lang.NoSuchMethodError: org.eclipse.sm
arthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;                                                                                                                     
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;                                 
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_112]                                                                                                                                 
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_112]                                                                                                                                    
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:186)[98:org.eclipse.smarthome.core:0.9.0.201610101820]                                                        
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:79)[98:org.eclipse.smarthome.core:0.9.0.201610101820]                                                                     
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:63)[98:org.eclipse.smarthome.core:0.9.0.201610101820]                                                                     
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9.run(ThingManager.java:755)[105:org.eclipse.smarthome.core.thing:0.9.0.201610101820]                                                            
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_112]                                                                                                                     
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_112]                                                                                                                                    
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_112]                                                                       
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_112]                                                                              
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_112]                                                                                                             
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_112]                                                                                                             
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]                                                                                                                                                       
Caused by: java.lang.NoSuchMethodError: org.eclipse.smarthome.core.thing.Bridge.getHandler()Lorg/eclipse/smarthome/core/thing/binding/BridgeHandler;                                                               
        at org.openhab.binding.rfxcom.handler.RFXComHandler.initialize(RFXComHandler.java:110)                                                                                                                     
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:758)                                                                                                                  
        at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)                                                                                                                    
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)                                                                                                      
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_112]                                                                                                                                    
        ... 3 more

And the freshly added “Thing” is marked as “UNINITIALIZED - HANDLER_INITIALIZING_ERROR”.

Indeed this is probably due to the change in the framework. Several bindings suffered
However, there was also an update implemented that should have avoided this issue, however in case of MAX! binding a little too much was deleted.

Are you sure you have the latest version of the binding running, as an older version of the binding + latest framework will not work.

Anyway, I submitted a fix for this. Expect it will be merged shortly.

It is in now. If you un-install the binding & install again, it should pick up the latest version.

(you can check it by typing into the console bundle:list than the current date should be in the max version
e.g. somehting like 195 | Active | 80 | 2.0.0.201611281907 | MaxCube Binding where the date should not be before 20161128

Hi Marcel,
after the update it’s working again! Many thanks for your help!