smarthome icon indicating copy to clipboard operation
smarthome copied to clipboard

MQTT binding: Warning for incoming messages for Homie enum values

Open euphi opened this issue 6 years ago • 0 comments

https://github.com/eclipse/smarthome/blob/9de1cb05fc0d221b05c729a5ffb75a31eb54bc82/extensions/binding/org.eclipse.smarthome.binding.mqtt.generic/src/main/java/org/eclipse/smarthome/binding/mqtt/generic/internal/generic/ChannelState.java#L164

These lines generate a warning 21:07:09.005 [WARN ] [generic.internal.generic.ChannelState] - Command 'WARNING' not supported by type 'TextValue': Value WARNING not within range although it is just a normal value in range of the enum datatype as defined in the homie convention.

Received MQTT message is

homie/lab_thermo/Log/Level WARNING

The value is updated (and it is also possible to set it), so this issue is only about the unnecessary warning.

The Node has been advertised as:

homie/lab_thermo/Log/$name Logger
homie/lab_thermo/Log/$type Logger
homie/lab_thermo/Log/$properties Level,LogSerial
homie/lab_thermo/Log/Level/$name Loglevel
homie/lab_thermo/Log/Level/$settable true
homie/lab_thermo/Log/Level/$datatype enum
homie/lab_thermo/Log/Level/$format DEBUG,INFO,WARNING,ERROR,CRITICAL
homie/lab_thermo/Log/LogSerial/$name enable/disable log to serial interface
homie/lab_thermo/Log/LogSerial/$settable true
homie/lab_thermo/Log/LogSerial/$datatype boolean

and thus has been configured as string. Datatype and Format have been recognized correctly by the binding and the channel is configured accordingly.

euphi avatar Jan 08 '19 20:01 euphi