-
Issue of the topic:
I am follow the MQTT example here, but the switch state is not published over MQTT.
https://docs.openhab.org/addons/bindings/mqtt1/readme.html -
Platform information: Raspberry Pi 2 B
- Hardware: Raspberry Pi 2 B
- OS: Archlinux ARM
- Java Runtime Environment: Zulu 8
- openHAB version: 2
In the log i see the following errors:
2018-01-21 00:44:26.559 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard
2018-01-21 00:44:50.944 [INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder
2018-01-21 00:44:53.393 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.0.10:8080
2018-01-21 00:44:53.415 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.0.10:8443
2018-01-21 00:45:10.493 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2018-01-21 00:45:12.563 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'
2018-01-21 00:45:17.367 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-01-21 00:45:17.555 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-01-21 00:45:17.766 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-01-21 00:45:18.349 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2018-01-21 00:45:18.357 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'mosquitto'
2018-01-21 00:45:27.694 [WARN ] [basic.internal.render.SwitchRenderer] - Cannot determine item type of 'mySwitch'
org.eclipse.smarthome.core.items.ItemNotFoundException: Item 'mySwitch' 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) [196:org.eclipse.smarthome.ui.basic:0.10.0.b1]
at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.renderWidget(PageRenderer.java:172) [196:org.eclipse.smarthome.ui.basic:0.10.0.b1]
at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:137) [196:org.eclipse.smarthome.ui.basic:0.10.0.b1]
at org.eclipse.smarthome.ui.basic.internal.render.PageRenderer.processPage(PageRenderer.java:100) [196:org.eclipse.smarthome.ui.basic:0.10.0.b1]
at org.eclipse.smarthome.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:159) [196: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:745) [?:?]
2018-01-21 00:45:27.738 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'mySwitch' for widget org.eclipse.smarthome.model.sitemap.Switch
2018-01-21 00:45:27.747 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch
2018-01-21 00:45:27.751 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'mySwitch' for widget org.eclipse.smarthome.model.sitemap.Switch
2018-01-21 00:45:27.763 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'mySwitch' for widget org.eclipse.smarthome.model.sitemap.Switch
2018-01-21 00:45:27.766 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'mySwitch' for widget org.eclipse.smarthome.model.sitemap.Switch
- Please post configurations (if applicable):
- Items configuration related to the issue
Switch mySwitch {mqtt=">[mybroker:myhouse/office/light:command:ON:1],>[mybroker:myhouse/office/light:command:OFF:0]"}
Switch mySwitch {mqtt=">[mybroker:myhouse/office/light:command:ON:1],>[mybroker:myhouse/office/light:command:*:Switch ${itemName} was turned ${command}]"}```
* Sitemap configuration related to the issue
```php
sitemap default label="My first sitemap"
{
Switch item=mySwitch label="Office Light"
}