[SOLVED] MQTT Sensor string output not displayed


I have an issue to display mqtt string outputs.

my items below

Number mqtttemperature 	"A1 Temperature [%.1f]" 	{mqtt="<[mosquitto:broadlink/mqtt_A1_1/temperature:state:default]"}
Number mqtthumdity 		"A1 humdity [%.1f]" 		{mqtt="<[mosquitto:broadlink/mqtt_A1_1/humidity:state:default]"}
String mqttnoise 		"A1 Noise" 					{mqtt="<[mosquitto:broadlink/mqtt_A1_1/noise:state:default]"}
String mqttlight		"A1 Light" 					{mqtt="<[mosquitto broadlink/mqtt_A1_1/light:state:default]"}
String mqtt_airquality	"A1 air_quality" 			{mqtt="<[mosquitto:broadlink/mqtt_A1_1/air_quality:state:default]"}

my sitemap

Frame label="Sensors-A1" icon="temperature" {
		Default item=mqtttemperature
		Default item=mqtthumdity
		Default item=mqttnoise			
		Default item=mqttlight
		Default item=mqtt_airquality

as you can see the mqttnoise is well updated

==> /var/log/openhab2/events.log <==
2018-03-26 16:46:58.132 [vent.ItemStateChangedEvent] - mqttnoise changed from NULL to Normal

MQTT string is not displayed

moreover, i have another issue:
2018-03-26 01:48:00.746 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-03-26 01:48:01.224 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2018-03-26 01:48:01.302 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-03-26 01:48:01.361 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been started
2018-03-26 01:48:01.645 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type ‘mqtt’ of item ‘mqttlight’ could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: Configuration ‘mosquitto broadlink/mqtt_A1_1/light:state:default’ is not a valid inbound configuration: Configuration requires 4 or 5 parameters separated by ‘:’
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:51) [202:org.openhab.core.compat1x:2.2.0]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:341) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.dispatchBindingsPerType(GenericItemProvider.java:294) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.addBindingConfigReader(GenericItemProvider.java:131) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229) [42:org.apache.felix.scr:2.0.12]
at o

Any ideas

yes - read the error messages! :wink:

then again, have a look at that exact item and replace the space after “moquitto” with an “:”.

Then try again your sitemap. perhaps that error had some Impact on the display of mqttnoise.

Thanks a lot, i do not have the error anymore but still the same

the strings are not displayed

i have tried with Text item and Default item but same result

Default should do! it will present the item like it was defined in the items-file.

are your sure, your items are getting populated via MQTT - like you posted your events.log?

What happens, if you

  • save the items file
  • save the sitemap file

in your openhab.log

The mqtt is well populated
I have tried to publish and it’s not displayed

Unfortuately it do not work with default and no error in the log

In your item label you haven’t specified that the value should be displayed, try

String mqttnoise 		"A1 Noise [%s]" 					{mqtt="<[mosquitto:broadlink/mqtt_A1_1/noise:state:default]"}
String mqttlight		"A1 Light [%s]"					{mqtt="<[mosquitto broadlink/mqtt_A1_1/light:state:default]"}
String mqtt_airquality	"A1 air_quality [%s]" 			{mqtt="<[mosquitto:broadlink/mqtt_A1_1/air_quality:state:default]"}
1 Like

good eyes!
and yes, only Switches don’t this configuration to Show up in UI.

1 Like

Thanks a lot!!!

it works!