After successful setup of my AC with the Meldcloud-binding, I am facing an error after upgrading the system to openHAB 4.
I already tried to clear the cache, reboot, but nothing changed.
This is the error thrown to the log:
java.lang.NullPointerException: Cannot invoke "org.openhab.binding.melcloud.internal.api.MelCloudConnection.isConnected()" because "this.connection" is null
at org.openhab.binding.melcloud.internal.handler.MelCloudAccountHandler.isConnected(MelCloudAccountHandler.java:127) ~[?:?]
at org.openhab.binding.melcloud.internal.handler.MelCloudAccountHandler.connectIfNotConnected(MelCloudAccountHandler.java:121) ~[?:?]
at org.openhab.binding.melcloud.internal.handler.MelCloudAccountHandler.getDeviceList(MelCloudAccountHandler.java:96) ~[?:?]
at org.openhab.binding.melcloud.internal.discovery.MelCloudDiscoveryService.discoverDevices(MelCloudDiscoveryService.java:89) ~[?:?]
at org.openhab.binding.melcloud.internal.discovery.MelCloudDiscoveryService.startBackgroundDiscovery(MelCloudDiscoveryService.java:65) ~[?:?]
at org.openhab.core.config.discovery.AbstractThingHandlerDiscoveryService.initialize(AbstractThingHandlerDiscoveryService.java:119) ~[?:?]
at org.openhab.core.thing.binding.BaseThingHandlerFactory$RegisteredThingHandlerService.initializeService(BaseThingHandlerFactory.java:395) ~[?:?]
at org.openhab.core.thing.binding.BaseThingHandlerFactory.registerThingHandlerService(BaseThingHandlerFactory.java:208) ~[?:?]
at org.openhab.core.thing.binding.BaseThingHandlerFactory.registerServices(BaseThingHandlerFactory.java:160) ~[?:?]
at org.openhab.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:147) ~[?:?]
at org.openhab.core.thing.internal.ThingManagerImpl.doRegisterHandler(ThingManagerImpl.java:531) ~[?:?]
at org.openhab.core.thing.internal.ThingManagerImpl.registerHandler(ThingManagerImpl.java:512) ~[?:?]
at org.openhab.core.thing.internal.ThingManagerImpl.registerAndInitializeHandler(ThingManagerImpl.java:927) ~[?:?]
at org.openhab.core.thing.internal.ThingManagerImpl.thingUpdated(ThingManagerImpl.java:475) ~[?:?]
at org.openhab.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:234) ~[?:?]
at org.openhab.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:145) ~[?:?]
at org.openhab.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:1) ~[?:?]
at org.openhab.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:325) ~[?:?]
at org.openhab.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:1) ~[?:?]
at org.openhab.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:66) ~[?:?]
at org.openhab.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:91) ~[?:?]
at org.openhab.core.model.thing.internal.GenericThingProvider.lambda$25(GenericThingProvider.java:940) ~[?:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at org.openhab.core.model.thing.internal.GenericThingProvider.createThingsFromModelForThingHandlerFactory(GenericThingProvider.java:948) ~[?:?]
at org.openhab.core.model.thing.internal.GenericThingProvider.lambda$4(GenericThingProvider.java:308) ~[?:?]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at org.openhab.core.model.thing.internal.GenericThingProvider.createThingsFromModel(GenericThingProvider.java:310) ~[?:?]
at org.openhab.core.model.thing.internal.GenericThingProvider.modelChanged(GenericThingProvider.java:757) ~[?:?]
at org.openhab.core.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:298) ~[?:?]
at org.openhab.core.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:138) ~[?:?]
at org.openhab.core.model.core.internal.folder.FolderObserver.checkPath(FolderObserver.java:255) ~[?:?]
at org.openhab.core.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:314) ~[?:?]
at org.openhab.core.internal.service.WatchServiceImpl$Listener.notify(WatchServiceImpl.java:293) ~[?:?]
at org.openhab.core.internal.service.WatchServiceImpl.lambda$6(WatchServiceImpl.java:278) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
at org.openhab.core.internal.service.WatchServiceImpl.doNotify(WatchServiceImpl.java:278) ~[?:?]
at org.openhab.core.internal.service.WatchServiceImpl.notifyListeners(WatchServiceImpl.java:271) ~[?:?]
at org.openhab.core.internal.service.WatchServiceImpl.lambda$4(WatchServiceImpl.java:232) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:840) [?:?]
I checked the status of the AC in melcloud.com and can confirm its functional.
I am using a config via textfiles (I anonymized username, password and deviceID) with the following data that worked fine under OH3:
Bridge melcloud:melcloudaccount:myaccount "My MELCloud account" [ username="hhhhhhh", password="fffffffff", language="4" ] {
Thing acdevice ac_living "Innengerät" [ deviceID="22222222", pollingInterval=360 ]
}
and the items (although this doesn’t seem to be the problem):
Group HeatpumpInside "Wärmepumpe"
Switch HeatpumpInsidePower "Betrieb [MAP(on.map):%s]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:power" }
String HeatpumpInsideOperationMode "Modus [%s]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:operationMode" }
Number:Temperature HeatpumpInsideSetTemperature "Zieltemp. [%.1f°C]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:setTemperature" }
String HeatpumpInsideFanSpeed "Lüfter [%s]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:fanSpeed" }
String HeatpumpInsideVaneHorizontal "Horizontal [%s]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:vaneHorizontal" }
String HeatpumpInsideVaneVertical "Vertikal [%s]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:vaneVertical" }
Number:Temperature HeatpumpInsideRoomTemperature "Raumtemp. [%.1f°C]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:roomTemperature" }
DateTime HeatpumpInsideLastCommunication "Letzte Kom. [%1$tR, %1$tb %1$td]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:lastCommunication" }
DateTime HeatpumpInsideNextCommunication "Nächste Kom. [%1$tR, %1$tb %1$td]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:nextCommunication" }
Switch HeatpumpInsideOnline "Online [MAP(ja.map):%s]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:offline" }
Switch HeatpumpInsideHasPendingCommand "Ausstehende Befehle [MAP(ja.map):%s]" (HeatpumpInside) { channel="melcloud:acdevice:myaccount:ac_living:hasPendingCommand" }
Has someone any recommendations how to solve the problem?