How to handle LCN Outputs with LCN Binding 2.x within rules

Tags: #<Tag:0x00007efeca988670> #<Tag:0x00007efeca988558>

Hallo together,

a few days ago I updated my openHABian from version 2.1 to 2.5.9. Happily I discovered that the LCN binding hast been updated and be enhanced with a lot of further features.

In my system, I have some HUE lights and an LCN bus system. With some rules I “connect” the HUE lamps with LCN actions. For this a had to convert some “things” and “items” and “rules” … but this part will work now again.

But there ist still one problem within one rule. One HUE presence detector should switch an LCN output. With the LCN Binding 1.x I use the follwoing command, while LCN_HWR_Kellerflurlicht_SW was defined as a switch:

LCN_HWR_Kellerflurlicht_SW.sendCommand(ON)

But with the actual LCN Binding 2.x this won’t work. The log tells me

2020-10-31 14:43:00.067 [ome.event.ItemCommandEvent] - Item ‘LCN_HWR_Kellerflurlicht_SW’ received command ON

2020-10-31 14:43:00.072 [nt.ItemStatePredictedEvent] - LCN_HWR_Kellerflurlicht_SW predicted to become NULL

The description of the LCN Binding didn’t face this part of configuration, so iI hope, that someone can help me to fix my problem.

My current files look like this
Items

Dimmer LCN_HWR_Kellerflurlicht “Kellerflurlicht [%d]” {channel=“lcn:module:xxxxxxxx:S000M10:output#1” [profile=“lcn:output”, ramp=0.25]}
Switch LCN_HWR_Kellerflurlicht_SW “Kellerflurlicht SW” {channel=“lcn:module:xxxxxxxx:S000M10:output#1” [profile=“lcn:output”, ramp=0.25]}

Rule

rule "Bewegungsmelder_Keller_BWM_ON"
    when   
        Item HueSensMotion1 changed to ON
    then   
        LCN_HWR_Kellerflurlicht_SW.sendCommand(ON)
end

Thanks and best regards
Stef

You do know you can command Dimmer type Items ON?

Hello rossko57,

thanks for your posting, but I am a little bit confuced … do you mean this ?

   LCN_HWR_Kellerflurlicht.sendCommand(ON)

This results in this …

2020-10-31 16:46:29.785 [vent.ItemStateChangedEvent] - hue_0107_1_HueMotionSensor1_presence changed from OFF to ON

2020-10-31 16:46:30.551 [ome.event.ItemCommandEvent] - Item ‘LCN_HWR_Kellerflurlicht’ received command ON

2020-10-31 16:46:30.556 [nt.ItemStatePredictedEvent] - LCN_HWR_Kellerflurlicht predicted to become NULL

So this wont work too. Any further idear?

Thanks for trying to help.
Stef

The NULL prediction means the binding knows it isn’t going to work too, and has vetoed autoupdate.
I suppose you need to find out if that channel actually supports ON/OFF commands, and if so, where yours is misconfigured.

When it is fixed, you won’t need a separate Switch type Item linked to same channel.

Do you have a suggestion hove to configure the LCN output in a correct way? May be I’m to supid to find this information inside the LCN biding documentation, but I can’t there no discription or example.

Thanks for helping
Stef

Have you tried using it just as an ordinary channel, without the weird profile?
The LCN profile has some special multi-channel application that I don’t understand, but perhaps you do as you selected it.

I don’t see any particular error. Are you sure the Channel UID is correct? If you discovered the Thing, the module ID has three digits: lcn:module:xxxxxxxx:S000M010:output#1. Yours has two.

Hello fwolter,

a little mistake with a greate impact, that’s it. I thought I have changed this everywhere … well I did, but I forgot modul 10 … damn.

Thanks and best regards
Stef

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.