-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[mqtt.homeassistant] Crash when discovery topic updates with slightly different payload #13517
Labels
bug
An unexpected problem or unintended behavior of an add-on
Comments
ssalonen
added a commit
to ssalonen/openhab2-addons
that referenced
this issue
Oct 8, 2022
Fixes openhab#13517 Possibly resolves openhab#9711 and openhab#12295 as well. Signed-off-by: Sami Salonen <ssalonen@gmail.com>
lolodomo
pushed a commit
that referenced
this issue
Nov 12, 2022
…topics update with content (#13518) * [mqtt.homeassistant] Fix for discovery topics that update with content Fixes #13517 Possibly resolves #9711 and #12295 as well. * [mqtt.homeassistant] Sort channels before changing thing * [mqtt.homeassistant] logging + removed unnecessary synchronization * Resolve bunch of warnings in homeassistant bundle * [mqtt.homeassistant] Handling null warnings and unnecessary null checks * [mqtt.homeassistant] Removing unnecessary null checks Signed-off-by: Sami Salonen <ssalonen@gmail.com> Co-Authored-by: @antroids github handle
andrasU
pushed a commit
to andrasU/openhab-addons
that referenced
this issue
Dec 24, 2022
…topics update with content (openhab#13518) * [mqtt.homeassistant] Fix for discovery topics that update with content Fixes openhab#13517 Possibly resolves openhab#9711 and openhab#12295 as well. * [mqtt.homeassistant] Sort channels before changing thing * [mqtt.homeassistant] logging + removed unnecessary synchronization * Resolve bunch of warnings in homeassistant bundle * [mqtt.homeassistant] Handling null warnings and unnecessary null checks * [mqtt.homeassistant] Removing unnecessary null checks Signed-off-by: Sami Salonen <ssalonen@gmail.com> Co-Authored-by: @antroids github handle Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
borazslo
pushed a commit
to borazslo/openhab-mideaac-addon
that referenced
this issue
Jan 8, 2023
…topics update with content (openhab#13518) * [mqtt.homeassistant] Fix for discovery topics that update with content Fixes openhab#13517 Possibly resolves openhab#9711 and openhab#12295 as well. * [mqtt.homeassistant] Sort channels before changing thing * [mqtt.homeassistant] logging + removed unnecessary synchronization * Resolve bunch of warnings in homeassistant bundle * [mqtt.homeassistant] Handling null warnings and unnecessary null checks * [mqtt.homeassistant] Removing unnecessary null checks Signed-off-by: Sami Salonen <ssalonen@gmail.com> Co-Authored-by: @antroids github handle
psmedley
pushed a commit
to psmedley/openhab-addons
that referenced
this issue
Feb 23, 2023
…topics update with content (openhab#13518) * [mqtt.homeassistant] Fix for discovery topics that update with content Fixes openhab#13517 Possibly resolves openhab#9711 and openhab#12295 as well. * [mqtt.homeassistant] Sort channels before changing thing * [mqtt.homeassistant] logging + removed unnecessary synchronization * Resolve bunch of warnings in homeassistant bundle * [mqtt.homeassistant] Handling null warnings and unnecessary null checks * [mqtt.homeassistant] Removing unnecessary null checks Signed-off-by: Sami Salonen <ssalonen@gmail.com> Co-Authored-by: @antroids github handle
nemerdaud
pushed a commit
to nemerdaud/openhab-addons
that referenced
this issue
Feb 28, 2023
…topics update with content (openhab#13518) * [mqtt.homeassistant] Fix for discovery topics that update with content Fixes openhab#13517 Possibly resolves openhab#9711 and openhab#12295 as well. * [mqtt.homeassistant] Sort channels before changing thing * [mqtt.homeassistant] logging + removed unnecessary synchronization * Resolve bunch of warnings in homeassistant bundle * [mqtt.homeassistant] Handling null warnings and unnecessary null checks * [mqtt.homeassistant] Removing unnecessary null checks Signed-off-by: Sami Salonen <ssalonen@gmail.com> Co-Authored-by: @antroids github handle
andrasU
pushed a commit
to andrasU/openhab-addons
that referenced
this issue
Jan 6, 2024
…topics update with content (openhab#13518) * [mqtt.homeassistant] Fix for discovery topics that update with content Fixes openhab#13517 Possibly resolves openhab#9711 and openhab#12295 as well. * [mqtt.homeassistant] Sort channels before changing thing * [mqtt.homeassistant] logging + removed unnecessary synchronization * Resolve bunch of warnings in homeassistant bundle * [mqtt.homeassistant] Handling null warnings and unnecessary null checks * [mqtt.homeassistant] Removing unnecessary null checks Signed-off-by: Sami Salonen <ssalonen@gmail.com> Co-Authored-by: @antroids github handle Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to #9711 #12295, perhaps same root cause.
Expected Behavior
No errors in logs
Current Behavior
When discovery topic updates with slightly different JSON payload, the existing homeassistant thing crashes.
openhab.log
uncatched error, potentially with bad side-effectsPotential side effect is unsubscribe of channels
This is done at
openhab-addons/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/handler/HomeAssistantThingHandler.java
Lines 271 to 274 in a4781b4
openhab-addons/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/component/AbstractComponent.java
Lines 127 to 135 in a4781b4
since the crash happens after that, at
openhab-addons/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/handler/HomeAssistantThingHandler.java
Line 293 in a4781b4
And indeed,
Possible Solution
PR to follow
Steps to Reproduce (for Bugs)
openhab.log
errorOpenMQTTGateway publishes discovery information similar to below
NOTE: Depending which sensor was restarted last, the
via_device
contains different value. This field is not even affecting discovery process, it is purely additional metadata!This change of value causes the binding to crash.
Context
I am listening bluetooth sensors using multiple ESP32's (with OpenMQTTGateway) around my house. Some bluetooth sensors are in the coverage of two ESP32s.
This setup is causing error on openHAB side.
Your Environment
openHAB 3.3.0 stable release
The text was updated successfully, but these errors were encountered: