Channels not responding

Hello!

After desciding to go back to openHAB and really try to get it to work properly I am still not much closer to solve my issue with channels that do not respond.

Outline:
I am experienced with openHAB v1.
Installed bindings: zwave, rfxcom (& some more not relevant)
I have ofc read the instructions and serached for answers to no avail
I have now stripped down my *.items and *.sitemap to only incluse my example and testing.
Things, Channels and Items have been created properly and in Simple mode.

Problem:
When I copy a channel name and try to activate a wallplug nothing happens.
It works perfectly fine in Control.
It works perfectly fine if I use the corresponding item in the channel directly in the sitemap (italic below).

In *.items: Switch WallPlug “Floorlamp test” { channel=“zwave:device:c6d54a79:node6:switch_binary” }
In *.sitemap: Switch item=WallPlug

In sitemap (working): Switch item=zwave_device_c6d54a79_node6_switch_binary

I did try with rfxcom binding and Things as well with the same outcome. Channel is not responding and using the Item directly in the Sitemap works fine.

Any thoughts and help out here?

Regards, Toby

Hi Toby, and welcome back! I’m confused as to what you mean by this:

If the item is working fine when you trigger it in your sitemap and your physical devices turns on/off, then it sounds like everything’s working. I don’t have experience with 1.x, but I wonder if you’re expecting something from the channel that perhaps no longer applies.

Thanks! I hope to stay now if only I can resolve this.

What I mean is that when I try to use the Channel to control the wallplug it will not work.
So as a part of testing the equipment I did try the direct call to the item, bypassing the channel.

Channel is new to openHAB2 and in v1 I relied solely on items.

Gotcha. I think you’ve misunderstood the channel. You need it in order to tell an item how to control a device, but you don’t use it for control purposes.

So, it sounds like your system is working properly.

openHAB2 also hasThings. You may want to review concepts.

Well, as I see it the Channels are a collection of ‘stuff’ you have available in your Thing. And this would minimize some of the administration since you need no longer have super long lists of items (hidden in simple mode). And the channel, according to the tutorial, could/should be used instead to control for isntance your wallplug or volume meter etc.

From the tutorial:

In *.items: 
Switch Wallplug_FF_LR_TV "Wallplug TV" <poweroutlet> { channel="zwave:device:bb4d2b80:node30:switch_binary" }
In *.sitemap:
sitemap default label="My first sitemap"
{
    Switch item=Wallplug_FF_LR_TV label="Wallplug TV"
}

If you are familiar with OH1 get rid of simple mode, it seems to lead people into roadblocks as soon as you get off the starting blocks. You’ve already got the idea about creating Items, sitemaps, etc. without automation.

I think you’ve missed the basic relationship

Items <-> channels <-> Thing <-> binding <-> external device/service

You normally operate with idealized Items in rules and sitemaps, same as you did in OH1
channels take care of matching vagaries of real devices to standardized Items

I was going to say this, and @rossko57 beat me to it.

All you actually need from PaperUI is to discover things so that the channels will be available to you. Then you’ll configure items for each channel that you want to use (and ignore the ones you don’t need). To control a device, you’ll change the state of its item and OH will communicate to the device through the channel.

Can you point to the section of the documentation that you’re referring to? I don’t see anything that I’d interpret this way, but if you’ve gotten this impression then perhaps something could be clarified.

rossko57 said it well. I’ll put it another way in case that helps your understanding.

OH 1.x did not have a concept of Things. In OH 1.x you directly configured the binding on the Item between the { }, plus a little more configuration in openhab.cfg.

In OH 2 a new concept of Things was added. A Thing represents a device. A device may have one or more actuators or sensors. These are represented as separate Channels. Channels, by themselves, don’t actually do anything. You can’t actually interact with them on the UIs, in Rules (except n a couple of cases I’ll ignore for now), nor on your sitemap. To interact with a Channel you must link the Channel to an Item. Then you interact with the Item.

Definitely turn off Simple mode. Even for newcomers it’s more trouble than it’s worth. What simple mode does is automatically create Items for you for all the Channels on all of your Things. And it creates them using the Channel ID as the Item name so you end up with asinine Item names like zwave_device_sdsdfas_node12_switch whenBedroomLamp would be much more appropriate. And as you notice, you can end up with hundreds of Items you just don’t want with Simple Mode. Furthermore, you can’t configure the Items through PaperUI in Simple Mode (e.g. change the icon or label).

In PaperUI, you can interact with Channels that have been linked to Items in the Control tab (which is probably what the tutorial is referring to), but even there, you are sending commands to the Items, not the Channels directly. The screenshot you took of the Channels is only for linking the Channel to one or more Items, not to send commands to the Channel. For some bindings, you can also configure the Channel from that page. But you can not command the Channel from that page.

Would it make sense to change it so that Simple Mode is off by default when PaperUI is installed? I know that PaperUI is on its way out, but it seems like this is pretty common advice after new users get stumped by it.

Simple Mode has been removed in OH 3.0…

2 Likes

Great. Yet another thing to look forward to in 3.0, even if it’s minor.

First off, thanks for all the feedback guys. I still have hopes to solve this problem of mine. :slight_smile:

This is precicely spot on. I do understand that in the end the command is actually down to the actual item (i.e the old command=switch_binary). And in the tutorial the do att the ‘item’ Wallplug_FF_LR_TV which in turn is a channel () linked to an item. They get a button/skider in the UI to actually turn on and off the lamp from this. When I do the sam, nothing happens, but when I do use the actual item in the sitemap it works like a charm, even with a newly self created item.

In OH 1.x I grouped items in various ways and used those groups to populate my UI in some places and this is my aim now as well. I am quite confused if you do not use channels like in the tutorial, If you do not use the channel (created from the Paper UI) to connect an item, how do you get the items up and running to your binding? And to me this sounds as if I would use OH 2.x shell but still code it as OH 1.x. But the motor is changed in OH 2 with the channel being a vital part in the whole interaction model.

But that’s a misconception - you do use, can only use a channel to link an Item to a version 2 binding.

We don’t know what tutorial you ar following.

It may be I use the wrong words here.
Looking at that example you see them creating a button in the Simple UI for the wallplug. They do this in *.items using a channel which in turn is linked to the actual item. And in the *.sitemap they use the name given in the *.items file. Thus creating a fully funtional button. When I do the same thing, nothing happens. Only if I use the actual item (regardless if it is created from simple mode or I create it myself) and that it is in turn linked to a channel.

Where are you looking at your Items? PaperUI is an administrator’s toolbox (why you can poke at channels, which are essentially hidden machinery). Sitemaps are used with the user-facing UIs, like BasicUI.
There is no problem creating an Item in an xxx.items file, but obviously any channel link ID given needs to be a valid one, as can usually be found from PaperUI.
“file based” Items created in that way cannot be manipulated from PaperUI.

If you turn off Simple Mode you can view your items. This is what I have done. Also I did try creating my own item and linking it to the correct channel. But still the probelm remains, Trying to create a button, followin the example and guide, nothing will happen. In the Paper UI when you remove Simple Mode you can click your Channel and it will reveal the actual item linked. I use the names from Paper UI, channel name, item name. It feels like the whole chain is there, but when it comes to ‘interacting’ with the channel (again, perhaps the wrong wording) with the channel to actually turn on the wallplug, nothing happens. I.e. I have done precicely as in the tutorial if that helps explaining.

*.items : Switch WallPlug “Floor lamp test” { channel=“zwave:device:c6d54a79:node6:switch_binary” } [channel name from Paper UI and valid if I can trust the Paper UI]

*.sitemap : Switch item=WallPlug [This is what I can using/manipulating/interacting. Creating the button for the Simple UI or any UI]

Above is explained in the tutorial and for me it seems it should work.

Do you understand what I mean now?

I also use the Paper UI to copy the channel ID into an Item link. There is even a copy button for that purpose.

Update in the matter.

So I went ahead and simply made a new clean install. Started new *.items & *.sitemap files. And there we go, it works like a charm.

Now I need to investigate and test out how to best creake the items and links. :slight_smile:
I have now clicked to add link and then had to select new item. But when I use the syntax for using the channel in the *.items file a new link to the channel is made. I will investigate if this is the best approach on how to add items and links as an overall strategy. But that’s another topic I guess.

Thanks for all your replies.