Linking items not working - can't find the mistake

hi,

i’ve installed 3 tp-link hs110 smart plugs. I created items and thing files for all of them by manually setting up the first one and then i copied and edited it by searching and replacing the different names/ips.

However, after i’ve setup a habpanel one of them was not working showing “null” as current power consumption. I’ve found out that in the paperui under things the one that is not working was not showing any links unlike the others. When i manually linked it using the menu in the paperui it works but i would like to understand what went wrong as i did not manually link any of the others in the paperui.

I thought the linking is done in the items file via the channel - is that wrong?
This ís the content from the 2 item files the top one does not work the bottom one does. Any advice on how i can figure out what i messed up?

Number Socketwz_power “Socketwz_power” { channel=“tplinksmarthome:hs110:Socketwz:power” }

Number Socketkitchen_power “Socketkitchen_power” { channel=“tplinksmarthome:hs110:Socketkitchen:power” }

That is correct.
PaperUI will show the needed syntax for the channel in any case ( things created via PaperUI as well as created via .things file). Make sure the used channel-string is correct.

1 Like

With the given information the best we can offer is perhaps there is a typo in the channel definition on the Item.

Correct, the linking, when using .items files, is done using the channel definition. But note that it is not an error if you have a channel defined that doesn’t exist, hence the typo theory.

Double check the channel ID and make sure it matches exactly, including case. Remove the Link you created through PaperUI first though. OH can get confused when it’s linked in both ways which may pop up later when you attempt to remove the Item.

With the given information the best we can offer is perhaps there is a typo in the channel definition on the Item.

Sorry, i started with openhab 2 days ago and have a though time getting into it.
I thought the mistake can only be in either the thing or the item file and as the thing file was only one line i thought i can not have messed it up. Oh boy, was i wrong.

Double check the channel ID and make sure it matches exactly, including case. Remove the Link you created through PaperUI first though. OH can get confused when it’s linked in both ways which may pop up later when you attempt to remove the Item.

Well, apparently i did not use search replace for the things file because it was only one line…
One “s” wasn’t capitalized and now it works. Thanks a lot.

1 Like