Rule-Problems after Upgrade to openHABian 2.5.9-1

Hello together,

after some yeaes I decided to upgrade my OpenHAB on my Rasperberry PI from OH 2.1 to the current stable version ob OpenHABian 2.5.9-1. Well serveal things changed … especillay the LCN-Binding. But I discovered, what to to to get LCN running.

Now I’ve stuck in problems by convertig my old rules. I the log I can see that the expected Items change there state, but the rule won’t react in any way. I simplified the rules and insert some logging, but the logging won’t appear in the log.

So, now I decided to ask for help …

The rule looks like that:

rule "AZ_LightON"
        Item LCN_AZ_SW_Relay_HUE_Switch changed from NULL or
        Item LCN_AZ_SW_Relay_HUE_Switch changed from OFF or
        Item LCN_AZ_SW_Relay_HUE_Switch changed from ON
    then {
        var HSBType AZ_currentState = LightifyFlex3p_color.state
//      logInfo("ON/OFF CurrentBrightness", String::format ("brightness = %d", currentState.brightness.intValue))
        if (AZ_currentState.brightness.intValue == 0) {
            AZ_BrightnessDirection = true
        else {
            LightifyFlex3p_color.sendCommand (OFF)
            AZ_BrightnessDirection = false

And I can see the Items toggle in the state:

2020-10-25 16:45:11.523 [vent.ItemStateChangedEvent] - lcn_module_ce5f34ba_S000M011_relay_1 changed from OFF to ON

2020-10-25 16:45:11.533 [vent.ItemStateChangedEvent] - LCN_AZ_Relay_HUE_Switch changed from OFF to ON

2020-10-25 16:45:13.403 [vent.ItemStateChangedEvent] - lcn_module_ce5f34ba_S000M011_relay_1 changed from ON to OFF

2020-10-25 16:45:13.420 [vent.ItemStateChangedEvent] - LCN_AZ_Relay_HUE_Switch changed from ON to OFF

But the simple logWarn-Message will not appear.

So if there is someone to help me, your welcome to give me some advices.

Tanks and regards

Logging needs two parts as parameters e.g.

logWarn("heating-control.rules", "This is a log entry of type Warn!")
1 Like

If you look in your openhab.log, it should be grizzling when it tries to parse your xxx.rules file

Hello Wolgang_s and rossko57,

thanks for the fast answers … but … this is not the problem, Yes you are right in relation to the incorrect syntax, but I didn’t make a difference. I changed the line to “logWarn(“AZ_LCN-Triggered”,“Test …”)” … but inside the logging there is no difference.
It seems to me, that the rule will not be started for an unknown reason. OpenHAB recognize the there is an rule file, when I save the correspondig file

2020-10-25 17:20:26.910 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘Arbeitszimmer_hue.rules’

… but well … that’s it … no reaction, when the trigger appears.

Thanks for further help

Your rule triggers an changes of the item LCN_AZ_SW_Relay_HUE_Switch,
in the logs you are showing the items LCN_AZ_Relay_HUE_Switch and lcn_module_ce5f34ba_S000M011_relay_1.
Note the missing SW in the first one.

Thanks, that’s it … sorry for this stupid mistake …

1 Like

your whole thread title is misleading. Your issues are not with openHABian so change please

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