Tplinksmarthome - HS100 and HS110 - Cannot manual link item to 'Switch' channel

  • Platform information:
    • Hardware: Raspberry PI 3b
    • OS: OpenHABian
    • openHAB version:2.5.0.M1

I have a number of HS100 and HS100 TPLink smart sockets that I’m trying to automate through Paper UI and Node Red. These are being automatically discovered correctly, but I cannot connect items to the ‘Switch’ channel. When I try to do so through the paperui interface there are no choice to select for the profile. Upon submission the item is created, but it is not linked to the channel. no-profile-options

I had a dig through the http traffic and I can see a call to http://openhab.connect:8080/rest/profile-types?channelTypeUID=tplinksmarthome:switch which should return the profile options, but it is returning only an empty array:

[]

If I enable simple mode to automatically create items then the item creation and linking works perfectly, except that I cannot edit the item to assign it to the groups I need it to belong to.

I have tried the bundled binding, and also the beta version available through the Eclipse IoT marketplace, but both behave identically.

Are there any workarounds to force the profile options to become available? (Or to force my groups into the automatically created items?)

Welcome to openHAB!

I don’t know much about Node-RED, but I do have a lot of TP-Link devices. I use PaperUI to add bindings, configure services, and discover devices, but I (and many others) set up all of my items in configuration files. I’d recommend going that route, if only because it will make it easier to get advice from the community.

I don’t know why profiles is empty. But under Add-ons and transformations you can install additional profiles. Maybe that can help.

It should not be a problem of the binding because the binding doesn’t do anything with profiles. It’s on another abstraction level. So installing other versions is not going to make a difference.

Adding another transformation didn’t help. It appears on the other channels, but still no options are available for the ‘Switch’ channel. Where would be the right bug tracker to report this?

In the meantime I think I’ll transition to creating items in files. Paper UI still seems to have too many limitations in this area.

Can you restart openHAB and see if there are any errors reported in the log file?
Before reporting it would be helpful if we can determine if this is a real bug, or caused by some configuration error or other environment issue. I think the best place to report this is: https://github.com/openhab/openhab-core

On reboot I lost all the MQTT connection with mosquito (zigbee2mqtt) and had to move to the snapshot release (openHAB 2.5.0 Build #1582) to resolve that problem. On startup openhab.log now looks like this:

2019-05-01 15:44:40.787 [INFO ] [org.openhab.ui.paper                ] - FrameworkEvent INFO - org.openhab.ui.paper
org.osgi.framework.BundleException: The bundle class path entry "patch/" could not be found for the bundle "osgi.identity; type="osgi.bundle"; version:Version="2.5.0.201904160001"; osgi.identity="org.openhab.ui.paper""
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassPathEntry(ClasspathManager.java:174) ~[?:?]
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.buildClasspath(ClasspathManager.java:152) ~[?:?]
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.<init>(ClasspathManager.java:81) ~[?:?]
	at org.eclipse.osgi.internal.loader.EquinoxClassLoader.<init>(EquinoxClassLoader.java:43) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.createClassLoaderPrivledged(BundleLoader.java:316) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.getModuleClassLoader(BundleLoader.java:233) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.searchHooks(BundleLoader.java:503) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findResource(BundleLoader.java:600) ~[?:?]
	at org.eclipse.osgi.internal.loader.buddy.DependentPolicy.loadResource(DependentPolicy.java:82) ~[?:?]
	at org.eclipse.osgi.internal.loader.buddy.PolicyHandler.doBuddyResourceLoading(PolicyHandler.java:157) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findResource(BundleLoader.java:649) ~[?:?]
	at org.eclipse.osgi.internal.loader.buddy.DependentPolicy.loadResource(DependentPolicy.java:82) ~[?:?]
	at org.eclipse.osgi.internal.loader.buddy.PolicyHandler.doBuddyResourceLoading(PolicyHandler.java:157) ~[?:?]
	at org.eclipse.osgi.internal.loader.BundleLoader.findResource(BundleLoader.java:649) ~[?:?]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.getResource(ModuleClassLoader.java:200) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.getResource(EquinoxBundle.java:532) ~[?:?]
	at org.apache.servicemix.specs.activation.Activator.register(Activator.java:58) ~[?:?]
	at org.apache.servicemix.specs.locator.Activator.start(Activator.java:70) ~[?:?]
	at org.apache.servicemix.specs.activation.Activator.start(Activator.java:46) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:933) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309) ~[?:?]
	at org.eclipse.osgi.container.Module.doStart(Module.java:581) ~[?:?]
	at org.eclipse.osgi.container.Module.start(Module.java:449) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]
2019-05-01 15:45:00.723 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/London'.
2019-05-01 15:45:00.736 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to 'REDACTED,REDACTED'.
2019-05-01 15:45:00.743 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'en_GB'.
2019-05-01 15:45:00.745 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Measurement system set to 'SIUnits'.
2019-05-01 15:45:03.657 [WARN ] [.internal.element.HttpContextElement] - Registered http context [null] did not contain a valid http context id
2019-05-01 15:45:09.303 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rooms.items'
2019-05-01 15:45:09.477 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'tplinksmarthome.items'
2019-05-01 15:45:09.652 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'hue_lights.items'
2019-05-01 15:45:09.776 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'template.items'
2019-05-01 15:45:09.838 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'echo.items'
2019-05-01 15:45:09.966 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'presence.items'
2019-05-01 15:45:10.609 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
2019-05-01 15:45:10.639 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mapdb.persist'
2019-05-01 15:45:11.740 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
2019-05-01 15:45:11.864 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'FF_Office.sitemap'
2019-05-01 15:45:17.443 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-05-01 15:45:20.059 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.33:8080
2019-05-01 15:45:20.065 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.33:8443
2019-05-01 15:45:24.176 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'hue:0820:ecb5fa01d323:16' to inbox.
2019-05-01 15:45:25.678 [ERROR] [me.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.eclipse.smarthome.storage.json.internal.StorageEntry@11cf235'. Root cause is: org.eclipse.smarthome.automation.dto.RuleDTO cannot be found by org.openhab.core.automation_2.5.0.201905010305
2019-05-01 15:45:25.693 [ERROR] [me.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.eclipse.smarthome.storage.json.internal.StorageEntry@1239960'. Root cause is: org.eclipse.smarthome.automation.dto.RuleDTO cannot be found by org.openhab.core.automation_2.5.0.201905010305
2019-05-01 15:45:25.710 [ERROR] [me.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.eclipse.smarthome.storage.json.internal.StorageEntry@133c855'. Root cause is: org.eclipse.smarthome.automation.dto.RuleDTO cannot be found by org.openhab.core.automation_2.5.0.201905010305
2019-05-01 15:45:28.430 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'chromecast:chromecast:8b3cbf7d63efbbf7c6c81aa9ac231550' takes more than 5000ms.
2019-05-01 15:45:29.943 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'localhost' with clientid paho65506210495 and file store '/var/lib/openhab2/mqtt/localhost'
2019-05-01 15:45:29.990 [WARN ] [.MqttBrokerConnectionServiceInstance] - MqttBroker connection configuration faulty: host : You need to provide a hostname/IP!
2019-05-01 15:45:35.405 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2019-05-01 15:45:35.672 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-05-01 15:45:36.080 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2019-05-01 15:45:36.450 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel