[KNX2] [SOLVED] None of the configured GAs on channel could handle the command

My issue is that part of my rules don’t fire to GAs unless the related things and items look the same. I am using these rules with my old OH1 instance having no issues there.

Expected Behavior

Rules should be able to write telegrams to a GA using number values while using MyItem.sendCommand(value). I tried converting the number value to string but that doesn’t change the behavior.

Current Behavior

I receive the following error message for several rules:

2018-06-09 00:05:10.214 [TRACE] [.internal.handler.DeviceThingHandler] - Handling command '2' for channel 'knx:device:bridge:generic:hzSWVBuero'
2018-06-09 00:05:10.216 [DEBUG] [.internal.handler.DeviceThingHandler] - None of the configured GAs on channel 'knx:device:bridge:generic:hzSWVBuero' could handle the command '2' of type 'DecimalType'

For one rule that is working I receive the following output:

2018-06-09 00:07:31.691 [TRACE] [.internal.handler.DeviceThingHandler] - Handling command '3' for channel 'knx:device:bridge:generic:valloxStatus'
2018-06-09 00:07:31.694 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value '3' to datapoint 'command DP 11/4/0 'knx:ip:bridge', DPT id 6.010, low priority' (0. attempt).

Possible Solution

I have no clue why these two items don’t result in the same behavior.

Steps to Reproduce (for Bugs)

Things configuration (excerpt):

    Thing device generic "Generic" {
        Type number : hzSWVBuero            "Verstellung Büro" [ ga="6.010:9/5/3+6.010:9/6/3" ]
        Type number-control : valloxStatus  "Profil"           [ ga="6.010:11/4/0" ]
     }

Items configuration (excerpt):

Number HZ_SV_BU "Verstellung Büro [%d]" <temperature> (HZ_SV) { channel="knx:device:bridge:generic:hzSWVBuero" }
Number sendVallox "Lüftungsprofil [%d]" <climate> { channel="knx:device:bridge:generic:valloxStatus" }

Rules configuration (excerpt):

rule "HZ_ZW_BU changed"
when
	Item HZ_ZW_BU changed
then
	counter = BU_counter
	BU_counter = (HZ_ZW_BU.state as Number - 22) * 2
	if (BU_counter != counter) {
		HZ_SV_BU.sendCommand(BU_counter.intValue().toString())
		logInfo("tempinfo",BU_counter.intValue().toString())
	}
end

rule "ValloxToKNX"
when
    Item stateVallox changed
then
    val DecimalFormat df = new DecimalFormat("#")
    val Number ValloxRounded = (df.format(stateVallox.state as DecimalType))
    if (sendVallox.state != stateVallox.state) sendVallox.sendCommand(ValloxRounded.toString())
end

Context

The first rule is used to calculate and send the shift value required to change my room temperature. This is the way that Busch Jaeger Prion RTR communicate with each other.
The second rule is used to send the current state of the ventilation system to the KNX bus to my Busch Jaeger panel.

Your Environment

  • Version used: OpenHAB 2.3.0 (apt package)
  • Environment name and version (e.g. Chrome 39, node.js 5.4, Java 8, …): Chrome 67, Java 8
  • Operating System and version (desktop or mobile, Windows 10, Raspbian Jessie, …): Raspbian Stretch (Pi3B+)

I did some more tests on this and found out that channels with additional listening GA didn’t work. I configured two Things exactly the same way besides the listening GA:

Thing device neu3 "Neu3" {
    Type number : testmeout "SendNumber" [ ga="6.010:9/5/3" ]
}
Thing device neu4 "Neu4" {
    Type number : testmemore "SendNumb"  [ ga="6.010:9/5/3+6.010:9/6/3" ]

And two items:

Number sendTest "Test [%d]" { channel="knx:device:bridge:neu3:testmeout" }
Number sendTest2 "Test2 [%d]" { channel="knx:device:bridge:neu4:testmemore" }

If I use sendTest with my rule it works. If I use sendTest2 it doesn’t. Here are the traces:

2018-06-09 12:50:58.701 [TRACE] [.internal.handler.DeviceThingHandler] - Handling command '0' for channel 'knx:device:bridge:neu3:testmeout'
2018-06-09 12:50:58.704 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value '0' to datapoint 'command DP 9/5/3 'knx:ip:bridge', DPT id 6.010, low priority' (0. attempt).

2018-06-09 12:57:06.879 [TRACE] [.internal.handler.DeviceThingHandler] - Handling command '0' for channel 'knx:device:bridge:neu4:testmemore'
2018-06-09 12:57:06.888 [DEBUG] [.internal.handler.DeviceThingHandler] - None of the configured GAs on channel 'knx:device:bridge:neu4:testmemore' could handle the command '0' of type 'DecimalType'

Any hints are welcome on how to continue on this.

PS: I had to create a lot of new things for testing as changing channel configuration was not applied at runtime. But I think there is a bug open for this already. E.g. changing DPT doesn’t have any effect - the previous DPT will still be used.

I found the solution to my problem. It was the GA definition for the listening GA. The DPT should be listed only once per GA.

Wrong definition:

[ ga="6.010:9/5/3+6.010:9/6/3" ]

Correct definition:

[ ga="6.010:9/5/3+9/6/3" ]

It seems that the definition for GAs changed between the old KNX and new KNX addon. Maybe it was wrong with the old KNX addon to accept it twice as it cannot be different for one value.

BR
Rene

Glad you found the issue yourself :+1:.
Looking at https://github.com/openhab/openhab1-addons/wiki/KNX-Binding#bind-items-to-knx, I would claim that is was an invalid configuration for KNX1 as well, maybe it just swallowed it without causing any problem.

It would have been nice though, if there were some warning in the log file if such an invalid config is found - I assume that wasn’t the case?

Hi Kai,

you are right. The definition of KNX1 and KNX2 is similar and allows only for one DPT for the GA.

There was no message in the logs regarding an incorrect configuration of the channel (although the knx binding and calimero were set to log level TRACE).

I hope that the issue with changing GA configurations at runtime is addressed soon. Changes are not reflected by the behavior of the channel. It makes the configuration tough. E.g. changing DPT of a GA requires a restart of OpenHAB instead of a reload of the things file at runtime.

BR
Rene

Which issue are you referring to exactly? Do you have a link?

I thought it is related to this one: https://github.com/openhab/openhab2-addons/issues/3609

But maybe it is not.

Scenario:
Create a channel for a thing, let’s say a number (like in my example before):

Type number : ventilationMode "Mode" [ ga="9/5/3+9/6/3" ]

Create a related item and put it on a sitemap for testing. Save all your files so the changes are applied by OpenHAB. This will work. The next step is the one that is broken.
Change the configuration of the GA. E.g. you realize that the default for numbers is 9.001 (2 Byte) but you need 6.010 (1 Byte counter) for it. You change the configuration to:

Type number : ventilationMode "Mode" [ ga="6.010:9/5/3+9/6/3" ]

and save the file. OpenHAB will tell you that it refreshed the information. But actually it didn’t apply the change of the DPT. If you enable tracing you will see that OpenHAB still handles the channel as DPT 9.001.

There is another thread mentioning that they experienced that issue as well:

If you think that it is not related to the issue on github that I mentioned before, I am happy to file an issue.

1 Like

As I stumbled over this issue as well…

Instead of restarting openHAB, renaming of the knx.things to something other (not *.things), say knx.things.old and re-renaming it to knx.things should suffice, because openHAB will destroy all things and the bridge and rebuild it. (Wait a few Seconds between step one and step two…)

At least this worked for me. (only a workaround) :wink:

1 Like

I have the same problem now, only with Type number
(using snapshot 2.5.0 build 1486)
KNX log

2019-01-02 12:30:00.004 [DEBUG] [.internal.handler.DeviceThingHandler] - None of the configured GAs on channel 'knx:device:knx0101007:buitentemperatuur' could handle the command '7.1 °C' of type 'QuantityType'
2019-01-02 12:30:00.082 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value 'Regen' to datapoint 'command DP 1/0/50 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-02 12:30:00.148 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value 'bewolkt' to datapoint 'command DP 1/0/51 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-02 12:30:00.216 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value '' to datapoint 'command DP 1/0/52 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-02 12:30:00.217 [DEBUG] [.internal.handler.DeviceThingHandler] - None of the configured GAs on channel 'knx:device:knx0101007:buitenvochtigheid' could handle the command '78 %' of type 'QuantityType'

openhab.log

2019-01-02 12:35:00.001 [INFO ] [e.model.script.Weerbericht_Automatic] - Cron - Sending weerbericht to KNX
2019-01-02 12:35:00.003 [INFO ] [e.model.script.Weerbericht_Automatic] - 7.1 °C
2019-01-02 12:35:00.004 [INFO ] [e.model.script.Weerbericht_Automatic] - Regen
2019-01-02 12:35:00.005 [INFO ] [e.model.script.Weerbericht_Automatic] - Regen
2019-01-02 12:35:00.006 [INFO ] [e.model.script.Weerbericht_Automatic] - bewolkt
2019-01-02 12:35:00.007 [INFO ] [e.model.script.Weerbericht_Automatic] - null
2019-01-02 12:35:00.009 [INFO ] [e.model.script.Weerbericht_Automatic] - 78 %

*.things file :

    Thing knx:device:knx0101007 "KNX_01_01_007" (knx:ip:tunnel01)  @ "KNX"
    [
        address="1.1.7",
        fetch=false,
        pingInterval=300,
        readInterval=3600
    ]
    {
        Type string : huidigetoestand1 "Message 1" [ga="1/0/50"]
        Type string : huidigetoestand2 "Message 2" [ga="1/0/51"]
        Type string : huidigetoestand3 "Message 3" [ga="1/0/52"]
        Type string : huidigetoestand4 "Message 4" [ga="1/0/53"]
        Type number : buitentemperatuur "Buiten Temperatuur" [ga="9.001:1/0/1"]
        Type number : buitenvochtigheid "Buiten Vochtigheid" [ga="9.001:1/0/2"]
        
    }

*. items file :

String huidigetoestand1 "Bericht 1 " {channel="knx:device:knx0101007:huidigetoestand1"}
String huidigetoestand2 "Bericht 2 " {channel="knx:device:knx0101007:huidigetoestand2"}
String huidigetoestand3 "Bericht 3 " {channel="knx:device:knx0101007:huidigetoestand3"}
String huidigetoestand4 "Bericht 4 " {channel="knx:device:knx0101007:huidigetoestand4"}
Number buitentemperatuur "Buiten temperatuur " {channel="knx:device:knx0101007:buitentemperatuur"}
Number buitenvochtigheid "Buiten vochtigheid " {channel="knx:device:knx0101007:buitenvochtigheid"}

The value of these to is pass by a rules to it

    if (LocalWeather_Current_OutdoorTemperature.state.toString != UNDEF)
    {
        Temp01 = LocalWeather_Current_OutdoorTemperature.state as Number
        buitentemperatuur.sendCommand(Temp01)
        logInfo("Weerbericht_Automatic", Temp01.toString)
    }
    else 
    {
        buitentemperatuur.sendCommand(0)
        logInfo("Weerbericht_Automatic", Temp01.toString)
    }

Take alook at the error message:

... None of ... could handle the command '7.1 °C' of type 'QuantityType'

That’s not a Number but a QuantityType (UoM is the key)
Please try

 if (LocalWeather_Current_OutdoorTemperature.state instanceof QuantityType) {
     Temp01 = LocalWeather_Current_OutdoorTemperature.state as QuantityType<Number>
        buitentemperatuur.sendCommand(Temp01)
 }

Thanks for the response

I try your code and no result

   if (LocalWeather_Current_OutdoorTemperature.state.toString != UNDEF)
    {
         if (LocalWeather_Current_OutdoorTemperature.state instanceof QuantityType) 
         {
            Temp01 = LocalWeather_Current_OutdoorTemperature.state as QuantityType<Number>
            buitentemperatuur.sendCommand(Temp01)
            logInfo("Weerbericht_Automatic QuantityType", Temp01.toString)
        }
        ///Temp01 = LocalWeather_Current_OutdoorTemperature.state as Number
        //buitentemperatuur.sendCommand(Temp01)
        //logInfo("Weerbericht_Automatic", Temp01.toString)
    }
    else 

openhab log

2019-01-03 15:20:00.016 [INFO ] [e.model.script.Weerbericht_Automatic] - Cron - Sending weerbericht to KNX
2019-01-03 15:20:00.018 [INFO ] [t.Weerbericht_Automatic QuantityType] - 5.9 °C
2019-01-03 15:20:00.019 [INFO ] [e.model.script.Weerbericht_Automatic] - Gedeeltelijk bewolkt
2019-01-03 15:20:00.021 [INFO ] [e.model.script.Weerbericht_Automatic] - Gedeeltelijk 
2019-01-03 15:20:00.022 [INFO ] [e.model.script.Weerbericht_Automatic] - bewolkt
2019-01-03 15:20:00.022 [INFO ] [e.model.script.Weerbericht_Automatic] - null
2019-01-03 15:20:00.023 [INFO ] [e.model.script.Weerbericht_Automatic] - 89 %

knx log

2019-01-03 15:20:00.037 [DEBUG] [.internal.handler.DeviceThingHandler] - None of the configured GAs on channel 'knx:device:knx0101007:buitentemperatuur' could handle the command '5.9 °C' of type 'QuantityType'
2019-01-03 15:20:00.107 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value 'Gedeeltelijk ' to datapoint 'command DP 1/0/50 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-03 15:20:00.180 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value 'bewolkt' to datapoint 'command DP 1/0/51 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-03 15:20:00.247 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value '' to datapoint 'command DP 1/0/52 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-03 15:20:00.247 [DEBUG] [.internal.handler.DeviceThingHandler] - None of the configured GAs on channel 'knx:device:knx0101007:buitenvochtigheid' could handle the command '89 %' of type 'QuantityType'

The value is comming from the weatherundeground binding, and i will dispaly these valus on a knx display

have the following message

rules

Temp01 = LocalWeather_Current_OutdoorTemperature.state QuantityType<Number>

openhab.log

2019-01-03 23:05:00.615 [ERROR] [ntime.internal.engine.ExecuteRuleJob] - Error during the execution of rule 'Automatic_Weerbericht': Unknown variable or command '<'; line 19, column 68, length 19

adapted rules

Temp01 = LocalWeather_Current_OutdoorTemperature.state QuantityType <Number>

openhab .log

2019-01-03 23:02:27.682 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'weerbericht_knx.rules', using it anyway:
QuantityType is a raw type. References to generic type QuantityType<T> should be parameterized

i am using “Visual Studio Code” and here i get following errors

Found a solution :smiley:,
rules

            Temp01 = LocalWeather_Current_OutdoorTemperature.state as Number
            buitentemperatuur.sendCommand(Temp01.floatValue)
            logInfo("Weerbericht_Automatic", Temp01.toString)

knx.log

2019-01-04 10:55:00.170 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value '4.7' to datapoint 'command DP 1/0/1 'knx:ip:tunnel01', DPT id 9.001, low priority' (0. attempt).
2019-01-04 10:55:00.236 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value 'Merendeels be' to datapoint 'command DP 1/0/50 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-04 10:55:00.304 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value 'wolkt' to datapoint 'command DP 1/0/51 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-04 10:55:00.370 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value '' to datapoint 'command DP 1/0/52 'knx:ip:tunnel01', DPT id 16.001, low priority' (0. attempt).
2019-01-04 10:55:00.406 [DEBUG] [nx.internal.client.AbstractKNXClient] - Wrote value '95.0' to datapoint 'command DP 1/0/2 'knx:ip:tunnel01', DPT id 9.001, low priority' (0. attempt).