OH3 - read KNX Value

Hi,

I’m stucked and desesperated trying to read a temperature information from KNX.

This the the conf :

Bridge knx:ip:bridge [  
type="TUNNEL", 
ipAddress="192.168.1.37", 
portNumber=3671,

// localIp=“192.168.0.11”,
useNAT=true,
readingPause=50,
responseTimeout=10,
readRetriesLimit=3,
autoReconnectPeriod=30,
localSourceAddr=“1.1.250”
] {
Thing device generic [
address=“1.1.1”,
fetch=true,
pingInterval=300,
readInterval=3600
] {
Type number : demoTemperature1 “Temperature1 [%.1f °C]” [ ga=“9.001:5/2/11” ]
Type number : demoTemperature2 “Temperature2 [%.1f °C]” [ ga="<9.001:5/2/11" ]
Type number : demoTemperature3 “Temperature3 [%.1f °C]” [ ga="+<9.001:5/2/11" ]
Type number : demoTemperature4 “Temperature4 [%.1f °C]” [ ga=“9.001:5/2/11+<6/1/11” ]
Type number : demoTemperature5 “Temperature5 [%.1f °C]” [ ga=“5/2/11” ]
Type number : demoTemperature6 “Temperature6 [%.1f °C]” [ ga="<5/2/11" ]
Type number : demoTemperature7 “Temperature7 [%.1f °C]” [ ga="+<5/2/11" ]
Type number : demoTemperature8 “Temperature8 [%.1f °C]” [ ga=“5/2/11+<6/1/11” ]
Type string : string “Message” [ ga=“1.006:+<5/2/11” ]
Type switch : sw01 “Atelier” [ ga=“1/1/12”]
Type switch : sw02 “Atelier2” [ ga=“1/1/16”]
Type switch : sw03 “Buanderie” [ ga=“1/1/14”]
Type switch : sw04 “Spot Potager” [ ga=“1/1/102”]
Type switch : sw05 “Spot Chemin-Potager” [ ga=“1/1/103”]
Type switch : sw06 “Spot Chemin-Garage” [ ga=“1/1/104”]
Type switch : sw07 “Spot Garage” [ ga=“1/1/105”]
}
}

As you see, I have many tests, everything shows “NULL” in the interface.

What am I doing wrong :slight_smile: ?

This is my version from knx.things:

as far as I can see, this is not in your list, is it?
ga=“9.001”:< followed by “Group Address”

Hint: after restart I get my temperature updates cyclic, so for some time (or temperature does not change) it stays NULL for some time. There is another config to push this update (force Reading from KNX), in some cases I have errors in my logfiles, because KNX cannot read these Group Address values, but a few minutes later, everything works fine.

Hint: I use Visual Studio Code with OpenHab Plugin, nice feature with this popup shown in my screenshot to check values very fast

Thank you for your infos.

So … I tried this :

UID: knx:device:bridge:fc072afcc9
label: KNX Device1.1.3
thingTypeUID: knx:device
configuration:
pingInterval: 600
address: 1.1.3
readInterval: 1
fetch: true
bridgeUID: knx:ip:bridge
channels:

  • id: tTemp
    channelTypeUID: knx:number
    label: test temp
    description: “”
    configuration:
    ga: 9.001:<5/2/11

And the log shows this :

17:54:21.932 [WARN ] [knx.internal.client.AbstractKNXClient] - Giving up reading datapoint 5/2/11, the number of maximum retries (3) is reached.

And still null in interface.

Any idea ?

You don’t say, so I have to ask… are you able to get any response from the KNX installation to your OpenHAB items or is it “only” the temperature items you can’t read ?

Hi Martin,

I recieved this morning a mail from our KNX installator which says “Address 5/2/11 is for writing value, try 5/3/11 for reading”. I tried, and I see now the value, wich is a big step :slight_smile: .

Now, I would like to be able to update this value (which is the target temperature value).

I used :
Type number : tCons1Garage “t° Consigne 1/Garage” [ ga=“9.001:5/2/11<5/3/11” ]

But in interface, it is impossible to update the field.

Do you have an idea ?
(And I’m not able to find documentation about that)

Hi,
Good to have the correct GA’s. You should ask your installer for a complete list of GA’s if you don’t have ETS and have no plan to use/learn it.

I would loose the DPT and try :

Type number : tCons1Garage “t° Consigne 1/Garage” [ ga=“5/2/11+<5/3/11” ]

If it works adding the “+” then you could add the DPT again.

Type number : tCons1Garage “t° Consigne 1/Garage” [ ga=“9.001:5/2/11+<5/3/11” ]

Also, I see that your readInterval is 1. I would set that to a more reasonable number (3600 or even 0 (zero) just to actively read the KNX bus at startup).

first of all as @MartinKo said, if you have no ETS (the KNX programming software), your electrician should be able to export the GAs and you can build your openHAB configuration around that.

second of all, please use code fences ``` at the start and end of your code examples, makes it easier to read.

and finally: in openHAB3 you can easily drop the “standard” DPTs and use the configuration without them - only if you need to specify the DPT yourself (e.g. it comes in handy for alarms, heating GAs…), you should provide them. OH3 does the DPT-transformation for you and it works perfectly for me.

ok: the GUI doesn’t give you functions to update an item with specific values ootb. And also you have to keep in mind, what the difference of a “point” (=item) and a “channel” (sort of a equipment type) is. Please read the docs here:

The docs use Hue, but it’s similar to KNX.

  1. you install the KNX binding and get a bridge, which gives openHAB access to your KNX bus
  2. then you configure things (could be your sensor in the garage), which have channels, which could be temperature as one channel, humidity as another, …
  3. you can then point the specific channel to your semantic model, which makes it possible for you to use the point (aka item) in a GUI or in a rule.

So, what you’re trying to do ist to update a channel, which isn’t possible. You have to link a item to the channel, which you can in turn update with values.

Question: Why do you want to update the temperature reading of your sensor?

Thank you (I changed readInterval to 3600).

I have now :

	Type number	: tCons1Garage	"t° Consigne 1/Garage"	[ ga="9.001:5/2/11+<5/3/11" ]
(I tried with and without DPT)

But value is not modifiable (When I click on it, I get the analyse graph)

Do you have any suggestion ?

yes, I do. Many. but please answer my question I sent in parallel: why do you want to update the temperature reading of your sensor?

Sorry, I missed out your question.
Installator said to me that :
5/3/11 is the address to read the target temperature value (not the current temperature)
5/2/11 is the address to write the target temperature.

ah I see! so that’s your HVAC controller! I misread it for some temperature sensor.
So, in that case you should not use one channel for both, because 5/3/11 is your “actual temperature” and 5/2/11 is your “target temperature”. You can of course use both in one item, but that’ll make it impossible for you to “read” the target temperature.

So, I suggest you configure two channels for each GA and then you can link the 5/3/11 to a simple “number-value” item and for 5/2/11 I’d suggest to use a “dimmer” item, which allows you to change the target temperature simply via the GUI in every case. Play around a bit with the item’s metadata options. for diverse default standalone widgets you can define the look and most importantly a min and a max value.

Thank you, Dimmer seems to be the way.

Actually, I have 3 channels :

  • 5/3/x : read the desired temperature
  • 5/2/x : write the desired temperature
  • 6/1/x : temperature of the room

So should I put the type dimmer for the Thing and for the Item ?

These two go into one number channel and into one dimmer item; as described above the channel can have multiple GAs, the first is writing, the second is reading.

This as a number channel and number item.

Thank you for your answer.

So far …

I configured :

Type number : t9ChParents “t° 9/ChParents” [ ga="<6/1/96" ]
Type number : t9ChParentsCons “t° 9/ChParents Consigne” [ ga="<5/3/96" ]
Type dimmer : t9ChParentsConsD “t° 9/ChParents ConsigneD” [ ga=“5/2/96+<5/3/96” ]

I see the current temperature (t9ChParents), which is cool
I see a dimmer, I’m able to change the value, it produces this log:

19:50:42.484 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘KNXDevice_t9ChParentsConsigneD’ changed from 37 to 19

The value remains good event I restart OH.

What looks to be special is that value of “t9ChParentsCons” never change. The only goal of this “number Thing” is to check if dimmer works.

For the moment, I don’t have the “ETS” KNX software (if you have any solution to monitor KNX, it would be welcome without ETS).

I don’t see other solution than waiting for the next coming of the installator …

My 2cents are, that the 5/2/96 GA is the “Writing” GA within your controller, but the “S” flag isn’t set, which means, the controller itself can write the target temperature, but not the bus. Try to change the target temperature on the controller and see, if the t9ChParentsCons and t9ChParentsConsD changes accordingly, so at least you’re sure, the 5/3/96 telegrams are configured correctly.

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