To ignore single wrong MQTT payload value or limit percentage value to 100%
Current Behavior
MQTT connection broken
Since topic is persistent, every reconnect attempt failing again and again
Possible Solution
Stop MQTT broker, clean persistent storage and relaunch broker and Openhab
Steps to Reproduce (for Bugs)
To submit in persistent MQTT topic, connected with Openhab bus value > 100
For example, for RGB light:
240,90,120
Environment
2.3.0-SNAPSHOT
Build #1151
Linux hp 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Same behavior in last stable release as well
2018-12-17 03:16:29.159 [ERROR] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to broker was lost
org.eclipse.paho.client.mqttv3.MqttException: MqttException
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:197) [208:org.openhab.io.transport.mqtt:
1.12.0]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.IllegalArgumentException: Value must be between 0 and 100
at org.openhab.core.library.types.PercentType.validateValue(PercentType.java:48) ~[?:?]
at org.openhab.core.library.types.PercentType.<init>(PercentType.java:43) ~[?:?]
at org.openhab.core.library.types.HSBType.getBrightness(HSBType.java:105) ~[?:?]
at org.openhab.core.library.types.HSBType.toString(HSBType.java:132) ~[?:?]
at org.openhab.core.compat1x.internal.TypeMapper.mapToESHType(TypeMapper.java:128) ~[?:?]
at org.openhab.core.events.EventPublisherDelegate.postUpdate(EventPublisherDelegate.java:63) ~[?:?]
at org.openhab.binding.mqtt.internal.MqttEventBusBinding$2.processMessage(MqttEventBusBinding.java:290) ~[?:?]
at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:574) ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475) ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379) ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183) ~[?:?]
... 1 more
2018-12-17 03:16:29.165 [ERROR] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to 'mqtt' was lost: MqttException : ReasonCode 0 : Cause : Value must be between 0 and 100
2018-12-17 03:16:29.165 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting connection helper to periodically try restoreconnection to broker 'mqtt'
2018-12-17 03:16:32.496 [WARN ] [t.mqtt.internal.MqttBrokerConnection] - Broker connection not started. Cannot publish message to topic '/myhome/s_in/Sunrise_Time'
Expected Behavior
To ignore single wrong MQTT payload value or limit percentage value to 100%
Current Behavior
MQTT connection broken Since topic is persistent, every reconnect attempt failing again and again
Possible Solution
Stop MQTT broker, clean persistent storage and relaunch broker and Openhab
Steps to Reproduce (for Bugs)
To submit in persistent MQTT topic, connected with Openhab bus value > 100 For example, for RGB light:
240,90,120
Environment
2.3.0-SNAPSHOT Build #1151 Linux hp 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Same behavior in last stable release as well