You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dimmer channels used to be able to send ON and OFF, and receive ON and OFF messages. Versions 4.2 and earlier.
Now, on upgrading to OH 4.3, although dimmer channels can still send ON and OFF (for 100% and 0%), the channel throws an error if it receives an ON or OFF event.
This breaks existing configurations.
Expected Behavior
Dimmer channels should be able to receive as well as send ON and OFF.
Current Behavior
If a Dimmer channel receives an ON or OFF message the following errors are thrown, and the channel stops working.
2024-12-23 14:32:45.937 [DEBUG] [nternal.profiles.ProfileCallbackImpl] - Delegating command '59' for item 'kitchenPots' to handler for channel 'mqtt:topic:insteon:kitchenPots'
2024-12-23 14:32:45.937 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.binding.ThingHandler" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:32:45.937 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.ChannelUID" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:32:45.938 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.Thing" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:32:45.938 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.binding.ThingHandlerCallback" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:32:45.938 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.ThingStatusInfo" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:32:45.940 [DEBUG] [nternal.common.InvocationHandlerSync] - Already in a safe-call context, executing 'ThingHandler.handleCommand()' directly on 'org.openhab.binding.mqtt.generic.internal.handler.GenericMQTTThingHandler@4b898af5'.
2024-12-23 14:32:45.940 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.mqtt.generic.internal.handler.GenericMQTTThingHandler@4b898af5': class org.openhab.core.library.types.OnOffType cannot be cast to class org.openhab.core.library.types.PercentType (org.openhab.core.library.types.OnOffType and org.openhab.core.library.types.PercentType are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4b76e427)
java.lang.ClassCastException: class org.openhab.core.library.types.OnOffType cannot be cast to class org.openhab.core.library.types.PercentType (org.openhab.core.library.types.OnOffType and org.openhab.core.library.types.PercentType are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4b76e427)
at org.openhab.binding.mqtt.generic.values.PercentageValue.parseCommand(PercentageValue.java:78) ~[?:?]
at org.openhab.binding.mqtt.generic.ChannelState.publishValue(ChannelState.java:363) ~[?:?]
at org.openhab.binding.mqtt.generic.AbstractMQTTThingHandler.handleCommand(AbstractMQTTThingHandler.java:154) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) [bundleFile:?]
at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
at jdk.proxy1706.$Proxy1843.handleCommand(Unknown Source) [?:?]
at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:95) [bundleFile:?]
at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [bundleFile:?]
at jdk.internal.reflect.GeneratedMethodAccessor96.invoke(Unknown Source) ~[?:?]
Without on or off defined:
Type dimmer : kitchenPots "kitchen pots" [ commandTopic="/isy_command/kitchenPots", stateTopic="/isy_status/kitchenPots" ]
I get the following error:
2024-12-23 14:54:35.067 [DEBUG] [nternal.profiles.ProfileCallbackImpl] - Delegating command '100' for item 'kitchenPots' to handler for channel 'mqtt:topic:insteon:kitchenPots'
2024-12-23 14:54:35.068 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.binding.ThingHandler" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:54:35.068 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.ChannelUID" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:54:35.068 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.Thing" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:54:35.068 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.binding.ThingHandlerCallback" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:54:35.068 [DEBUG] [.internal.common.CombinedClassLoader] - Loaded class "org.openhab.core.thing.ThingStatusInfo" by classloader "org.eclipse.osgi.internal.loader.EquinoxClassLoader@6e96f620[org.openhab.core.thing:4.3.0(id=221)]" for "[interface org.openhab.core.thing.binding.ThingHandler]"
2024-12-23 14:54:35.070 [DEBUG] [nternal.common.InvocationHandlerSync] - Already in a safe-call context, executing 'ThingHandler.handleCommand()' directly on 'org.openhab.binding.mqtt.generic.internal.handler.GenericMQTTThingHandler@879ea9e'.
2024-12-23 14:54:35.070 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.mqtt.generic.internal.handler.GenericMQTTThingHandler@879ea9e': null
java.lang.ClassCastException: null
Possible Solution
Restore the previous functionality by allowing dimmer channels to receive ON and OFF
Dimmer channels used to be able to send ON and OFF, and receive ON and OFF messages. Versions 4.2 and earlier.
Now, on upgrading to OH 4.3, although dimmer channels can still send ON and OFF (for 100% and 0%), the channel throws an error if it receives an ON or OFF event.
This breaks existing configurations.
Expected Behavior
Dimmer channels should be able to receive as well as send ON and OFF.
Current Behavior
If a Dimmer channel receives an ON or OFF message the following errors are thrown, and the channel stops working.
With on and off defined in the channel:
When ON or OFF is received:
Without on or off defined:
I get the following error:
Possible Solution
Restore the previous functionality by allowing dimmer channels to receive ON and OFF
Steps to Reproduce (for Bugs)
Define a channel:
And an item:
Then try moving the dimmer item to 100% or 0%
Context
MQTT is totally unusable, had to revert to 4.2
Your Environment
Ubuntu 22.04, on upgrade from OH 4.2 to 4.3, MQTT became unusable and throws the above errors.
The text was updated successfully, but these errors were encountered: