Help with rules, after upgrade to 2.3.0

After upgrading to snapshots above #1230, I’ve noticed that many of my rules are not triggered anymore.
Tried obvious things, like restart, clearing tmp and cache, and checking for syntax errors. But I had to change from “received command” to “received update”, to make the triggers work again…
So I’ve got most rules running again, but I’m having a hard time with rules regarding the new knx 2.3.0 binding. I recently upgraded from knx 1.0 to knx 2.3.0, and created all things and items through PaperUI.
My rules are not triggered anymore. Any tips or help are welcome :slight_smile:

rule LED_feedback_downlights_on

Item HovedsovDownlights received update ON



rule LED_feedback_downlights_off

Item HovedsovDownlights received update OFF



rule LED_feedback_play

Item SpotifyPlayerBridge_SpotifyTrackPlayerControl changed



rule LED_feedback_previous

Item KNX_CastHovedsov_Prev received update ON



rule LED_feedback_next

Item KNX_CastHovedsov_Next received update ON



NB: The rules regarding spotify is triggered though.


2018-03-21 17:38:38.928 [TRACE] [nx.internal.client.AbstractKNXClient] - Received a Group Read Response telegram from '1.1.30' to '2/6/36'
2018-03-21 17:38:42.685 [DEBUG] [.internal.handler.DeviceThingHandler] - Thing 'knx:device:066d0493' received a Group Write telegram from '1.1.20' for destination '1/3/0'

2018-03-21 17:38:42.692 [TRACE] [.internal.handler.DeviceThingHandler] - Thing 'knx:device:066d0493' processes a Group Write telegram for destination '1/3/0' for channel 'knx:device:066d0493:downlights_hovedsov'

2018-03-21 17:38:42.694 [TRACE] [g.knx.internal.dpt.KNXCoreTypeMapper] - toType datapoint DPT = 1.001

But no rule triggered. Usually i see KNX.item received command ON, then this triggers my rule and output actions in my openhab2.log

The rules seems to be ok. If the items are updated, they will be run. Check be manually set the switches. It must be a problem outside.

Not a problem, only a tip, you can change




Okay, so I did another test. I sent a command from rest api:

See log:

2018-03-21 18:07:12.544 [ome.event.ItemCommandEvent] - Item 'HovedsovDownlights' received command ON

2018-03-21 18:07:12.547 [TRACE] [.internal.handler.DeviceThingHandler] - Handling command 'ON' for channel 'knx:device:066d0493:downlights_hovedsov'

2018-03-21 18:07:32.227 [TRACE] [.internal.handler.DeviceThingHandler] - Thing 'knx:device:066d0493' processes a Group Write telegram for destination '1/3/0' for channel 'knx:device:066d0493:downlights_hovedsov'

But no rule was triggered.

This is how my items file look like, with linking of item to thing:

/* Hovedsov Brytere */
Switch HovedsovAmpPower "Amp Power Hovedsov" (FF_Masterbed) { channel="knx:device:066d0493:HovedsovAmpPower" }
Switch HovedsovAmpGroup "Amp Group Hovedsov" (FF_Masterbed) { channel="knx:device:066d0493:HovedsovAmpGroup" }
Dimmer HovedsovDownlights "Downlights HovedSov [%s]" (FF_Masterbed, Light)	[ "Lighting" ] { channel="knx:device:066d0493:downlights_hovedsov" }
/* Hovedsov Bryter LED's */
Switch HovedsovLED1red { channel="knx:device:066d0493:HovedsovLED1red" }
Switch HovedsovLED1green { channel="knx:device:066d0493:HovedsovLED1green" }
Switch HovedsovLED1blue { channel="knx:device:066d0493:HovedsovLED1blue" }
Switch HovedsovLED2red { channel="knx:device:066d0493:HovedsovLED2red" }
Switch HovedsovLED2green { channel="knx:device:066d0493:HovedsovLED2green" }
Switch HovedsovLED2blue { channel="knx:device:066d0493:HovedsovLED2blue" }
Switch HovedsovLED3red { channel="knx:device:066d0493:HovedsovLED3red" }
Switch HovedsovLED3green { channel="knx:device:066d0493:HovedsovLED3green" }
Switch HovedsovLED3blue { channel="knx:device:066d0493:HovedsovLED3blue" }
Switch HovedsovLED4red { channel="knx:device:066d0493:HovedsovLED4red" }
Switch HovedsovLED4green { channel="knx:device:066d0493:HovedsovLED4green" }
Switch HovedsovLED4blue { channel="knx:device:066d0493:HovedsovLED4blue" }
Switch HovedsovLED5red { channel="knx:device:066d0493:HovedsovLED5red" }
Switch HovedsovLED5green { channel="knx:device:066d0493:HovedsovLED5green" }
Switch HovedsovLED5blue { channel="knx:device:066d0493:HovedsovLED5blue" }
Switch HovedsovLED6red { channel="knx:device:066d0493:HovedsovLED6red" }
Switch HovedsovLED6green { channel="knx:device:066d0493:HovedsovLED6green" }
Switch HovedsovLED6blue { channel="knx:device:066d0493:HovedsovLED6blue" }
Switch HovedsovLED7red { channel="knx:device:066d0493:HovedsovLED7red" }
Switch HovedsovLED7green { channel="knx:device:066d0493:HovedsovLED7green" }
Switch HovedsovLED7blue { channel="knx:device:066d0493:HovedsovLED7blue" }
Switch HovedsovLED8red { channel="knx:device:066d0493:HovedsovLED8red" }
Switch HovedsovLED8green { channel="knx:device:066d0493:HovedsovLED8green" }
Switch HovedsovLED8blue { channel="knx:device:066d0493:HovedsovLED8blue" }
Switch HovedsovOperationLEDred { channel="knx:device:066d0493:HovedsovOperationLEDred" }
Switch HovedsovOperationLEDgreen { channel="knx:device:066d0493:HovedsovOperationLEDgreen" }
Switch HovedsovOperationLEDblue { channel="knx:device:066d0493:HovedsovOperationLEDblue" }
Switch HovedsovAlleLED { channel="knx:device:066d0493:HovedsovAlleLED" }
Switch HovedsovLabelLED { channel="knx:device:066d0493:HovedsovLabelLED" }
Switch NattdempingLED { channel="knx:device:066d0493:NattdempingLED" }

So, when I push the knx button I get this message in oh2.log:

Thing 'knx:device:066d0493' processes a Group Write telegram for destination '1/3/0' for channel 'knx:device:066d0493:downlights_hovedsov'

And when I manually post the command via REST api, I get this:

2018-03-21 18:07:12.544 [ome.event.ItemCommandEvent] - Item 'HovedsovDownlights' received command ON

2018-03-21 18:07:12.547 [TRACE] [.internal.handler.DeviceThingHandler] - Handling command 'ON' for channel 'knx:device:066d0493:downlights_hovedsov'

2018-03-21 18:07:32.227 [TRACE] [.internal.handler.DeviceThingHandler] - Thing 'knx:device:066d0493' processes a Group Write telegram for destination '1/3/0' for channel 'knx:device:066d0493:downlights_hovedsov'

From Karaf, try…

smarthome:links list | grep knx

… and see if OH sees them. Have you restarted OH since making the changes?

Thanks for the advice. I checked, and all items are listed in karaf.

openhab> smarthome:links list | grep knx
FF_Living_Light_Ceiling -> knx:device:5ff2baaf:downlights_stue
TUN130_BAD_GulvfLer_BAD -> knx:device:36171559:gulvfoler_bad
KNXIPGateway_NumberOfErrors5min -> knx:ip:ab38a262:errors5min
KNXIPGateway_NumberOfErrors -> knx:ip:ab38a262:errorsall
KNX_CastBad_Play -> knx:device:59c5c46e:CastBad_Play
KNX_CastBad_Pause -> knx:device:59c5c46e:CastBad_Pause
KNX_CastBad_Next -> knx:device:59c5c46e:CastBad_Next
KNX_CastBad_Prev -> knx:device:59c5c46e:CastBad_Previous
KNX_CastBad_Group -> knx:device:59c5c46e:CastBad_Group
KNX_CastBad_Mute -> knx:device:59c5c46e:CastBad_Mute
KNX_CastBad_Dim -> knx:device:59c5c46e:CastBad_Dim
KNX_CastHovedsov_Play -> knx:device:066d0493:CastHovedsov_Play
KNX_CastHovedsov_Pause -> knx:device:066d0493:CastHovedsov_Pause
KNX_CastHovedsov_Prev -> knx:device:066d0493:CastHovedsov_Prev
KNX_CastHovedsov_Next -> knx:device:066d0493:CastHovedsov_Next
KNX_CastHovedsov_Group -> knx:device:066d0493:CastHovedsov_Group
KNX_CastHovedsov_Dim -> knx:device:066d0493:CastHovedsov_Volume
Systemair_Dusje -> knx:device:59c5c46e:dusje
FF_Corridor_Light_Outdoor -> knx:device:6f352f4a:utelys
FF_Corridor_Light_Ceiling -> knx:device:fba12b6a:downlight_gang
FF_Living_Light_pendel -> knx:device:5ff2baaf:lyskrone
Scenarie_Doorbell -> knx:device:929c1dbd:doorbell
Scenarie_Hjem -> knx:device:fba12b6a:Scenarie_hjem
Scenarie_Ut -> knx:device:fba12b6a:Scenarie_ut
Scenarie_Stemning -> knx:device:20bf4e54:scenarie_stemning
Scenarie_Vaken -> knx:device:3a2d60df:scenarie_vaken
Scenarie_Sove -> knx:device:3a2d60df:scenarie_sove
Dewpoint_GF_Hall -> knx:device:929c1dbd:dew_point_kjeller
Humidity_GF_Hall -> knx:device:228a09a2:fuktighet_kjeller
CO2_GF_Hall -> knx:device:228a09a2:co2_avlest
Temperature_FF_Living -> knx:device:5ff2baaf:Temperatur_stue
Temperature_FF_Masterbed -> knx:device:066d0493:temperatur_hovedsov
Temperature_GF_Hall -> knx:device:2fe3834c:temperatur_gang
HovedsovAmpPower -> knx:device:066d0493:HovedsovAmpPower
HovedsovAmpGroup -> knx:device:066d0493:HovedsovAmpGroup
HovedsovDownlights -> knx:device:066d0493:downlights_hovedsov
HovedsovLED1red -> knx:device:066d0493:HovedsovLED1red
HovedsovLED1green -> knx:device:066d0493:HovedsovLED1green
HovedsovLED1blue -> knx:device:066d0493:HovedsovLED1blue
HovedsovLED2red -> knx:device:066d0493:HovedsovLED2red
HovedsovLED2green -> knx:device:066d0493:HovedsovLED2green
HovedsovLED2blue -> knx:device:066d0493:HovedsovLED2blue
HovedsovLED3red -> knx:device:066d0493:HovedsovLED3red
HovedsovLED3green -> knx:device:066d0493:HovedsovLED3green
HovedsovLED3blue -> knx:device:066d0493:HovedsovLED3blue
HovedsovLED4red -> knx:device:066d0493:HovedsovLED4red
HovedsovLED4green -> knx:device:066d0493:HovedsovLED4green
HovedsovLED4blue -> knx:device:066d0493:HovedsovLED4blue
HovedsovLED5red -> knx:device:066d0493:HovedsovLED5red
HovedsovLED5green -> knx:device:066d0493:HovedsovLED5green
HovedsovLED5blue -> knx:device:066d0493:HovedsovLED5blue
HovedsovLED6red -> knx:device:066d0493:HovedsovLED6red
HovedsovLED6green -> knx:device:066d0493:HovedsovLED6green
HovedsovLED6blue -> knx:device:066d0493:HovedsovLED6blue
HovedsovLED7red -> knx:device:066d0493:HovedsovLED7red
HovedsovLED7green -> knx:device:066d0493:HovedsovLED7green
HovedsovLED7blue -> knx:device:066d0493:HovedsovLED7blue
HovedsovLED8red -> knx:device:066d0493:HovedsovLED8red
HovedsovLED8green -> knx:device:066d0493:HovedsovLED8green
HovedsovLED8blue -> knx:device:066d0493:HovedsovLED8blue
HovedsovOperationLEDred -> knx:device:066d0493:HovedsovOperationLEDred
HovedsovOperationLEDgreen -> knx:device:066d0493:HovedsovOperationLEDgreen
HovedsovOperationLEDblue -> knx:device:066d0493:HovedsovOperationLEDblue
HovedsovAlleLED -> knx:device:066d0493:HovedsovAlleLED
HovedsovLabelLED -> knx:device:066d0493:HovedsovLabelLED
NattdempingLED -> knx:device:066d0493:NattdempingLED
BadDownlights -> knx:device:59c5c46e:BadDownlights
BadSpeilskap -> knx:device:59c5c46e:BadSpeilskap
BadSapehylle -> knx:device:59c5c46e:BadSapehylle

I’m on 1232 and editing item files while OH is running has caused some issues, but a restart helped. Have you restarted?

Yes, I have restarted several times. But I’m starting to suspect that my thing channels may be set up wrong. With the new knx binding, do I have to define everything in a .thing file like described in the docs? Or is it okay to set up through paperui like i did?
I’m just wondering, since I get a thing update in the log instead of an item update, when I press the knx buttons.

OK, cool. It’s an easy fix, so wanted to make sure!

I do not use KNX, but in reading through the doc, and based on my understanding of OH2, there should not be any requirement to configure the Things through files. The Thing file example is for people that chose to use them. Have you double checked the binding configuration in the Items? If you go into PaperUI> Configuration> Things> select the KNX Thing, and then confirm the Channels display exactly like you have in your Items. The documentation has…

Switch        demoSwitch         "Light [%s]"               <light>          { channel="hue:0210:bridge:1:color", channel="knx:device:bridge:generic:controlSwitch" }

So, it looks like you may be missing a section. Odd that the Links were created though, if the Channels don’t exist.

Thanks for your commitment Scott. I’ve tried out your advice, but still having troubles triggering my rules.

The section you are referring to, is for the control channels. That’s when the knx bus doesn’t own the device, and want’s to control another thing, e.g: hue.

In my case, both channels in my rule are from knx devices.

So I finally figured it out. I changed to the control objects, for the trigger items. Now everything work as they used to, with the knx1 binding. :+1:

I’m stucking at the same step.
KNX-Switch used as switch-control things
In logs it seems OK but rules were ignored.
What did you change?

Hi Michael,

I’m no expert, so I just tried a lot of things untill it just worked itself out :smiley:

As i mentioned in the previous post, I used the “control” objects. After replacing the “normal” object with the control object, the triggers in my knx rules fired again. In the channel objects I only defined one GA ( only write ) if that makes a difference…

You could try to use Channel triggers instead of item triggers perhaps:

Channel "knx:device:your_device_id:your_channel_name" triggered ON