TP-Link Kasa devices Can be Controlled in Paper UI but not in Basic UI

  • Platform information:
    • Hardware: Raspberry Pi 3 B+
    • OS: Openhabian
    • Java Runtime Environment: HAB2

HI Everyone,

OpenHAB Newb here. I trying to set up my first OpenHAB controller. I have a house full of TP-Link Kasa outlets and light bulbs, and successfully installed and set up OpenHabian on my Raspberry Pi 3B+. I installed the TP-Link Smart Home Binding, and am able to discover and control everything in Paper UI. I created my first .items file and set it up with just a single KL130 light bulb to try it out. I then set up a .sitemap with a slider for that 1 light bulb. I have tried setting the item to different channels for this and other Kasa light bulbs and none of them work from the Basic UI even though they work from the Paper UI. What am I doing wrong?

We are going to need to see the items and sitemap files as well to have a much of a chance of helping here. The error is almost certainly somewhere in those two files, but without seeing those files we can’t begin to guess where.

So did you create a things file? or did you create the things in Paper UI? The point is. There is no difference for the binding between Paper UI and Basic UI. So it must be something related to what you have configured. So read the documentation page of the the binding. It contains examples of the textual configuration for this binding and compare with what you have created and what is missing.

Thank you for your kind responses.

I did not define a thing file, but I did define and configure the Things via Paper UI. Would I still be able to control them in Paper UI if I hadn’t? (I am honestly asking. I do not know.)

Below is my .items file

Dimmer Light “Bedroom Light” { channel=“tplinksmarthome:kl130:7F3DAF:color” }

and this is my .sitemap

sitemap test label=“Test Sitemap” {
Switch item= Light icon=“switch”

I don’t work with the kasa bulbs myself, but I suspect the issue is your item definition. You are correct to use the color channel for the item, but there is also a color item type to match to that, and the color item can handle on/off switching, dimming, and color change through different sitemap elements.

Color Light "Bedroom Light" { channel="tplinksmarthome:kl130:7F3DAF:color" }

Should work with Switch, Slider, and Colorpickersitemap elements.

There is also a possible issue in that the quotation marks in your example files are “smart” quotation marks (your document editor has automatically changed simple " to fancy “ and ”). I don’t know if this is true in the original file or if it is an artifact of how you pasted the text into the post. If those are in the original file then the parser may be incorrectly processing your items and sitemaps files. If you are seeing errors in the logs, this may be the reason.

1 Like

I think I figured it out, though I don’t really understand it.

The key was JustinG referencing the errors in the logs. When I read the logs more carefully I saw that the system was not able to resolve the item type.

I had created all of the things and items using autodiscovery and Simple Mode in Paper UI, but the items created by that process were only recognizable to Paper UI for some reason. When I manually created the linked item through the Thing’s interface then it began working.