Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Air Purufuer error and dump #79

Open
sbr2004 opened this issue Apr 24, 2023 · 44 comments
Open

Air Purufuer error and dump #79

sbr2004 opened this issue Apr 24, 2023 · 44 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@sbr2004
Copy link

sbr2004 commented Apr 24, 2023

I get the following error while starting mqtt client:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hassMotionSensorDeviceEventHandler' defined in URL [jar:file:/home/sbernard/work/DirigeraClient/dirigera-client-mqtt.jar!/BOOT-INF/classes!/de/dvdgeisler/iot/dirigera/client/mqtt/hass/HassMotionSensorDeviceEventHandler.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.dvdgeisler.iot.dirigera.client.mqtt.hass.HassMotionSensorDeviceEventHandler]: Constructor threw exception; nested exception is org.springframework.core.codec.CodecException: Type definition error: [simple type, class de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 4699] (through reference chain: java.util.ArrayList[3]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierDevice["attributes"])

Below is crop from dump:

{
"id" : "e19c9cde-54aa-4dbd-a354-d3034eab384b_1",
"type" : "airPurifier",
"deviceType" : "airPurifier",
"createdAt" : "2022-12-02T16:03:02.000Z",
"isReachable" : true,
"lastSeen" : "2023-04-24T14:30:44.000Z",
"attributes" : {
"customName" : "Air purifier 1",
"model" : "STARKVIND Air purifier",
"manufacturer" : "IKEA of Sweden",
"firmwareVersion" : "1.1.001",
"hardwareVersion" : "1",
"serialNumber" : "2C1165FFFE18F406",
"productCode" : "E2007",
"fanMode" : "low",
"fanModeSequence" : "lowMediumHighAuto",
"motorState" : 25,
"motorRuntime" : 201495,
"filterElapsedTime" : 205983,
"filterAlarmStatus" : false,
"filterLifetime" : 259200,
"childLock" : false,
"statusLight" : true,
"currentPM25" : 9,
"identifyStarted" : "2000-01-01T00:00:00.000Z",
"identifyPeriod" : 0,
"permittingJoin" : false,
"otaStatus" : "upToDate",
"otaState" : "readyToCheck",
"otaProgress" : 0,
"otaPolicy" : "autoUpdate",
"otaScheduleStart" : "00:00",
"otaScheduleEnd" : "00:00"
},
"capabilities" : {
"canSend" : [ ],
"canReceive" : [ "customName", "fanMode", "fanModeSequence", "motorState", "childLock", "statusLight" ]
},

@TheMrBooyah
Copy link
Collaborator

It seems like the MQTT handler for HASS is trying to initiate your airpurifier as a motion sensor.
The airpurifier itself isn't yet in the HASS code, I'll see if I can add it

@TheMrBooyah TheMrBooyah added bug Something isn't working enhancement New feature or request labels May 7, 2023
@sbr2004
Copy link
Author

sbr2004 commented May 10, 2023

Is it possible to ignore air purifier at all as a temporary workaround?

@TheMrBooyah
Copy link
Collaborator

To be fair we could take out the motion sensor completely. It's not yet working for an unknown reason. That might solve your issue

@sbr2004
Copy link
Author

sbr2004 commented May 10, 2023

Yes, better to ignore non-working devices/functions anyway.

@TheMrBooyah
Copy link
Collaborator

Removed the motion sensor. Try it out (Hass addon has been updated to 2023.5.1)

@sbr2004
Copy link
Author

sbr2004 commented May 10, 2023

Still same error. Full crop below.

2023-05-10 14:41:38.125 INFO 3138309 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : Starting DirigeraClientMqttApplication v0.0.1-SNAPSHOT using Java 17.0.6 on puppy with PID 3138309 (/home/sbernard/work/DirigeraClient/dirigera-client-mqtt.jar started by sbernard in /home/sbernard/work/DirigeraClient)
2023-05-10 14:41:38.144 DEBUG 3138309 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : Running with Spring Boot v2.7.5, Spring v5.3.23
2023-05-10 14:41:38.148 INFO 3138309 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : No active profile set, falling back to 1 default profile: "default"
2023-05-10 14:41:42.877 INFO 3138309 --- [ main] d.d.i.d.client.api.http.TokenStore : Load access token
2023-05-10 14:41:45.490 INFO 3138309 --- [ main] d.d.i.d.client.api.http.ClientOAuthApi : Dirigera client name: puppy
2023-05-10 14:41:45.656 INFO 3138309 --- [oundedElastic-1] d.d.i.dirigera.client.api.WebSocketApi : Start event handler thread: id=20, name=boundedElastic-1
2023-05-10 14:41:47.828 INFO 3138309 --- [oundedElastic-2] d.d.i.d.client.api.http.ClientApi : Start ping thread: id=30, name=boundedElastic-2
2023-05-10 14:41:48.557 INFO 3138309 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : Connect to MQTT broker: host=10.9.8.22, port=1883, publisherId=d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1, reconnect=true, timeout=0, useSsl=false
2023-05-10 14:41:48.917 INFO 3138309 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : Connection to MQTT broker successfully established
2023-05-10 14:41:48.933 INFO 3138309 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe HassBlindsDeviceEventHandler to Dirigera websocket: event=DeviceEvent
2023-05-10 14:41:49.751 ERROR 3138309 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hassBlindsDeviceEventHandler' defined in URL [jar:file:/home/sbernard/work/DirigeraClient/dirigera-client-mqtt.jar!/BOOT-INF/classes!/de/dvdgeisler/iot/dirigera/client/mqtt/hass/HassBlindsDeviceEventHandler.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.dvdgeisler.iot.dirigera.client.mqtt.hass.HassBlindsDeviceEventHandler]: Constructor threw exception; nested exception is org.springframework.core.codec.CodecException: Type definition error: [simple type, class de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 4717] (through reference chain: java.util.ArrayList[3]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierDevice["attributes"])
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:296) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.23.jar!/:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.23.jar!/:5.3.23]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.5.jar!/:2.7.5]
at de.dvdgeisler.iot.dirigera.client.mqtt.DirigeraClientMqttApplication.main(DirigeraClientMqttApplication.java:98) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.dvdgeisler.iot.dirigera.client.mqtt.hass.HassBlindsDeviceEventHandler]: Constructor threw exception; nested exception is org.springframework.core.codec.CodecException: Type definition error: [simple type, class de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 4717] (through reference chain: java.util.ArrayList[3]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierDevice["attributes"])
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:311) ~[spring-beans-5.3.23.jar!/:5.3.23]
... 26 common frames omitted
Caused by: org.springframework.core.codec.CodecException: Type definition error: [simple type, class de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 4717] (through reference chain: java.util.ArrayList[3]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierDevice["attributes"])
at org.springframework.http.codec.json.AbstractJackson2Decoder.processException(AbstractJackson2Decoder.java:238) ~[spring-web-5.3.23.jar!/:5.3.23]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*__checkpoint ⇢ Body from GET https://10.9.8.109:8443/v1/devices/ [DefaultClientResponse]
Original Stack Trace:
at org.springframework.http.codec.json.AbstractJackson2Decoder.processException(AbstractJackson2Decoder.java:238) ~[spring-web-5.3.23.jar!/:5.3.23]
at org.springframework.http.codec.json.AbstractJackson2Decoder.decode(AbstractJackson2Decoder.java:198) ~[spring-web-5.3.23.jar!/:5.3.23]
at org.springframework.http.codec.json.AbstractJackson2Decoder.lambda$decodeToMono$1(AbstractJackson2Decoder.java:179) ~[spring-web-5.3.23.jar!/:5.3.23]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:125) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onNext(FluxMapFuseable.java:299) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onNext(FluxFilterFuseable.java:337) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:160) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:400) ~[reactor-netty-core-1.0.24.jar!/:1.0.24]
at reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:419) ~[reactor-netty-core-1.0.24.jar!/:1.0.24]
at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:473) ~[reactor-netty-core-1.0.24.jar!/:1.0.24]
at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:702) ~[reactor-netty-http-1.0.24.jar!/:1.0.24]
at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:113) ~[reactor-netty-core-1.0.24.jar!/:1.0.24]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1373) ~[netty-handler-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1236) ~[netty-handler-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285) ~[netty-handler-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:519) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:458) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:280) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[netty-transport-classes-epoll-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:499) ~[netty-transport-classes-epoll-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:397) ~[netty-transport-classes-epoll-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.84.Final.jar!/:4.1.84.Final]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Suppressed: java.lang.Exception: #block terminated with an error
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:99) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.Mono.block(Mono.java:1707) ~[reactor-core-3.4.24.jar!/:3.4.24]
at de.dvdgeisler.iot.dirigera.client.mqtt.hass.HassBlindsDeviceEventHandler.(HassBlindsDeviceEventHandler.java:36) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[na:na]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:211) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:311) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:296) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.23.jar!/:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.23.jar!/:5.3.23]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.5.jar!/:2.7.5]
at de.dvdgeisler.iot.dirigera.client.mqtt.DirigeraClientMqttApplication.main(DirigeraClientMqttApplication.java:98) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 4717] (through reference chain: java.util.ArrayList[3]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierDevice["attributes"])
at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1904) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.DatabindContext.reportBadDefinition(DatabindContext.java:400) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1349) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1415) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:352) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:185) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.impl.UnwrappedPropertyHandler.processUnwrapped(UnwrappedPropertyHandler.java:62) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeWithUnwrapped(BeanDeserializer.java:759) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:347) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:185) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeWithUnwrapped(BeanDeserializer.java:727) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:347) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:220) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:187) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:144) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:110) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeWithType(BeanDeserializerBase.java:1292) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:357) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:2051) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1427) ~[jackson-databind-2.13.4.2.jar!/:2.13.4.2]
at org.springframework.http.codec.json.AbstractJackson2Decoder.decode(AbstractJackson2Decoder.java:193) ~[spring-web-5.3.23.jar!/:5.3.23]
at org.springframework.http.codec.json.AbstractJackson2Decoder.lambda$decodeToMono$1(AbstractJackson2Decoder.java:179) ~[spring-web-5.3.23.jar!/:5.3.23]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:125) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onNext(FluxMapFuseable.java:299) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onNext(FluxFilterFuseable.java:337) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:160) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) ~[reactor-core-3.4.24.jar!/:3.4.24]
at reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:400) ~[reactor-netty-core-1.0.24.jar!/:1.0.24]
at reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:419) ~[reactor-netty-core-1.0.24.jar!/:1.0.24]
at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:473) ~[reactor-netty-core-1.0.24.jar!/:1.0.24]
at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:702) ~[reactor-netty-http-1.0.24.jar!/:1.0.24]
at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:113) ~[reactor-netty-core-1.0.24.jar!/:1.0.24]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:336) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1373) ~[netty-handler-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1236) ~[netty-handler-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285) ~[netty-handler-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:519) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:458) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:280) ~[netty-codec-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[netty-transport-classes-epoll-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:499) ~[netty-transport-classes-epoll-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:397) ~[netty-transport-classes-epoll-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.84.Final.jar!/:4.1.84.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.84.Final.jar!/:4.1.84.Final]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

2023-05-10 14:41:58.156 DEBUG 3138309 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=LAST_MODIFIED, id=089579d8-e241-411c-b177-2484d263979d, source=hub, time=2023-05-10T11:41:58.120
2023-05-10 14:42:08.129 DEBUG 3138309 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=LAST_MODIFIED, id=98d083af-4cd3-4bac-8e25-8a267036eb1d, source=hub, time=2023-05-10T11:42:08.125
2023-05-10 14:42:18.134 DEBUG 3138309 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=LAST_MODIFIED, id=dd669d11-ab3d-43b6-8081-38556464aeed, source=hub, time=2023-05-10T11:42:18.130

TheMrBooyah pushed a commit that referenced this issue May 10, 2023
TheMrBooyah added a commit that referenced this issue May 10, 2023
@TheMrBooyah
Copy link
Collaborator

TheMrBooyah commented May 10, 2023

I guess trying to add a rudimentary air purifier to HASS might solve the issue. Version 2023.5.2 is building. Fingers crossed that solves the issue

Version 2023.5.2 is available

@sbr2004
Copy link
Author

sbr2004 commented May 10, 2023

Seems still same error.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hassOutletDeviceEventHandler' defined in URL [jar:file:/home/sbernard/work/DirigeraClient/dirigera-client-mqtt.jar!/BOOT-INF/classes!/de/dvdgeisler/iot/dirigera/client/mqtt/hass/HassOutletDeviceEventHandler.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.dvdgeisler.iot.dirigera.client.mqtt.hass.HassOutletDeviceEventHandler]: Constructor threw exception; nested exception is org.springframework.core.codec.CodecException: Type definition error: [simple type, class de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 4717] (through reference chain: java.util.ArrayList[3]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierDevice["attributes"])
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:296) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.23.jar!/:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.23.jar!/:5.3.23]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.5.jar!/:2.7.5]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.5.jar!/:2.7.5]
at de.dvdgeisler.iot.dirigera.client.mqtt.DirigeraClientMqttApplication.main(DirigeraClientMqttApplication.java:98) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[dirigera-client-mqtt.jar:0.0.1-SNAPSHOT]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.dvdgeisler.iot.dirigera.client.mqtt.hass.HassOutletDeviceEventHandler]: Constructor threw exception; nested exception is org.springframework.core.codec.CodecException: Type definition error: [simple type, class de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFilterAttributes (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 4717] (through reference chain: java.util.ArrayList[3]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierDevice["attributes"])
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans-5.3.23.jar!/:5.3.23]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:311) ~[spring-beans-5.3.23.jar!/:5.3.23]
... 26 common frames omitted

@TheMrBooyah
Copy link
Collaborator

Guess I need to start analysing why the f this happens

@sbr2004
Copy link
Author

sbr2004 commented May 10, 2023

Seems I was able to get it running. I'm too newb to publish patches, but here what I did:

  1. AirPurifierFilterAttributes.java
    add public AirPurifierFilterAttributes() {
}

  2. AirPurifierFanMode.java
    add @JsonProperty("low")
LOW

@sbr2004
Copy link
Author

sbr2004 commented May 10, 2023

2023-05-10 22:39:07.848 INFO 7668 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : Starting DirigeraClientMqttApplication using Java 17.0.7 on BOXW with PID 7668 (C:\work\DirigeraClient\dirigera-client-mqtt\target\classes started by sbr20 in C:\work\DirigeraClient)
2023-05-10 22:39:07.851 DEBUG 7668 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : Running with Spring Boot v2.7.5, Spring v5.3.23
2023-05-10 22:39:07.851 INFO 7668 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : No active profile set, falling back to 1 default profile: "default"
2023-05-10 22:39:08.679 INFO 7668 --- [ main] d.d.i.d.client.api.http.TokenStore : Load access token
2023-05-10 22:39:09.088 INFO 7668 --- [ main] d.d.i.d.client.api.http.ClientOAuthApi : Dirigera client name: BOXW
2023-05-10 22:39:09.124 INFO 7668 --- [oundedElastic-1] d.d.i.dirigera.client.api.WebSocketApi : Start event handler thread: id=32, name=boundedElastic-1
2023-05-10 22:39:09.936 INFO 7668 --- [oundedElastic-2] d.d.i.d.client.api.http.ClientApi : Start ping thread: id=67, name=boundedElastic-2
2023-05-10 22:39:10.040 INFO 7668 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : Connect to MQTT broker: host=10.9.8.22, port=1883, publisherId=d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1, reconnect=true, timeout=0, useSsl=false
2023-05-10 22:39:10.352 INFO 7668 --- [ main] .d.i.d.c.m.DirigeraClientMqttApplication : Connection to MQTT broker successfully established
2023-05-10 22:39:10.354 INFO 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe HassAirPurifierEventHandler to Dirigera websocket: event=DeviceEvent
2023-05-10 22:39:10.740 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/config, payload={"object_id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","unique_id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","name":"Air purifier 1","device":{"identifiers":["2C1165FFFE18F406"],"manufacturer":"IKEA of Sweden","model":"STARKVIND Air purifier","hw_version":"1","sw_version":"1.1.001","name":"Air purifier 1","via_device":"d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1"},"payload_off":""off"","payload_auto":""auto"","payload_manual":""manual"","command_topic":"homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/set","state_off":""off"","state_auto":""auto"","state_manual":""manual"","state_topic":"homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state","value_template":"{{value}}","availability":{"topic":"homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability","payload_available":""ONLINE"","payload_not_available":""OFFLINE""}}, qos=1, retained=true
2023-05-10 22:39:10.745 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe to MQTT topic: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/set, payload=AirPurifierFanMode
2023-05-10 22:39:10.747 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state, payload="low", qos=1, retained=true
2023-05-10 22:39:10.750 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-10 22:39:10.757 INFO 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe HassBlindsDeviceEventHandler to Dirigera websocket: event=DeviceEvent
2023-05-10 22:39:10.795 INFO 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe HassLightDeviceEventHandler to Dirigera websocket: event=DeviceEvent
2023-05-10 22:39:10.885 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/de204e68-23eb-40d4-b3ab-53b6defcfcce_1/config, payload={"object_id":"de204e68-23eb-40d4-b3ab-53b6defcfcce_1","unique_id":"de204e68-23eb-40d4-b3ab-53b6defcfcce_1","name":"TRADFRI bulb GU10 CWS 345lm","device":{"identifiers":["003C84FFFED4D009"],"manufacturer":"IKEA of Sweden","model":"TRADFRI bulb GU10 CWS 345lm","hw_version":"1","sw_version":"1.0.021","name":"TRADFRI bulb GU10 CWS 345lm","via_device":"d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1"},"brightness":true,"brightness_scale":100,"color_mode":true,"supported_color_modes":["hs","color_temp"],"command_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/de204e68-23eb-40d4-b3ab-53b6defcfcce_1/set","state_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/de204e68-23eb-40d4-b3ab-53b6defcfcce_1/state","schema":"json","max_mireds":454,"min_mireds":250,"availability":{"topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/de204e68-23eb-40d4-b3ab-53b6defcfcce_1/availability","payload_available":""ONLINE"","payload_not_available":""OFFLINE""}}, qos=1, retained=true
2023-05-10 22:39:10.888 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe to MQTT topic: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/de204e68-23eb-40d4-b3ab-53b6defcfcce_1/set, payload=LightStatus
2023-05-10 22:39:10.899 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/de204e68-23eb-40d4-b3ab-53b6defcfcce_1/state, payload={"state":"ON","brightness":71,"color_mode":"hs","color_temp":366,"color":{"h":29.999025,"s":64.14288}}, qos=1, retained=true
2023-05-10 22:39:10.902 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/de204e68-23eb-40d4-b3ab-53b6defcfcce_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-10 22:39:10.905 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1/config, payload={"object_id":"603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1","unique_id":"603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1","name":"Work overhead","device":{"identifiers":["84B4DBFFFE248813"],"manufacturer":"IKEA of Sweden","model":"TRADFRIbulbE27WSglobeopal1055lm","hw_version":"1","sw_version":"1.0.012","name":"Work overhead","via_device":"d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1"},"brightness":true,"brightness_scale":100,"color_mode":true,"supported_color_modes":["color_temp"],"command_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1/set","state_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1/state","schema":"json","max_mireds":454,"min_mireds":250,"availability":{"topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1/availability","payload_available":""ONLINE"","payload_not_available":""OFFLINE""}}, qos=1, retained=true
2023-05-10 22:39:10.907 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe to MQTT topic: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1/set, payload=LightStatus
2023-05-10 22:39:10.908 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1/state, payload={"state":"ON","brightness":81,"color_mode":"color_temp","color_temp":370,"color":{}}, qos=1, retained=true
2023-05-10 22:39:10.910 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/603c5156-1f4c-4c15-bc6f-0e9e6f4be47d_1/availability, payload="OFFLINE", qos=1, retained=true
2023-05-10 22:39:10.913 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1/config, payload={"object_id":"6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1","unique_id":"6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1","name":"TRADFRI bulb GU10 CWS 345lm","device":{"identifiers":["94DEB8FFFE9DBE08"],"manufacturer":"IKEA of Sweden","model":"TRADFRI bulb GU10 CWS 345lm","hw_version":"1","sw_version":"1.0.021","name":"TRADFRI bulb GU10 CWS 345lm","via_device":"d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1"},"brightness":true,"brightness_scale":100,"color_mode":true,"supported_color_modes":["hs","color_temp"],"command_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1/set","state_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1/state","schema":"json","max_mireds":454,"min_mireds":250,"availability":{"topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1/availability","payload_available":""ONLINE"","payload_not_available":""OFFLINE""}}, qos=1, retained=true
2023-05-10 22:39:10.915 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe to MQTT topic: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1/set, payload=LightStatus
2023-05-10 22:39:10.917 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1/state, payload={"state":"ON","brightness":67,"color_mode":"hs","color_temp":370,"color":{"h":29.999025,"s":64.14288}}, qos=1, retained=true
2023-05-10 22:39:10.919 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/6d0155ec-4f7b-48b8-9bf0-a8e8f0f2349e_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-10 22:39:10.922 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/64a4818d-998f-4b84-80f0-3348bfa39412_1/config, payload={"object_id":"64a4818d-998f-4b84-80f0-3348bfa39412_1","unique_id":"64a4818d-998f-4b84-80f0-3348bfa39412_1","name":"Stand","device":{"identifiers":["2C1165FFFEBC92CC"],"manufacturer":"IKEA of Sweden","model":"TRADFRI bulb E27 CWS 806lm","hw_version":"1","sw_version":"1.0.021","name":"Stand","via_device":"d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1"},"brightness":true,"brightness_scale":100,"color_mode":true,"supported_color_modes":["hs","color_temp"],"command_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/64a4818d-998f-4b84-80f0-3348bfa39412_1/set","state_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/64a4818d-998f-4b84-80f0-3348bfa39412_1/state","schema":"json","max_mireds":454,"min_mireds":250,"availability":{"topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/64a4818d-998f-4b84-80f0-3348bfa39412_1/availability","payload_available":""ONLINE"","payload_not_available":""OFFLINE""}}, qos=1, retained=true
2023-05-10 22:39:10.924 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe to MQTT topic: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/64a4818d-998f-4b84-80f0-3348bfa39412_1/set, payload=LightStatus
2023-05-10 22:39:10.925 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/64a4818d-998f-4b84-80f0-3348bfa39412_1/state, payload={"state":"ON","brightness":42,"color_mode":"hs","color_temp":370,"color":{"h":29.87873,"s":73.784386}}, qos=1, retained=true
2023-05-10 22:39:10.927 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/64a4818d-998f-4b84-80f0-3348bfa39412_1/availability, payload="OFFLINE", qos=1, retained=true
2023-05-10 22:39:10.930 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/d719b113-fe3d-44f3-9fe7-6525d706452c_1/config, payload={"object_id":"d719b113-fe3d-44f3-9fe7-6525d706452c_1","unique_id":"d719b113-fe3d-44f3-9fe7-6525d706452c_1","name":"TRADFRI bulb GU10 CWS 345lm","device":{"identifiers":["94DEB8FFFEE38C68"],"manufacturer":"IKEA of Sweden","model":"TRADFRI bulb GU10 CWS 345lm","hw_version":"1","sw_version":"1.0.021","name":"TRADFRI bulb GU10 CWS 345lm","via_device":"d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1"},"brightness":true,"brightness_scale":100,"color_mode":true,"supported_color_modes":["hs","color_temp"],"command_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/d719b113-fe3d-44f3-9fe7-6525d706452c_1/set","state_topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/d719b113-fe3d-44f3-9fe7-6525d706452c_1/state","schema":"json","max_mireds":454,"min_mireds":250,"availability":{"topic":"homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/d719b113-fe3d-44f3-9fe7-6525d706452c_1/availability","payload_available":""ONLINE"","payload_not_available":""OFFLINE""}}, qos=1, retained=true
2023-05-10 22:39:10.933 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Subscribe to MQTT topic: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/d719b113-fe3d-44f3-9fe7-6525d706452c_1/set, payload=LightStatus
2023-05-10 22:39:10.934 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/d719b113-fe3d-44f3-9fe7-6525d706452c_1/state, payload={"state":"ON","brightness":71,"color_mode":"hs","color_temp":370,"color":{"h":29.999025,"s":64.14288}}, qos=1, retained=true
2023-05-10 22:39:10.935 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/d719b113-fe3d-44f3-9fe7-6525d706452c_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-10 22:39:10.939 DEBUG 7668 --- [ main] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/4d713b5d-08e0-422d-8c16-f8341797a71d_1/c

@TheMrBooyah
Copy link
Collaborator

@sbr2004 I'll check it out and patch it asap. Thanks for pointing me into the right direction :)

TheMrBooyah pushed a commit that referenced this issue May 11, 2023
@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

Seems that possible fan modes (from air purifier dump) could be:

"fanModeSequence" : "lowMediumHighAuto",

@TheMrBooyah
Copy link
Collaborator

Just adjusted that in the code

@TheMrBooyah
Copy link
Collaborator

@sbr2004 Could you try out the latest development release when it's done to see if this fixes the issue. Since I don't have the air purifier myself to test

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

Did a dump of various AirPurifier modes:

OFF in IKEA APP:

"attributes" : {
  "customName" : "Air purifier 1",
  "model" : "STARKVIND Air purifier",
  "manufacturer" : "IKEA of Sweden",
  "firmwareVersion" : "1.1.001",
  "hardwareVersion" : "1",
  "serialNumber" : "2C1165FFFE18F406",
  "productCode" : "E2007",
  "fanMode" : "off",
  "fanModeSequence" : "lowMediumHighAuto",
  "motorState" : 0,
  "motorRuntime" : 217773,
  "filterElapsedTime" : 230293,
  "filterAlarmStatus" : false,
  "filterLifetime" : 259200,
  "childLock" : false,
  "statusLight" : true,
  "currentPM25" : 0,
  "identifyStarted" : "2000-01-01T00:00:00.000Z",
  "identifyPeriod" : 0,
  "permittingJoin" : false,
  "otaStatus" : "upToDate",
  "otaState" : "readyToCheck",
  "otaProgress" : 0,
  "otaPolicy" : "autoUpdate",
  "otaScheduleStart" : "00:00",
  "otaScheduleEnd" : "00:00"
},

AUTO in APP:

"attributes" : {
  "customName" : "Air purifier 1",
  "model" : "STARKVIND Air purifier",
  "manufacturer" : "IKEA of Sweden",
  "firmwareVersion" : "1.1.001",
  "hardwareVersion" : "1",
  "serialNumber" : "2C1165FFFE18F406",
  "productCode" : "E2007",
  "fanMode" : "auto",
  "fanModeSequence" : "lowMediumHighAuto",
  "motorState" : 30,
  "motorRuntime" : 217773,
  "filterElapsedTime" : 230293,
  "filterAlarmStatus" : false,
  "filterLifetime" : 259200,
  "childLock" : false,
  "statusLight" : true,
  "currentPM25" : 2,
  "identifyStarted" : "2000-01-01T00:00:00.000Z",
  "identifyPeriod" : 0,
  "permittingJoin" : false,
  "otaStatus" : "upToDate",
  "otaState" : "readyToCheck",
  "otaProgress" : 0,
  "otaPolicy" : "autoUpdate",
  "otaScheduleStart" : "00:00",
  "otaScheduleEnd" : "00:00"
},

MANUAL speed 1 in APP:

"attributes" : {
  "customName" : "Air purifier 1",
  "model" : "STARKVIND Air purifier",
  "manufacturer" : "IKEA of Sweden",
  "firmwareVersion" : "1.1.001",
  "hardwareVersion" : "1",
  "serialNumber" : "2C1165FFFE18F406",
  "productCode" : "E2007",
  "fanMode" : "low",
  "fanModeSequence" : "lowMediumHighAuto",
  "motorState" : 10,
  "motorRuntime" : 217773,
  "filterElapsedTime" : 230293,
  "filterAlarmStatus" : false,
  "filterLifetime" : 259200,
  "childLock" : false,
  "statusLight" : true,
  "currentPM25" : 2,
  "identifyStarted" : "2000-01-01T00:00:00.000Z",
  "identifyPeriod" : 0,
  "permittingJoin" : false,
  "otaStatus" : "upToDate",
  "otaState" : "readyToCheck",
  "otaProgress" : 0,
  "otaPolicy" : "autoUpdate",
  "otaScheduleStart" : "00:00",
  "otaScheduleEnd" : "00:00"
},

MANUAL speed 2 in APP:

"attributes" : {
  "customName" : "Air purifier 1",
  "model" : "STARKVIND Air purifier",
  "manufacturer" : "IKEA of Sweden",
  "firmwareVersion" : "1.1.001",
  "hardwareVersion" : "1",
  "serialNumber" : "2C1165FFFE18F406",
  "productCode" : "E2007",
  "fanMode" : "low",
  "fanModeSequence" : "lowMediumHighAuto",
  "motorState" : 20,
  "motorRuntime" : 217773,
  "filterElapsedTime" : 230293,
  "filterAlarmStatus" : false,
  "filterLifetime" : 259200,
  "childLock" : false,
  "statusLight" : true,
  "currentPM25" : 2,
  "identifyStarted" : "2000-01-01T00:00:00.000Z",
  "identifyPeriod" : 0,
  "permittingJoin" : false,
  "otaStatus" : "upToDate",
  "otaState" : "readyToCheck",
  "otaProgress" : 0,
  "otaPolicy" : "autoUpdate",
  "otaScheduleStart" : "00:00",
  "otaScheduleEnd" : "00:00"
},

MANUAL speed 3 in APP:

"attributes" : {
  "customName" : "Air purifier 1",
  "model" : "STARKVIND Air purifier",
  "manufacturer" : "IKEA of Sweden",
  "firmwareVersion" : "1.1.001",
  "hardwareVersion" : "1",
  "serialNumber" : "2C1165FFFE18F406",
  "productCode" : "E2007",
  "fanMode" : "medium",
  "fanModeSequence" : "lowMediumHighAuto",
  "motorState" : 30,
  "motorRuntime" : 217773,
  "filterElapsedTime" : 230293,
  "filterAlarmStatus" : false,
  "filterLifetime" : 259200,
  "childLock" : false,
  "statusLight" : true,
  "currentPM25" : 2,
  "identifyStarted" : "2000-01-01T00:00:00.000Z",
  "identifyPeriod" : 0,
  "permittingJoin" : false,
  "otaStatus" : "upToDate",
  "otaState" : "readyToCheck",
  "otaProgress" : 0,
  "otaPolicy" : "autoUpdate",
  "otaScheduleStart" : "00:00",
  "otaScheduleEnd" : "00:00"
},

MANUAL speed 5 in APP:

"attributes" : {
  "customName" : "Air purifier 1",
  "model" : "STARKVIND Air purifier",
  "manufacturer" : "IKEA of Sweden",
  "firmwareVersion" : "1.1.001",
  "hardwareVersion" : "1",
  "serialNumber" : "2C1165FFFE18F406",
  "productCode" : "E2007",
  "fanMode" : "high",
  "fanModeSequence" : "lowMediumHighAuto",
  "motorState" : 50,
  "motorRuntime" : 217773,
  "filterElapsedTime" : 230293,
  "filterAlarmStatus" : false,
  "filterLifetime" : 259200,
  "childLock" : false,
  "statusLight" : true,
  "currentPM25" : 2,
  "identifyStarted" : "2000-01-01T00:00:00.000Z",
  "identifyPeriod" : 0,
  "permittingJoin" : false,
  "otaStatus" : "upToDate",
  "otaState" : "readyToCheck",
  "otaProgress" : 0,
  "otaPolicy" : "autoUpdate",
  "otaScheduleStart" : "00:00",
  "otaScheduleEnd" : "00:00"
},

TheMrBooyah pushed a commit that referenced this issue May 11, 2023
@TheMrBooyah
Copy link
Collaborator

Fanmodes should now be correct. Not sure if I need to also set the motor state when setting the fanmode for HASS functionality to work but at least this should prevent the application from throwing errors (I hope)

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

Tried development build. Works until I touch airpurifier in IKEA app, after that freezes, had to kill -9 process.

Last several lines:

2023-05-11 10:13:45.239 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=LAST_MODIFIED, id=c96ab713-13ea-4d3d-a8f8-60fe84dc0819, source=hub, time=2023-05-11T07:13:45.238
2023-05-11 10:13:55.242 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=LAST_MODIFIED, id=005e2983-5fff-4b1a-9e02-5c799834162b, source=hub, time=2023-05-11T07:13:55.241
2023-05-11 10:14:05.247 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=LAST_MODIFIED, id=d86824e9-0b5a-4d47-9530-080e4d9ff956, source=hub, time=2023-05-11T07:14:05.246
2023-05-11 10:14:08.571 DEBUG 3266187 --- [-1fc80ec3ad50_1] d.d.i.d.client.mqtt.MqttEventHandler : MQTT message received: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/4d713b5d-08e0-422d-8c16-f8341797a71d_1/set, payload={"payload":"eyJzdGF0ZSI6Ik9GRiJ9","qos":0,"retained":false,"messageId":0,"duplicate":false,"id":0}
2023-05-11 10:14:08.834 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=5d57c43b-445e-4dbb-a19f-8945ea900a89, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:14:08
2023-05-11 10:14:08.836 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"light","id":"4d713b5d-08e0-422d-8c16-f8341797a71d_1","type":"light","deviceType":"light","createdAt":"2023-03-16T19:54:12","isReachable":true,"lastSeen":"2023-05-11T10:14:08","attributes":{"isOn":false},"remoteLinks":[]}
2023-05-11 10:14:08.837 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/4d713b5d-08e0-422d-8c16-f8341797a71d_1/state, payload={"state":"OFF","color":{}}, qos=1, retained=true
2023-05-11 10:14:08.855 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/4d713b5d-08e0-422d-8c16-f8341797a71d_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-11 10:14:10.787 DEBUG 3266187 --- [-1fc80ec3ad50_1] d.d.i.d.client.mqtt.MqttEventHandler : MQTT message received: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/4d713b5d-08e0-422d-8c16-f8341797a71d_1/set, payload={"payload":"eyJzdGF0ZSI6Ik9OIn0=","qos":0,"retained":false,"messageId":0,"duplicate":false,"id":0}
2023-05-11 10:14:11.044 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=57887ea9-9d5f-46fc-a105-280f2ac0885d, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:14:11
2023-05-11 10:14:11.046 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"light","id":"4d713b5d-08e0-422d-8c16-f8341797a71d_1","type":"light","deviceType":"light","createdAt":"2023-03-16T19:54:12","isReachable":true,"lastSeen":"2023-05-11T10:14:11","attributes":{"isOn":true},"remoteLinks":[]}
2023-05-11 10:14:11.047 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/4d713b5d-08e0-422d-8c16-f8341797a71d_1/state, payload={"state":"ON","color":{}}, qos=1, retained=true
2023-05-11 10:14:11.080 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/4d713b5d-08e0-422d-8c16-f8341797a71d_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-11 10:14:15.250 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=LAST_MODIFIED, id=0e2fca78-6555-4dbd-9683-e3df444b869f, source=hub, time=2023-05-11T07:14:15.249
2023-05-11 10:14:17.858 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=688f74c5-f6c8-4684-81dd-e49c171e338e, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:14:17
2023-05-11 10:14:17.888 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"airPurifier","id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","type":"airPurifier","deviceType":"airPurifier","createdAt":"2022-12-02T16:03:02","isReachable":true,"lastSeen":"2023-05-11T10:14:17","attributes":{"filterElapsedTime":230303,"filterAlarmStatus":null,"filterLifetime":null,"otaStatus":null,"otaState":null,"otaProgress":null,"otaScheduleStart":null,"otaScheduleEnd":null,"otaPolicy":null},"remoteLinks":[]}
2023-05-11 10:14:17.889 DEBUG 3266187 --- [or-http-epoll-3] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true

^C^C^C^C^C

^C^C^CKilled

@TheMrBooyah
Copy link
Collaborator

It received the device update but it seems to not have the attributes of what changed

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

strace of frozen process (200%CPU)

strace -f -p 3266837
strace: Process 3266837 attached with 39 threads
[pid 3266973] futex(0x7fd2b8003ae0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
[pid 3266957] futex(0x7fd2940ca9cc, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266923] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266914] futex(0x7fd2a001b478, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266909] futex(0x7fd2a001627c, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266893] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266885] futex(0x7fd29c5c415c, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266884] futex(0x7fd294114b28, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266883] futex(0x7fd2940898d8, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266872] futex(0x7fd2940ca9cc, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 3266871] epoll_wait(33, <unfinished ...>
[pid 3266870] epoll_wait(21, <unfinished ...>
[pid 3266866] epoll_wait(13, <unfinished ...>
[pid 3266864] futex(0x7fd2e8c2dc78, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266863] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266862] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266861] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266860] recvfrom(8, <unfinished ...>
[pid 3266857] futex(0x7fd2e806f720, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
[pid 3266856] futex(0x7fd2e806f720, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
[pid 3266855] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266854] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266853] futex(0x7fd2e800fe68, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266852] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266851] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266850] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266849] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266848] futex(0x7fd2e800fdb8, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266847] futex(0x7fd2e8003110, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
[pid 3266846] futex(0x7fd2e8116c78, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266845] futex(0x7fd2e80111e8, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266844] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266843] restart_syscall(<... resuming interrupted read ...> <unfinished ...>
[pid 3266842] futex(0x7fd2e80e38c0, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
[pid 3266841] futex(0x7fd2e8081510, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
[pid 3266840] futex(0x7fd2e800ed38, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266839] futex(0x7fd2e806f720, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
[pid 3266838] futex(0x7fd2e8010a38, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266837] futex(0x7fd2ee3a09d0, FUTEX_WAIT, 3266838, NULL <unfinished ...>
[pid 3266957] <... futex resumed>) = -1 EAGAIN (Resource temporarily unavailable)
[pid 3266872] <... futex resumed>) = 0
[pid 3266957] futex(0x7fd2940ca978, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 3266872] futex(0x7fd294114b28, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 3266957] futex(0x7fd2940ca9c8, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 3266884] <... futex resumed>) = 0
[pid 3266872] <... futex resumed>) = 1

@TheMrBooyah
Copy link
Collaborator

The weird part is, it did exactly what it had to do when the state changed event came in. There seems to be no reason for it to hang itself

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

Update - freezes as soon as I switch purifier into manual mode in IKEA app. Switching between OFF/AUTO is ok and published to mqtt.

2023-05-11 10:37:19.561 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=7fed5325-c0ff-4d92-9246-d8681b8aa68e, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:37:19
2023-05-11 10:37:19.563 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"airPurifier","id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","type":"airPurifier","deviceType":"airPurifier","createdAt":"2022-12-02T16:03:02","isReachable":true,"lastSeen":"2023-05-11T10:37:19","attributes":{"fanMode":"off","fanModeSequence":"lowMediumHighAuto","filterElapsedTime":null,"filterAlarmStatus":null,"filterLifetime":null,"otaStatus":null,"otaState":null,"otaProgress":null,"otaScheduleStart":null,"otaScheduleEnd":null,"otaPolicy":null},"remoteLinks":[]}
2023-05-11 10:37:19.564 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state, payload="off", qos=1, retained=true
2023-05-11 10:37:19.578 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-11 10:37:19.593 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=f94eb68e-c5b3-48cb-8d12-fa1bf2eb7a29, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:37:19
2023-05-11 10:37:19.595 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"airPurifier","id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","type":"airPurifier","deviceType":"airPurifier","createdAt":"2022-12-02T16:03:02","isReachable":true,"lastSeen":"2023-05-11T10:37:19","attributes":{"fanMode":"off","fanModeSequence":"lowMediumHighAuto","motorState":0,"filterElapsedTime":null,"filterAlarmStatus":null,"filterLifetime":null,"otaStatus":null,"otaState":null,"otaProgress":null,"otaScheduleStart":null,"otaScheduleEnd":null,"otaPolicy":null},"remoteLinks":[]}
2023-05-11 10:37:19.596 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state, payload="off", qos=1, retained=true
2023-05-11 10:37:19.608 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true

2023-05-11 10:37:20.414 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=LAST_MODIFIED, id=1a1c1a71-cf39-4a13-b15e-c336e9f74bc6, source=hub, time=2023-05-11T07:37:20.414

2023-05-11 10:37:21.805 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=02706cc7-df26-4d29-8559-8b7d0862e9c8, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:37:21
2023-05-11 10:37:21.807 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"airPurifier","id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","type":"airPurifier","deviceType":"airPurifier","createdAt":"2022-12-02T16:03:02","isReachable":true,"lastSeen":"2023-05-11T10:37:21","attributes":{"fanMode":"auto","fanModeSequence":"lowMediumHighAuto","filterElapsedTime":null,"filterAlarmStatus":null,"filterLifetime":null,"otaStatus":null,"otaState":null,"otaProgress":null,"otaScheduleStart":null,"otaScheduleEnd":null,"otaPolicy":null},"remoteLinks":[]}
2023-05-11 10:37:21.808 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state, payload="auto", qos=1, retained=true
2023-05-11 10:37:21.823 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-11 10:37:21.843 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=d6d0d69a-161d-406b-97ed-58ece0d64471, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:37:21
2023-05-11 10:37:21.845 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"airPurifier","id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","type":"airPurifier","deviceType":"airPurifier","createdAt":"2022-12-02T16:03:02","isReachable":true,"lastSeen":"2023-05-11T10:37:21","attributes":{"fanMode":"auto","fanModeSequence":"lowMediumHighAuto","motorState":30,"filterElapsedTime":null,"filterAlarmStatus":null,"filterLifetime":null,"otaStatus":null,"otaState":null,"otaProgress":null,"otaScheduleStart":null,"otaScheduleEnd":null,"otaPolicy":null},"remoteLinks":[]}
2023-05-11 10:37:21.846 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state, payload="auto", qos=1, retained=true
2023-05-11 10:37:21.858 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true

2023-05-11 10:37:26.533 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=4825116b-9c15-4be0-a372-f82b2151627f, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:37:26
2023-05-11 10:37:26.535 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"airPurifier","id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","type":"airPurifier","deviceType":"airPurifier","createdAt":"2022-12-02T16:03:02","isReachable":true,"lastSeen":"2023-05-11T10:37:26","attributes":{"fanMode":"off","fanModeSequence":"lowMediumHighAuto","filterElapsedTime":null,"filterAlarmStatus":null,"filterLifetime":null,"otaStatus":null,"otaState":null,"otaProgress":null,"otaScheduleStart":null,"otaScheduleEnd":null,"otaPolicy":null},"remoteLinks":[]}
2023-05-11 10:37:26.536 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state, payload="off", qos=1, retained=true
2023-05-11 10:37:26.549 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-11 10:37:26.573 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.dirigera.client.api.WebSocketApi : Received Dirigera event: type=DEVICE_STATE_CHANGED, id=07e67ae9-3da0-44e5-9ad2-7dd2d5c8a149, source=urn:com:ikea:homesmart:iotc:zigbee, time=2023-05-11T10:37:26
2023-05-11 10:37:26.574 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"airPurifier","id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","type":"airPurifier","deviceType":"airPurifier","createdAt":"2022-12-02T16:03:02","isReachable":true,"lastSeen":"2023-05-11T10:37:26","attributes":{"fanMode":"off","fanModeSequence":"lowMediumHighAuto","motorState":0,"filterElapsedTime":null,"filterAlarmStatus":null,"filterLifetime":null,"otaStatus":null,"otaState":null,"otaProgress":null,"otaScheduleStart":null,"otaScheduleEnd":null,"otaPolicy":null},"remoteLinks":[]}
2023-05-11 10:37:26.575 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state, payload="off", qos=1, retained=true
2023-05-11 10:37:26.587 DEBUG 3268904 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/air_quality/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true

@TheMrBooyah
Copy link
Collaborator

That seems like the manual mode isn't completely correct yet but I don't see the reason why....

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

Where is it in source? I can also take a look :)

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

got it going. there is also ON mode for airpurifier. But strange app freeze instead of throwing an error. Log only continues after pause/resume app in debugger.

Fix:

AirPurifierFanMode.java:
@JsonProperty("on")
ON

HassAirPurifierEventHandler.java:

config.payload_on = this.toJSON(AirPurifierFanMode.ON);
config.state_on = this.toJSON(AirPurifierFanMode.ON);

log:

2023-05-11 20:15:25.303 ERROR 20952 --- [-1fc80ec3ad50_1] .d.i.d.c.m.DirigeraClientMqttApplication : Connection lost to MQTT broker: Connection lost
2023-05-11 20:15:25.303 INFO 20952 --- [-1fc80ec3ad50_1] .d.i.d.c.m.DirigeraClientMqttApplication : Close WebSocket
2023-05-11 20:15:25.303 INFO 20952 --- [-1fc80ec3ad50_1] .d.i.d.c.m.DirigeraClientMqttApplication : Attempt to restart application
2023-05-11 20:15:25.303 INFO 20952 --- [oundedElastic-4] d.d.i.d.client.api.http.ClientApi : Finished ping thread: id=122, name=boundedElastic-4
2023-05-11 20:15:25.304 ERROR 20952 --- [ctor-http-nio-2] d.d.i.dirigera.client.api.WebSocketApi : Error while listening to websocket events: Cannot deserialize value of type de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierFanMode from String "on": not one of the values accepted for Enum class: [high, low, medium, auto, off]
at [Source: (io.netty.buffer.ByteBufInputStream); line: 1, column: 442] (through reference chain: de.dvdgeisler.iot.dirigera.client.api.model.events.DeviceStateChangedEvent["data"]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierDevice["attributes"]->de.dvdgeisler.iot.dirigera.client.api.model.device.airpurifier.AirPurifierStateAttributes["fanMode"])

TheMrBooyah added a commit that referenced this issue May 11, 2023
@TheMrBooyah
Copy link
Collaborator

I added the ON state. Could you retest this?

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

Now seems to be good, thanks!

Also home assistant does not support air purifier:

WARNING (MainThread) [homeassistant.components.mqtt.discovery] Integration air_quality is not supported

PS freeze on unknown value is not good, app should provide error or crash at least. :)

@TheMrBooyah
Copy link
Collaborator

I definitely agree but I'm not the original creator and still don't have the full grasps of what the code is doing on the background.

I might be a software developer by career choice, I still need time to figure things out.

And great to see the home assistant components documentation is up to date. I'll try changing it to a fan in this case

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

There is also PM25 sensor in purifier, perhaps it could be published into mqtt.

Attribute "currentPM25"

@TheMrBooyah
Copy link
Collaborator

I'll look into that next but first lets get the basic function working :)

TheMrBooyah added a commit that referenced this issue May 11, 2023
@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

Now air purifier appeared in home assistant, but from there switching is only possible between OFF and MANUAL.

image

@TheMrBooyah
Copy link
Collaborator

It's something at least. I see that it's now running in optimistic mode (meaning only on and off).
It seems I need to update the topics and properties to match this component now:
https://www.home-assistant.io/integrations/fan.mqtt/

Let's see if that actually lets you control what we want to control

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

OFF/MANUAL fan modes work from home assistant.

What we achieved is that home assistant dirigera integration finally works in an environment with (^&#$) air purifier. :)

@TheMrBooyah
Copy link
Collaborator

I'll create a release for that and see if I can make the functionality so you can actually control it with home assistant :)

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

I'm now running client on test box, will try in home assistant as soon as you release.

@TheMrBooyah
Copy link
Collaborator

Updated the addon. Will see what I can do about the functionality of the air purifier in home assistant

@sbr2004
Copy link
Author

sbr2004 commented May 11, 2023

All is good, home assistant addon running.

@sbr2004
Copy link
Author

sbr2004 commented May 12, 2023

Unfortunately home assistant plugin did not survive overnight, now each mqtt publish thwors an error into logs:

2023-05-12 10:37:16.149 ERROR 66 --- [or-http-epoll-2] d.d.i.d.client.mqtt.MqttEventHandler : Error while publishing to MQTT topic: MqttException

@sbr2004
Copy link
Author

sbr2004 commented May 12, 2023

while changing brightness home assistant throws an error into log:

2023-05-12 23:26:10.846 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/de204e68-23eb-40d4-b3ab-53b6defcfcce_1/state': '{"brightness":46,"color":{}}'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 44, in wrapper
msg_callback(msg)
File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 358, in state_received
if values["state"] == "ON":
KeyError: 'state'

2023-05-12 23:26:10.877 ERROR (MainThread) [homeassistant.util.logging] Exception in state_received when handling msg on 'homeassistant/light/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/d719b113-fe3d-44f3-9fe7-6525d706452c_1/state': '{"brightness":55,"color":{}}'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 44, in wrapper
msg_callback(msg)
File "/usr/src/homeassistant/homeassistant/components/mqtt/light/schema_json.py", line 358, in state_received
if values["state"] == "ON":
KeyError: 'state'

@TheMrBooyah
Copy link
Collaborator

The error seems to be unrelated to this issue.
I did update the Airpurifier HASS part. @sbr2004 could you check feature/airpurifier_on_state to see if it works?

@sbr2004
Copy link
Author

sbr2004 commented May 16, 2023

It is possible to switch air purifier from home assistant only between OFF and MANUAL modes.

Also got mqtt exception:

2023-05-16 15:23:24.300 DEBUG 4087535 --- [or-http-epoll-7] d.d.i.d.c.m.hass.HassDeviceEventHandler : Received device state changed event: {"deviceType":"airPurifier","id":"e19c9cde-54aa-4dbd-a354-d3034eab384b_1","type":"airPurifier","deviceType":"airPurifier","createdAt":"2022-12-02T16:03:02","isReachable":true,"lastSeen":"2023-05-16T15:23:24","attributes":{"fanMode":"off","fanModeSequence":"lowMediumHighAuto","motorState":0,"filterElapsedTime":null,"filterAlarmStatus":null,"filterLifetime":null,"otaStatus":null,"otaState":null,"otaProgress":null,"otaScheduleStart":null,"otaScheduleEnd":null,"otaPolicy":null},"remoteLinks":[]}
2023-05-16 15:23:24.302 DEBUG 4087535 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/fan/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/state, payload="off", qos=1, retained=true
2023-05-16 15:23:24.343 ERROR 4087535 --- [-1fc80ec3ad50_1] .d.i.d.c.m.DirigeraClientMqttApplication : Connection lost to MQTT broker: MqttException
2023-05-16 15:23:24.343 ERROR 4087535 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Error while publishing to MQTT topic: Client is currently disconnecting
2023-05-16 15:23:24.344 INFO 4087535 --- [-1fc80ec3ad50_1] .d.i.d.c.m.DirigeraClientMqttApplication : Close WebSocket
2023-05-16 15:23:24.345 INFO 4087535 --- [-1fc80ec3ad50_1] .d.i.d.c.m.DirigeraClientMqttApplication : Attempt to restart application
2023-05-16 15:23:24.345 DEBUG 4087535 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Publish to MQTT: topic=homeassistant/fan/d5f4abd6-e263-480c-ae04-1fc80ec3ad50_1/e19c9cde-54aa-4dbd-a354-d3034eab384b_1/availability, payload="ONLINE", qos=1, retained=true
2023-05-16 15:23:24.347 ERROR 4087535 --- [or-http-epoll-7] d.d.i.d.client.mqtt.MqttEventHandler : Error while publishing to MQTT topic: Client is not connected
2023-05-16 15:23:24.350 INFO 4087535 --- [ Thread-16] .d.i.d.c.m.DirigeraClientMqttApplication : Close Spring Boot context
2023-05-16 15:23:24.387 INFO 4087535 --- [oundedElastic-2] d.d.i.d.client.api.http.ClientApi : Finished ping thread: id=30, name=boundedElastic-2
2023-05-16 15:23:24.391 INFO 4087535 --- [oundedElastic-1] d.d.i.dirigera.client.api.WebSocketApi : Finish event handler thread: id=20, name=boundedElastic-1

@TheMrBooyah
Copy link
Collaborator

Hmm this change should have brought some more controls to the FAN.
E.g. it should allow to set a preset now. No extra fields are added to the MQTT device?

@sbr2004
Copy link
Author

sbr2004 commented May 16, 2023

No extra fields, just ON/OFF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants