Two channels for dimmer item?

Hello Openhab Community,

Is it possible to configure two channels for one dimmer item?

One for the silder and one for the on/off switch?

Thanks,
Raju Namburi

Yes, but it probably depends on the binding implementation. I do this for Insteon and Hue switches/dimmers. Theoretically, the dimmer widgets have support for fast on/off which can remove the need for a switch. However, the sliders don’t work well for me from a browser (Chrome, Mac OS X).

Speaking of that, is there anyone working on making the sliders work in Chrome?

Hello Steve,

Thanks. I have implemented a binding. In the thing-type xml file, I created a channel of type Dimmer. This is coming up fine on the UI and the state update of the on/off switch and the dimmer slider are also fine. The problem, both are reported on the same channel. I want to use two different channel for this.

When i add a new channel, It is showing up in the UI which i want to avoid.

Thanks,
Raju

Raju, my response was for OH1. Maybe someone else can give an answer for OH2.

thanks steve.

More details about my question. I am using OH2 and implementing a binding. Here is one of my thing descriptions.

<thing-type id="SomeLabel">
    <label>LabelName</label>
    <description>Description</description>

    <channels>            
        <channel id="slide" typeId="slide"/>                                   
    </channels>
    
    <!-- Configuration description is mandatory even without parameters -->
    <config-description>
    <parameter name="switchId" type="text">
            <label>Unique Switch Name</label>
            <description>The SwitchID identifies a Switch</description>
	        <required>true</required>
    </parameter>        
    </config-description>        
</thing-type>   
<channel-type id="slide">
    <item-type>Dimmer</item-type>
    <label>Control</label>
    <description>Increase/Decrease speed</description>
</channel-type>  

The on/off button & slider in this dimmer are bound to a single channel, I am looking to bind them to two different channels.

Thanks,
Raju

Hi Raju,
I guess, you are talking about the dimmer widget in paper ui.
The On/Off switch will change dimming level from 0 to 100, but you can always define a second channel for switching. The WeMo LED lights e.g. have a seperate “binary state”, so in the upcoming version of the binding, i created two channels, one for brightness, one for state. Both channels are synchronized within my code. If brightness set to 0, state is updated to off, if brithness is set to anything above zero, state is set to on. Changing the state channel will not update the brightness channel.

Best
Hans-Jörg

Hello Hans-Jorg

Thanks for helping me on this. You mean, we will have two on/off’s - one to change the binary state, other to change the brightness to 0 & 100.

The current dimmer is as shown as below, So we need to add another on/off to this in addition to the existing one?

Right?

Thanks,
Raju

Hi Raju,
Exactly what I was saying, but it depends on your device behaviour.

Best
Hans-Jörg

Hi Hans-Jorg,

Thanks for confirming. Is it possible to remove the On/Off(brightness related) completely?

I think we can do it by changing the paperUI angular code but not sure how to load them again into openHAB. Make it a jar and drop it in addons?

Thanks,
Raju Namburi

Hi Raju,
Sorry, but I cannot help on this. I am not firm with AngularJS or the implementation of paper ui.
As far as I know, control section in paper ui is not finalized right know, so you’d better raise a feature request to make this optional.

Best
Hans-Jörg