Skip to content

Conversation

jlaur
Copy link
Contributor

@jlaur jlaur commented Oct 14, 2025

I noticed many of these exceptions when saving an items file after changing multiple semantic tags:

2025-10-14 23:19:39.557 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'hue.items'
2025-10-14 23:19:39.772 [ERROR] [ore.common.registry.AbstractRegistry] - Cannot inform the listener "org.openhab.io.hueemulation.internal.rest.Sensors@38e300f8" about the "UPDATED" event: Item type not supported as sensor
java.lang.IllegalArgumentException: Item type not supported as sensor
        at org.openhab.io.hueemulation.internal.dto.HueSensorEntry.<init>(HueSensorEntry.java:84) ~[?:?]
        at org.openhab.io.hueemulation.internal.rest.Sensors.updated(Sensors.java:146) ~[?:?]
        at org.openhab.io.hueemulation.internal.rest.Sensors.updated(Sensors.java:1) ~[?:?]
        at org.openhab.core.common.registry.AbstractRegistry.notifyListeners(AbstractRegistry.java:407) ~[?:?]
        at org.openhab.core.common.registry.AbstractRegistry.notifyListenersAboutUpdatedElement(AbstractRegistry.java:428) ~[?:?]
        at org.openhab.core.internal.items.ItemRegistryImpl.notifyListenersAboutUpdatedElement(ItemRegistryImpl.java:385) ~[?:?]
        at org.openhab.core.internal.items.ItemRegistryImpl.notifyListenersAboutUpdatedElement(ItemRegistryImpl.java:1) ~[?:?]
        at org.openhab.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:334) ~[?:?]
        at org.openhab.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:1) ~[?:?]
        at org.openhab.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:66) ~[?:?]
        at org.openhab.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:91) ~[?:?]
        at org.openhab.core.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:411) ~[?:?]
        at org.openhab.core.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:319) ~[?:?]
        at org.openhab.core.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:142) ~[?:?]
        at org.openhab.core.model.core.internal.folder.FolderObserver.checkPath(FolderObserver.java:285) ~[?:?]
        at org.openhab.core.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:340) ~[?:?]
        at org.openhab.core.internal.service.WatchServiceImpl$Listener.notify(WatchServiceImpl.java:293) ~[?:?]
        at org.openhab.core.internal.service.WatchServiceImpl.lambda$6(WatchServiceImpl.java:278) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:?]
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:?]
        at org.openhab.core.internal.service.WatchServiceImpl.doNotify(WatchServiceImpl.java:278) ~[?:?]
        at org.openhab.core.internal.service.WatchServiceImpl.notifyListeners(WatchServiceImpl.java:271) ~[?:?]
        at org.openhab.core.internal.service.WatchServiceImpl.lambda$4(WatchServiceImpl.java:232) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
        at java.lang.Thread.run(Unknown Source) [?:?]

That lead me to another finding that sensors and lights are not removed when item type is changed to an unsupported type. This has been fixed as well.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@jlaur jlaur requested a review from digitaldan as a code owner October 14, 2025 21:48
@jlaur jlaur added the bug An unexpected problem or unintended behavior of an add-on label Oct 14, 2025
@jlaur jlaur requested review from a team and davidgraeff October 14, 2025 21:48
@jlaur jlaur marked this pull request as draft October 15, 2025 20:23
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@jlaur jlaur marked this pull request as ready for review October 15, 2025 22:16
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@lsiepel lsiepel merged commit 86b2929 into openhab:main Oct 16, 2025
2 checks passed
lsiepel pushed a commit that referenced this pull request Oct 16, 2025
* Fix IllegalArgumentException

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@lsiepel lsiepel added the backported A PR that has been cherry-picked to a patch release branch label Oct 16, 2025
@jlaur jlaur deleted the hueemulation-iae branch October 17, 2025 15:54
@jlaur jlaur added this to the 5.1 milestone Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported A PR that has been cherry-picked to a patch release branch bug An unexpected problem or unintended behavior of an add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants