Tellstick duo + raspberry pi + openHab: binding issues

Hi!

I’ve tried for a while getting my openhab-setup working but now I’m stuck.

I installed the tellstick software, and everything works (i.e. I can control my switches with the tdtool command).

I then installed openhab 1.8.3 and I can access my sitemap via the web browser. Once this was done I downloaded the latest addons and added the “org.openhab.binding.tellstick-1.8.3.jar” to the addons folder. So far so good. The teslldus core seem to start as it is suppose to (see logfile) but I can’t get my switch to work!

I get the error message

2016-06-30 16:46:08.456 [WARN ] [.w.internal.servlet.CmdServlet] - Received command ‘TOGGLE’ for item ‘Window’, but the item does not exist in the registry

My item code is:

openHab Freddy
Group Window

Switch Window “Window” {tellstick=“Window:3”}

My stitemap code is:

sitemap home label=“My Home”
{
Frame label=“Window” {
Switch item=Window
}
}

And the tellstick config for the device is:

device {

id = 3
name = "Window"
controller = 0
protocol = "arctech"
model = "selflearning-switch:nexa"
parameters {

devices = “”

house = "17001462"
unit = “14”

code = “”

system = “”

units = “”

fade = “”

Here is the output when I start openHab:

Launching the openHAB runtime…
osgi> 2016-06-30 16:38:19.060 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.3).
2016-06-30 16:38:24.606 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2016-06-30 16:38:24.747 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Disco very initialization completed.
2016-06-30 16:38:33.072 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'freddy.sitemap’
2016-06-30 16:38:33.078 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-06-30 16:38:33.701 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'freddy.items’
2016-06-30 16:38:39.320 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Class ic UI at /classicui/openhab.app
2016-06-30 16:38:44.582 [INFO ] [.b.t.internal.TellstickBinding] - Activate Thre ad[Component Resolve Thread (Bundle 98),10,main]
2016-06-30 16:38:44.593 [INFO ] [.b.t.internal.TellstickBinding] - Called with c onfig null
2016-06-30 16:38:44.596 [INFO ] [.b.t.internal.TellstickBinding] - Loading telld us-core from system default paths
2016-06-30 16:38:44.598 [WARN ] [.b.t.internal.TellstickBinding] - Will do a rei nit of listeners, no message received for 600 seconds
2016-06-30 16:38:44.600 [INFO ] [.b.t.internal.TellstickBinding] - Listeners rem oved
2016-06-30 16:38:44.870 [INFO ] [.b.t.internal.TellstickBinding] - Telldus reset
2016-06-30 16:38:44.878 [INFO ] [.b.t.internal.TellstickBinding] - Listeners res tarted
2016-06-30 16:38:44.882 [INFO ] [.service.AbstractActiveService] - Telldus Sync Service has been started
2016-06-30 16:40:06.879 [WARN ] [.o.u.w.i.render.SwitchRenderer] - Cannot determine item type of 'Window’
org.openhab.core.items.ItemNotFoundException: Item ‘Window’ could not be found in the item registry
at org.openhab.core.internal.items.ItemRegistryImpl.getItem(ItemRegistryImpl.java:80) ~[na:na]
at org.openhab.ui.internal.items.ItemUIRegistryImpl.getItem(ItemUIRegistryImpl.java:554) ~[na:na]
at org.openhab.ui.webapp.internal.render.SwitchRenderer.renderWidget(SwitchRenderer.java:57) ~[org.openhab.ui.webapp_1.8.3.jar:na]
at org.openhab.ui.webapp.internal.render.PageRenderer.renderWidget(PageRenderer.java:158) [org.openhab.ui.webapp_1.8.3.jar:na]
at org.openhab.ui.webapp.internal.render.PageRenderer.processChildren(PageRenderer.java:121) [org.openhab.ui.webapp_1.8.3.jar:na]
at org.openhab.ui.webapp.internal.render.PageRenderer.processChildren(PageRenderer.java:138) [org.openhab.ui.webapp_1.8.3.jar:na]
at org.openhab.ui.webapp.internal.render.PageRenderer.processPage(PageRenderer.java:86) [org.openhab.ui.webapp_1.8.3.jar:na]
at org.openhab.ui.webapp.internal.servlet.WebAppServlet.service(WebAppServlet.java:127) [org.openhab.ui.webapp_1.8.3.jar:na]
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na]
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na]
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet_3.0.0.v201112011016.jar:na]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598) [org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486) [org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413) [org.eclipse.jetty.servlet_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.Server.handle(Server.java:350) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944) [org.eclipse.jetty.server_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630) [org.eclipse.jetty.http_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230) 20522.jar:8.1.3.v20120522]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnecti er_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn .io_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEnd o_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo _8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool 8.1.3.v20120522.jar:8.1.3.v20120522]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
2016-06-30 16:40:06.887 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrie ab.model.sitemap.Switch
2016-06-30 16:40:06.890 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrie ab.model.sitemap.Switch
2016-06-30 16:40:06.894 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrie ab.model.sitemap.Switch
2016-06-30 16:40:06.896 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrie ab.model.sitemap.Switch
2016-06-30 16:40:43.436 [WARN ] [.w.internal.servlet.CmdServlet] - Received comm the item does not exist in the registry
2016-06-30 16:46:08.456 [WARN ] [.w.internal.servlet.CmdServlet] - Received command ‘TOGGLE’ for item ‘Window’, but the item does not exist in the registry

#Any ideas?
//F

The names of all your Items and Groups must be unique. You have both a Group and a Switch named “Window”. Furthermore, “openHAB Freddy” doesn’t mean anything and is likely causing openHAB to be unable to parse the Items file in the first place.

I realized that the “openHab Freddy”-comment I wanted to had the wrong commenting (I used “#” to comment…). Silly misstake…

I did change the Switch name and now it is working as planned! Thanks for helping me debug Rich!

I’ve done multiple attempts to get this to work, and I’ve found that the procedure that worked for me was:

  • Install rasbian (I used “2016-05-27-raspbian-jessie”)
  • Expand file system
  • Test the tellstick system and ensure it is working properly (the tdtool --on/off command to turn on/off a switch for example)
  • Test so that openHab is working (http://raspberrypi.local:8080/), i.e. you get a response from the server (showing a “HTTP Error 500” in the web browser).
  • Create a simple item and a sitemap and make sure it is working (connect to raspberrypi.local:8080/openhab.app?sitemap=
  • Install the tellstick addon by downloading and unziping the addons-zip file (I used distribution-1.8.3-addons) to a temporary folder (downloaded from openHab). Then move the org.openhab.binding.tellstick-1.8.3.jar to the /openhab/addons/ folder.
  • Start openHab and ensure that the tellstick services are starting (you should see “Telldus Sync Service has been started”).
  • Hopefully you should be able to control things via the web interface now (if you managed to get the item file …

Next step for me is to add the Z-wave functionality to my raspberry…

If you are on a Debian based linux (which Raspbian is) the preferred way to install openHAB 1.8.x is through apt-get as documented here:

The big thing that hangs people up with that is making sure that whatever user openHAB is running under (openhab if you install via apt-get) has permission to read/write the USB device. This is usually easily achieved by adding the openhab user to the dialout group on Raspbian.