[Solved] MQTT - OpenHab2 communication issue

Tags: #<Tag:0x00007f2fbbe69758> #<Tag:0x00007f2fbbe69410> #<Tag:0x00007f2fbbe691b8>

do you have the MQTT Action Add-on installed?

1 Like

No, I will provide immediately.

you shouldn’t :slight_smile:
there is a bug that creates a conflict between the MQTT Binding and the MQTT Action (same config pid), so don’t install the Action :slight_smile:

can you publish a new mqtt message (from MyMQTT) with 1 (instead of ON) payload to check what happens?

1 Like

Oh, ok :smile:
Tried with 1 (instead of ON) but nothing change.

what’s the log entry?

1 Like

Same message:

2018-11-22 21:31:44.283 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn’t post update for ‘MQTT_Test’

this is strange… your comms are fine
you can publish and subscribe
but the message that arrives in OH2 is somehow processed as NULL…
what is the corresponding entry in events.log?

1 Like

:scream:

I’ve tried many “ON” publish, and in the events.log I get:

2018-11-22 20:55:50.966 [vent.ItemStateChangedEvent] - MQTT_Test changed from NULL to ON

But I get it only one time and before my last publish, the last log is signed on 21:31 (and since 21:31 I’ve made like 4 publish)

does the Item publish anything to the broker when you send a command to it (toggle it from a sitemap)

you can try to enable debug log level using the console to see if something more comes up

log:set DEBUG org.openhab.binding.mqtt
1 Like

I can’t use log:set because I don’t have karaf :persevere:

I have made a demo.sitemap, switched the item 4 time on BASIC UI, and checked the log in the openhab log and this is the result:

2018-11-22 22:02:46.279 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'

2018-11-22 22:02:46.341 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'demo.sitemap'

2018-11-22 22:03:42.359 [WARN ] [basic.internal.render.SwitchRenderer] - Cannot determine item type of 'MQTTEST'

org.eclipse.smarthome.core.items.ItemNotFoundException: Item 'MQTTEST' could not be found in the item registry

at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.getItem(ItemRegistryImpl.java:70) [109:org.eclipse.smarthome.core:0.10.0.b1]

at org.eclipse.smarthome.ui.internal.items.ItemUIRegistryImpl.getItem(ItemUIRegistryImpl.java:724) [155:org.eclipse.smarthome.ui:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.SwitchRenderer.renderWidget(SwitchRenderer.java:55) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.renderWidget(PageRenderer.java:172) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:137) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:158) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processPage(PageRenderer.java:100) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:159) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]

at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [85:org.eclipse.jetty.security:9.3.22.v20171030]

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.Server.handle(Server.java:534) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [79:org.eclipse.jetty.io:9.3.22.v20171030]

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [79:org.eclipse.jetty.io:9.3.22.v20171030]

at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [79:org.eclipse.jetty.io:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at java.lang.Thread.run(Thread.java:748) [?:?]

2018-11-22 22:03:42.369 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'MQTTEST' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:03:42.372 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:03:42.375 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'MQTTEST' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:03:42.379 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'MQTTEST' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:03:42.381 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'MQTTEST' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:03:44.190 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MQTTEST' for the unknown item 'MQTTEST'.

2018-11-22 22:03:46.131 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MQTTEST' for the unknown item 'MQTTEST'.

2018-11-22 22:03:48.123 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MQTTEST' for the unknown item 'MQTTEST'.

? what do you have ?
which version of openHAB 2 are you running? (2.2 , 2.3, other?)

Your demo.sitemap has a reference to MQTTEST instead of MQTT_Test

1 Like

I don’t have nothing, i use only linux command via SSH.

openHAB 2.2.0 Release Build

Changed and the result is:

2018-11-22 22:27:13.690 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'demo.sitemap'

2018-11-22 22:27:25.407 [WARN ] [basic.internal.render.SwitchRenderer] - Cannot determine item type of 'MQTT_TEST'

org.eclipse.smarthome.core.items.ItemNotFoundException: Item 'MQTT_TEST' could not be found in the item registry

at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.getItem(ItemRegistryImpl.java:70) [109:org.eclipse.smarthome.core:0.10.0.b1]

at org.eclipse.smarthome.ui.internal.items.ItemUIRegistryImpl.getItem(ItemUIRegistryImpl.java:724) [155:org.eclipse.smarthome.ui:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.SwitchRenderer.renderWidget(SwitchRenderer.java:55) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.renderWidget(PageRenderer.java:172) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:137) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:158) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processPage(PageRenderer.java:100) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.smarthome.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:159) [217:org.eclipse.smarthome.ui.basic:0.10.0.b1]

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]

at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [85:org.eclipse.jetty.security:9.3.22.v20171030]

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [88:org.eclipse.jetty.servlet:9.3.22.v20171030]

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [191:org.ops4j.pax.web.pax-web-jetty:6.0.7]

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.Server.handle(Server.java:534) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [87:org.eclipse.jetty.server:9.3.22.v20171030]

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [79:org.eclipse.jetty.io:9.3.22.v20171030]

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [79:org.eclipse.jetty.io:9.3.22.v20171030]

at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [79:org.eclipse.jetty.io:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [90:org.eclipse.jetty.util:9.3.22.v20171030]

at java.lang.Thread.run(Thread.java:748) [?:?]

2018-11-22 22:27:25.419 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'MQTT_TEST' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:27:25.423 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:27:25.427 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'MQTT_TEST' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:27:25.431 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'MQTT_TEST' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:27:25.435 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'MQTT_TEST' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-11-22 22:27:27.003 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MQTT_TEST' for the unknown item 'MQTT_TEST'.

2018-11-22 22:27:28.058 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MQTT_TEST' for the unknown item 'MQTT_TEST'.

2018-11-22 22:27:31.054 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/MQTT_TEST' for the unknown item 'MQTT_TEST'.

OH2.2 is based on Karaf as the core engine.

read the console docs entry on how to use the console.

post your sitemap and your item configs please using: How to use code fences

1 Like

My bad, I will read the docs :sweat:

Thanks for the advice! :smile:
I unfortunately did not see the icons because of a bug caused by MacOS Mojave in Dark Mode (reported).

Items config:


Switch MQTT_Test "Testing..." { mqtt="<[oh2broker:testing/mqtt/topic:state:default], >[oh2broker:testing/mqtt/back-topic:command:*:default]" }
// ^-- Item Type              ^-- Item linked Channel
//         ^-- Item Name              ^-- Inbound MQTT configuration              ^-- Outbound MQTT configuration
//                   ^-- Item Label

Sitemaps config:

sitemap demo label="TEST" {
    Frame label="MQTT" {
        Switch item=MQTT_TEST icon="light"
    }
}

try:

Switch item=MQTT_Test icon="light"

I don’t remember sitemaps to be so strict with case but you never know… :slight_smile:

1 Like

On openhab.log i don’t have any input, on events.log i get:

2018-11-22 23:01:30.773 [ome.event.ItemCommandEvent] - Item 'MQTT_Test' received command ON
2018-11-22 23:01:30.799 [vent.ItemStateChangedEvent] - MQTT_Test changed from OFF to ON
2018-11-22 23:01:34.437 [ome.event.ItemCommandEvent] - Item 'MQTT_Test' received command OFF
2018-11-22 23:01:34.453 [vent.ItemStateChangedEvent] - MQTT_Test changed from ON to OFF
2018-11-22 23:02:41.683 [ome.event.ItemCommandEvent] - Item 'MQTT_Test' received command ON
2018-11-22 23:02:41.704 [vent.ItemStateChangedEvent] - MQTT_Test changed from OFF to ON

this is due to you toggling the switch on the sitemap or due to incoming mqtt messages?

1 Like

Toggling the switch, also the switch name on BASIC UI has changed from: “MQTTEST” to “Testing…”
Now it seems to work, but BASIC HUB does not recognize changes in real time. When publications are sent via devices, I do not see changes in the panel.

As test, I tried to connect a DHT22 via ESP8266 using the Homie framework. From the shell I can see the messages that are regularly received, but nothing can be seen from the panel.

/var/log/mosquitto/mosquitto.log

1543000990: New connection from 192.168.1.8 on port 1883.
1543000990: New client connected from 192.168.1.8 as Homie-termostato (c1, k15).
1543000990: Sending CONNACK to Homie-termostato (0)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m1, 'homie/termostato/$homie', ... (5 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 1)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m2, 'homie/termostato/$mac', ... (17 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 2)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m3, 'homie/termostato/$name', ... (10 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 3)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m4, 'homie/termostato/$localip', ... (11 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 4)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m5, 'homie/termostato/$stats/interval', ... (2 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 5)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m6, 'homie/termostato/$fw/name', ... (10 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 6)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m7, 'homie/termostato/$fw/version', ... (5 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 7)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m8, 'homie/termostato/$fw/checksum', ... (32 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 8)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m9, 'homie/termostato/$implementation', ... (7 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 9)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m10, 'homie/termostato/$implementation/config', ... (245 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 10)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m11, 'homie/termostato/$implementation/version', ... (5 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 11)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m12, 'homie/termostato/$implementation/ota/enabled', ... (5 bytes))
1543000990: Sending PUBACK to Homie-termostato (Mid: 12)
1543000990: Received PUBLISH from Homie-termostato (d0, q1, r1, m13, 'homie/termostato/temperature/$type', ... (11 bytes))

$OPENHAB_CONF/logs/openhab.log

2018-11-23 20:13:31.996 [WARN ] [g.dispatch.internal.ConfigDispatcher] - Could not parse line 'pid:org.openhab.mqtt'
2018-11-23 20:13:32.584 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to it_IT, Location set to null, Time zone set to Europe/Rome
2018-11-23 20:13:34.155 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.1.254:8080
2018-11-23 20:13:34.168 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.1.254:8443
2018-11-23 20:13:42.530 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.items'
2018-11-23 20:13:43.309 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2018-11-23 20:13:47.081 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2018-11-23 20:13:47.733 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
2018-11-23 20:13:50.256 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2018-11-23 20:13:50.261 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'oh2broker'
2018-11-23 20:13:51.976 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-11-23 20:13:52.486 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2018-11-23 20:13:52.571 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-11-23 20:13:52.751 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2018-11-23 20:13:52.913 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-11-23 20:17:52.225 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2018-11-23 20:17:52.228 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperatura' for widget org.eclipse.smarthome.model.sitemap.Text
2018-11-23 20:17:52.231 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperatura' for widget org.eclipse.smarthome.model.sitemap.Text
2018-11-23 20:17:52.232 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Temperatura' for widget org.eclipse.smarthome.model.sitemap.Text

$OPENHAB_CONF/logs/events.log don’t recognine anything

$OPENHAB_CONF/sitemaps/demo.sitemap

sitemap demo label="TEST" {
    Frame label="MQTT" {
        Switch item=MQTT_Test icon="light"
        Text item=Temperatura
    }
}

$OPENHAB_CONF/items/test.items

Switch MQTT_Test "Testing..." { mqtt="<[oh2broker:testing/mqtt/topic:state:default], >[oh2broker:testing/mqtt/back-topic:command:*:default]" }
Text Temperatura "Temperatura in °C" { mqtt="<[oh2broker:homie/termostato/temperature/temperature:state:default]"}

This command on the shell:

mosquitto_sub -h localhost -t "homie/#" -v

give me this output:

homie/termostato/$homie 2.0.0
homie/termostato/$mac CC:50:E3:0C:CD:09
homie/termostato/$name Termostato
homie/termostato/$localip 192.168.1.8
homie/termostato/$stats/interval 60
homie/termostato/$stats/signal 84
homie/termostato/$stats/uptime 424
homie/termostato/$fw/name demo-dht22
homie/termostato/$fw/version 1.0.0
homie/termostato/$fw/checksum 222a0c5e624c4bbee4ea4d46d62ac841
homie/termostato/$implementation esp8266
homie/termostato/$implementation/config {"name":"Termostato","device_id":"termostato","device_stats_interval":60,"wifi":{"ssid":"InfostradaWiFi-002016"},"mqtt":{"host":"192.168.1.254","port":1883,"base_topic":"homie/","auth":false},"ota":{"enabled":false},"settings":{"percentage":55}}
homie/termostato/$implementation/version 2.0.0
homie/termostato/$implementation/ota/enabled false
homie/termostato/$online true
homie/termostato/temperature/$type temperature
homie/termostato/temperature/temperature 20.70
homie/termostato/temperature/json {"t":20.70,"unit":"c"}
homie/termostato/humidity/$type humidity
homie/termostato/humidity/humidity 75.80
homie/termostato/humidity/json {"h":20.70,"unit":"%"}
Number Temperatura "Temperatura [%.2f °C]" { mqtt="<[oh2broker:homie/termostato/temperature/temperature:state:default]"}

The Text is a sitemap element (not an Item type). To get temp readings, use a Number Item.

  1. https://www.openhab.org/docs/concepts/items.html#items
  2. https://www.openhab.org/docs/configuration/sitemaps.html#sitemaps

what do you mean? If you send a MQTT message to topic testing/mqtt/topic with payload OFF it will turn off the switch in your BasicUI. It doesn’t?

That’s normal since this is the label of the Item with name MQTT_Test (Label is not the same as Name)

1 Like

Now works! Thank you so much for the support :partying_face:

1 Like