Disable/Enable Channel

  • Platform information:
    • Hardware: Pi4/2Gb/32Gb
    • OS: Raspbian v?
    • Java Runtime Environment: unsure, not the ‘real’ java the other one
    • openHAB version: 2.something

Issue of the topic: I’d like to know what I need to do to stop any of my channels from doing anything.

Like, stop a microphone listening entirely, or stop the PIR channel on a sensor, or something. This then saves power, pointless actions, and annoyance. It doesn’t really matter why I want it to happen, I would just like it to happen. I’d like to stress that it doesn’t matter what, because I would not like to go down rabbit holes about specific things.

I’m not talking about stopping their rules from running based on a technicality … I’m talking about stopping all Item activity for a given Item. Nothing. Zip. Nada.

I literally don’t know where to start … I’ve looked at about 20 different threads, and since couldn’t find anything I closed them all in frustration (I run inPrivate browsing, so they’re in the wind) and stomped off. I’ve tried a few different StartPage searches including openhab item disable -"thread::sleep", openhab item sleep -"thread::sleep", and openhab disable Channels.

I’d just like to know what settings I use to … AGH … to do what I’ve just done … now I can’t get it back! I clicked this in the Paper UI … now the motion detector channel is gone. :weary:


Looks like I’ll raise that separately. :cry:

OK … So now more than every I need a way to disable/enable a channel, apparently like you can do in Paper UI, as I just did there.

So, let’s just assume that I’ve got a dummy switch ready and waiting to get this done, I’m comfortable with basic rules, but I must stress, I do not want to mute a channel, I’d like it to stop acting completely. Here’s my fake switch, ready to go:

Switch mmmEye_1_m "Moony Sleepy Eye"

What do I do with this to put any channel of a thing to sleep/disabled status?

((( ftr i got something ‘like’ the original channel back, but I dunno if it’s working properly yet … will raise that when i have it )))

Threads that don't help

"disable" switch item - #13 by rlkoshak
Temporarily disabling Things altogether - #7 by RayMYP
Enable / Disable Rules (SOLVED) - #4 by Sharpy
Disable Hue Motion Sensor - #2 by cweitkamp
Motion sensor disable during a Movie - #23 by dastrix80
[SOLVED] Enabling and disabling Things from for example Basic UI - #10 by techlov3r
Configuration though Paper UI | openHAB

If you want to go down to the hardware level then it’s something that has to be build into the device itself. It’s not something that OH is going to be able to do. All OH does is send and receive messages with these devices. It can ignore those messages but it can’t prevent the device from sending them in the first place.

You can disable an entire Thing. In MainUI there is a pause icon. Click that and the Thing will become unloaded and neither it nor any Items linked to those channels will receive or respond to events. But you can’t disable individual Channels.

You can’t disable an Item. You can remove the Item though. Just delete it and there won’t be any interactions or events from that Item.

You can unlink the Item from the Thing. The bindings usually ignore events from devices that are on Channels not actively linked to an Item. That will prevent the Item from receiving events from the Channel too, but it won’t prevent the Item from receiving events from elsewhere (e.g. an OH Rule).

This cannot be done. You’ve pretty much eliminated all the other ways OH could support this because “reasons” so we are really kind of left with you can’t do it. What you want to do is simply not supported by OH in any way or fashion. It’s an event driven system. If you don’t want to deal with an event, you ignore it, you don’t suppress it so that the event doesn’t happen in the first place.

You’ve provided no information about what you did to accidentally delete a Channel so I can’t help with that. I’ll wait your other thread.

Hi, @rlkoshak , thanks for the response.

I’m curious … how did I manage to disable the channel in the UI just now?

I also thought I’d mentioned that … I tapped the button in the image.

( i still don’t know if it’s completely borked it :weary:)

It’s well over a year at this point since the last time I did anything with PaperUI. My recollection is that the blue “button” is an indication of whether or not the Channel is linked to an Item. It’s not actually a button at all. I’m aware of nothing that you would click on in PaperUI that would cause a Channel to disappear on an auto-discovered Thing. In MainUI for sure there is no way to do it that I can see.

Some bindings support Things where you create Channels manually (e.g. MQTT) and of course you can add and remove Channels for those. But not on automatically discovered Things.

If you are worried about having borked the Thing, simply delete the Thing, go to the Inbox and run a scan. It should pop right back up there where you can accept it and you should be right back to where you started. Even the links to your Items will be preserved but since you’ve recreated the Thing the missing Channel should be back.

Aye, sorry, but it definitely did something weird and totally disabled that channel. It stopped doing anything.

I added the item in another window (I had to disable easy mode or something) and associated it … but it still wouldn’t do anything.

… until 5m ago when I did a massive bout of pressing the wakeup button … now it’s more active than ever! :sweat_smile:

Still, at least the flashing light setting has been found.

So … even though it seems that we can clearly disable a channel … we can’t disable a channel. :cry:

I think it’s probably more accurate to say you broke the channel somehow. That’s not quite the same as disabling.

I literally clicked on the blue circle and that ‘broke’ it … feels like they labelled the “launch nukes” button with “send for cakes” if that’s the case.

Take a step back here … your attempt to use the system in ways that were not envisaged to “save annoyance” seem themselves to be causing you plenty of annoyance.

If you just want to ignore something, then just ignore it.
If you want to disable a Thing with all its channels, then disable it.

Disabling selective channels doesn’t make sense - some device might have an ON/OFF channel and a brightness channel. Bonkers to disable only one.

I get that … but I’m just trying to economise more than anything else … the annoyance is secondary (and mostly gone).

But channels don’t cost anything.

oh, my bad … sorry … wait … so if something is running all the time, is that not eating up power?

What ‘something’? A channel is just a conceptual, abstract data source inside a big chunk of software. It doesn’t cost anything to call it into existence or to have it pass data.
As it happens, the way we use them, a channel probably roughly corresponds to a part of control/data on some external device or service.
But if we disable the channel representing “forecast wind speed” it will not close down the external weather service, if we disable the channel for “sunset time” it does not stop the Sun in its course, if we disable the channel for “motion detected” it does not turn off the detector.

Sorry, you lost me there.

There’s a setting in some things to disable certain parts of them, like this Coolcam PIR has a ‘disable / enable PIR detection’ … If I turned that off, is it still going to run and cost power?

Apples to oranges. You are talking about turning off a feature of a device at the device. As I mentioned in my first reply, that’s the only way you are going to actually cause no communication to occur on a given Channel.

Short of that, turning off a Channel isn’t going to cause the device to stop reporting. At best it will cause OH to simply ignore that message, but OH will still have to process the message. And if you want to simply ignore the message then just don’t link an Item to the Channel and the binding will ignore those messages. But it’s still going to receive the messages and parse them enough to know whether the message needs to be ignored.

But let’s assume that disabling a Channel were possible and doing so saved some processing power. It’s not going to be enough savings to be measurable. Channels barely use up enough RAM to be measurable. Your time and efforts are better spent looking elsewhere for economies.

Cheers … Out of curiousity … if that setting is in the Paper UI … is that turning it off at the device, or at the UI?

It depends on the device and the technology. Many devices have configuration parameters that can be set from OH. For example, I can change a parameter on one of my Zwave light switches to turn on/off the status light. So in that case it’s changing it at the device.

However, if you somehow disabled that Channel in PaperUI, that would only change OH. The camera would still be performing the PIR sensing and reporting it. OH would just be ignoring those messages.

If you want to stop the activity, you have to stop it on the device. Disabling a Channel will not stop the device from doing the activity.

1 Like

OK, cool, thanks.

I’ll work out how to send the command to enable/disable those settings I’ve found.

Much obliged!

I thought that was pretty clear.
If you want to send an instruction from openHAB to a device to “turn yourself off”, then openHAB is going to need an active channel to send that instruction …