openhab-addons/bundles/org.openhab.binding.mqtt.homie/src
Cody Cutrer 923fb12b7d
[mqtt.homie] handle exceptions parsing attributes (#12254)
fixes #10711

technically this code is in mqtt.generic, but it's only used by Homie.

in particular, if an incoming string doesn't match an enum, this will now
just ignore the value instead of raising an exception to be caught somewhere inside
of Hive MQTT, and eventually timing out and logging that mandatory topics weren't
received, instead of logging a pointer to the actual problem. this makes it so that
if there's a homie $datatype openhab doesn't understand (like duration), it will be
able to get to the point of just choosing a string channel

also did some minor debug logging cleanup for mqtt:
 * fixed a typo
 * when logging homie device name from the thing handler, use the config deviceid,
   since we likely don't have the attributes from MQTT yet

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2022-02-23 13:38:00 +01:00
..
main [mqtt.homie] handle exceptions parsing attributes (#12254) 2022-02-23 13:38:00 +01:00
test/java/org/openhab/binding/mqtt/homie [mqtt.homie] remove unused constants in tests (#12242) 2022-02-08 21:01:25 +01:00