Rollershutter items

Hi there…

I’m trying to define rollershutter items for lcn-2-binding as described in the doc. Testing the item I’ve got this message from karaf:

21:29:16.467 [WARN ] [subhandler.LcnModuleMetaAckSubHandler] - S000M010: NACK received: Command not allowed by module's configuration
21:29:20.374 [WARN ] [subhandler.LcnModuleMetaAckSubHandler] - S000M010: NACK received: Command not allowed by module's configuration
21:29:24.399 [WARN ] [subhandler.LcnModuleMetaAckSubHandler] - S000M010: NACK received: Command not allowed by module's configuration
21:29:28.314 [WARN ] [nding.lcn.internal.connection.ModInfo] - S000M010: Module did not respond to command: A1DI100008

I guess, I cannot use the rollershuter-type for this module which is a 8-port relay. This module accepts UP, DOWN and STOP commands. How I can define those commands based on channels?

Cheers

I’m following this… I think I have the same problem… Using a rollershutter-type in a switch channel… I hope there is a work around.

Interressting: For some reason the rollershutter works now.

Rollershutter lcnRollerShutter  {channel="lcn:module:LCNBus:M010:rollershutterrelay#1"[invertUpDown=true]}

Since my wire seems to be twisted, I tried the invertUpDown-Switch. Unfortunately, it does not change anything… Is the syntax correct?

Edit: Seems like, there might be a problem with invertUpDown as stated here: Issue #8680.

Don’t think so. Docs give example usage of similar dimmer parameter like -

Switch M10_Output2 {channel="lcn:module:b827ebfea4bb:S000M010:output#2"[profile="lcn:output", ramp=0.25]}

but with no example, I could not say if you are looking for something like

Rollershutter lcnRollerShutter  {channel="lcn:module:LCNBus:M010:rollershutterrelay#1"[profile="lcn:output", invertUpDown=true]}

or

Rollershutter lcnRollerShutter  {channel="lcn:module:LCNBus:M010:rollershutterrelay#1"[profile="lcn:rollershutterrelay", invertUpDown=true]}

@rossko57: Thanks for your suggestions, it didn’t work as well. IMHO, specificing a profile is only needed, if you want to force an output channel as a specific output/channel type. If I select “rollershutterrelay” as channel, I assume the profile “lcn:rollershutterrelay” is selected implicitly. But I just guess, it might be wrong…

@fwolter: I noticed Issue 8680 has been fixed and I updated my openHab instance to 2.5.10. Unfortunately, invertUpDown still seems to be ignored.
I logged the DEBUG/TRACE output for my example with and without invertUpDown:

Rollershutter lcnRollerShutter  {channel="lcn:module:LCNBus:M010:rollershutterrelay#1"[invertUpDown=true]}
19:30:59.535 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'lcnRollerShutter' received command UP
19:30:59.549 [TRACE] [ng.lcn.internal.connection.Connection] - Sent: >M000010!R810------

19:30:59.599 [TRACE] [ng.lcn.internal.connection.Connection] - Received: '-M000010!'
19:30:59.620 [TRACE] [ng.lcn.internal.connection.Connection] - Received: ':M000010Rx001'
19:31:09.980 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'lcnRollerShutter' received command DOWN
19:31:09.982 [TRACE] [ng.lcn.internal.connection.Connection] - Sent: >M000010!R811------

19:31:10.042 [TRACE] [ng.lcn.internal.connection.Connection] - Received: '-M000010!'
19:31:10.123 [TRACE] [ng.lcn.internal.connection.Connection] - Received: ':M000010Rx003'
19:31:10.131 [INFO ] [smarthome.event.ItemStateChangedEvent] - lcnRollerShutter   changed from 0 to 100

and finally

Rollershutter lcnRollerShutter  {channel="lcn:module:LCNBus:M010:rollershutterrelay#1"}
19:58:27.911 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'lcnRollerShutter' received command UP
19:58:27.935 [TRACE] [ng.lcn.internal.connection.Connection] - Sent: >M000010!R810------

19:58:27.985 [TRACE] [ng.lcn.internal.connection.Connection] - Received: '-M000010!'
19:58:28.258 [TRACE] [ng.lcn.internal.connection.Connection] - Received: ':M000010Rx001'
19:58:30.062 [TRACE] [ng.lcn.internal.connection.Connection] - Received: '%M000010.A00301269'
19:58:31.532 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'lcnRollerShutter' received command DOWN
19:58:31.544 [TRACE] [ng.lcn.internal.connection.Connection] - Sent: >M000010!R811------

19:58:31.635 [TRACE] [ng.lcn.internal.connection.Connection] - Received: '-M000010!'
19:58:31.756 [TRACE] [ng.lcn.internal.connection.Connection] - Received: ':M000010Rx003'

Did you enable the roller shutters?

You added a configuration parameter to the Item, but invertUpDown is a Channel configuration parameter. You can change this value in the UI.

The LCN binding’s Rollershutter Channels don’t support Switch commands. I’m wondering how you would stop the shutter, when using a Switch. If you don’t need to stop the shutter, you could simply switch the direction relay.

There might be confusion with presentation here.

A Rollershutter type Item will accept commands UP/DOWN/STOP (amongst others). It is of course up to any linked binding whether to do anything with those, or ignore them.

A Switch type widget in a sitemap performs a magic trick if you link to a Rollershutter type Item.
It presents buttons [UP] [STOP] [DOWN] andwhen you poke them, it issues those commands to the Item.

Fabian,

thanks for the hint. With OH-LCN-1 binding all rollershutter worked flawless so far. Nevertheless, I checked my LCN settings within LCN-PRO and all check-boxes are ticked.

I tried to set the Invert Up/Down switch in PaperUI but it does not save my settings (Error 409: Conflict). Since I used confinguration-files to configure OH, I cannot use PaperUI to overwrite/extend my settings.

Is there a way to set this parameter in a config file? Could this parameter exposed to the item decleration as well?

Thanks for your support. Very much appreciated.

You can configure Channel parameters in the .things file. See https://www.openhab.org/docs/configuration/things.html#defining-channels

Making the parameter available via Items and Profiles would be possible, but I think this doesn’t reflect the real world, as the wiring is faulty not per Item, but for the whole Channel.

@HaBerry, I was fighting with text based configuration files as well. After several tries, I finally found the solution for setting the “invertState” parameter for binary sensors. This is what workes great for me:

	Thing module M100 "M100 EG Arbeit" [ moduleId=100, segmentId=0 ] {
	Channels: 
		Contact : binarysensor#6 [ invertState=true ]
	} 

I guess the structure will be the same for inverting the rollershutters. Good luck :slight_smile:

There seems to be more users (two), using text-based Thing configuration, than I thought.

I will add this example to the readme. @HaBerry can you provide a working Rollershutter example?

@Maschine, thanks for the snippet and indeed it helps me to find a solution for my problem. Now I can handle my twisted wiring correctly…

@fwolter, sure. Please find a full Rollershutter Config-file-based example below. I’m pretty sure, we are not the only 2 guys, using config-files. I guess @timbms is using them as well? :slight_smile:

.things

Bridge lcn:pckGateway:LCNBus "LCNSystem"  [ hostname = "***.***.***.***", port = 4114, username = "*****", password = "****", mode = "native200", timeoutMs = 3000 ] { 
	...
    Thing lcn:module:LCNBus:M010 "Module 010" @ "My Thing Location"     [ moduleId=10,  segmentId=0 ]
    {
        Channels:
            Rollershutter : rollershutterrelay#1 "My twisted rollershutter relay" [ invertUpDown = true ]
    }
	...
}

.items

Rollershutter lcnRollerShutter  {channel="lcn:module:LCNBus:M010:rollershutterrelay#1"}

.sitemap

Default item=lcnRollerShutter  label="My RollerShutter"
1 Like