OH2 KNX 1.9 Binding - read from KNX results in a write

@DirkSander, I have forgotten quotation marks autoupdate=“true” not autoupdate=true

@lewie, thanks again. I made the changes (I could have noticed this myself - sorry for that), but unfortunately it is still the same. There is still a “GroupValueWrite” generated by openHAB.

Here a screenshot of ETS5 Groupmonitor:

this is my item definition now:
Switch Geraet_OG3_Chef_SchreibtischFreigabe “Schreibtisch Freigabe” (OG3_Chef, Geraete) {autoupdate=“true”, knx="<(60)2/2/239"}

I already tried to remove the item via paper UI and I renamed it to prevent “old item data”. Still the same.

Maybe another idea?

Thanks,
Dirk

Are you really using this pre-version of KNX bundle?

(INSTALLATION: Uninstall KNX Bundle over OH2 Paper UI -> Add-ons. And then copy pre-version of KNX bundle in [OH2 folder]/addons)

With configuration parameter ignorelocalevents=true in [OH2 folder]/conf/services/knx.cfg

Hmmm…

@lewie
I checked the “ignorelocalevents=true” setting within my “knx.cfg”-file. It is correct.

I made thge following changes / have the following settings:

compatibilityOH2 = true

ip=224.12.23.12
=> Multicast adress => works fine

busaddr=10.1.201
=> the physical KNX-device adress displayed in the Bus => works fine

type=ROUTER
port=3671

Yes I downloaded the “Snapshot”-KNX-Binding. since I installed that snapshot the Version of “openHAB KNX Binding” displays as “1.9.0.201610310808” before it was 1.9.0.b5:
bundle:list =>
214 | Active | 80 | 1.9.0.201610310808 | openHAB KNX Binding

After install it was displayed as “Resolved” in the list. Then I used “bundle:start 214”.

But I didn’t copy it manualy. I used “bundle:install” with your URL that leads to your jar-file. Should I install it by hand?

@lewie
Did you notice that my problem occurs on a scheduled read from openHAB on a given knx-group-address? Every 60 seconds a GroupValueRead is generated by openHAB and (as planned) a GroupValueResponse-Answer is generated by the knx-device. This answer is processed by openHAB and the value is saved / changed. But openHAB answers with a “GroupValueWrite”. It may be a different way to the other echo-problems.

Could you please try a scheduled read within your configuration?

Thanks!

@DirkSander,

compatibilityOH2 = true is obsolete, but does not worry.
Your config is perfect!

How you start KNX bundle does not matter. But there should only be one… :wink:
I don’t know why, but I have another Bundle:

204 | Active | 80 | 1.9.0.201611251544 | openHAB KNX Binding
You can test mine.

Now using a testItem to see if there are echoes:

Switch TEST_AKTOR_1_1_27 "TEST AKTOR 1.1.27" { autoupdate="true", knx="7/2/1+<(30)7/2/7" }

15.15.229 is the OH2 KNX Bundle.

  • At 8:31:27 you see a normal GroupValueRead from OH2 and then the GroupValueResponse from the KNX-Actor. Got no echo!
  • At 8:31:57 there I have shortly disconnected the IP-Router, then I switched the actor from OFF to ON and connected the IP-Router again. To see if a changed Value generates an echo. OH2 logged this change with:
08:31:57.437 [INFO ] [marthome.event.ItemStateChangedEvent] - TEST_AKTOR_1_1_27 changed from OFF to ON

Got no echo!

  • At 8:32:27 again you see a normal GroupValueRead from OH2 and then the GroupValueResponse from the KNX-Actor. Got no echo again!

See if my Bundle works better?!

EDIT: A possible cause for echoes: GroupValueResponse at 9:56:38 in your screen comes from KNX IP BAOS 772, this is your IP-Router. Your router seems to be configured to respond? I think there is a configuration fault. The GroupValueResponse must come from an actuator directly!

2 Likes

@lewie
Your bundle-snapshot (from november 25th) worked! Thank you very much!

Your previous link leads to a jar-snapshot dating oktober 31th. This last link is a snapshot from november and it works!

Some background-infos to understand the idea of using a IP-BAOS-device:
This device is not used as IP-Router! We use 11 ‘real’ IP-Routers to couple the knx-lines. The IP-BAOS-device is used to cache knx-group-adresses or to deliver vaules for devices that may not or should not respond to GroupReadValue-telegramms. IP-Baos-modules have the capability to listen on telegramms and store the last values that were communicated within the knx-lines. Due to the IP-Tunnel capabilities we use the IP-BAOS-device to deliver the ‘last known’ value of a knx group address to a network device. Because the IP-Baos-device can answer to a ReadValue itself there is no traffic on the knx-lines to gain that value from the original knx-device… Therefore we can reduce the traffic on all lines.

here is a small hint regarding your screenshot to gain more clarity: Maybe you want to define a “dummy application” for your device 15.15.229 (witch seems top be your openHAB) and name it for example “openHAB2”. You can add a “virtual line” and use a copy of a IP-Router application or even better: use a gira “dummy application”. You could also create a line 1.2 and declare openHAB2 to use for example 1.2.2 as KNX-phyisical device adress with this setting within knx.cfg:
busaddr=1.1.2
But I guess I am telling you boring stuff…

Thank you very much for your help!

Regards,
Dirk

@DirkSander, Good News… :slight_smile: This should Help since KNX2 Bundle is out!

@lewie, I am sorry but with your snapshot now GroupValueWrite(s) seem to have problems. Last time I made the tests regarding my “GroupValueRead”-Problem. That was fine with your snapshot.

But now normal switch-items do not write to knx any more. I use amazon echo (alexa) to switch on knx devices by voice commands via openHAB2. I monitored the knx communication - nothing happens on the knx side with last snapshot of knx-binding. With same itemconfig everything works fine knx binding 1.9.0.b5.

Therefore I reverted to 1.9.0.b5 and added a listeningGA to solve my problem. Now everything works fine.

This is my item definition to read from knx bus every 60 seconds without an echo:

Switch mySwitchItem “myLable” (GroupOne, GroupTwo) {autoupdate=“true”, knx="<(60)1/2/3+1/2/3"}

I just use the same group address as listeningGA

Maybe you should look after this before release KNX2 bundle.

Thanks,
Dirk

@lewie, @DirkSander, Hello!

I read through your discussion, tried all ideal, no success yet.

I have clean OpenHAB 2.0.0 install and migrating from 1.8. Original problem is that OpenHAB2 writes to KNX after read. In most cases it’s just extra traffic, but some KNX devices I have respond back with status on same GA, which in turn causes another reply from OpenHAB.

My knx.cfg has this, everything else is commented out:

ip=ip addr of interface
ignorelocalevents=true
type=TUNNEL

KNX bundle version is “1.9.0”

Items are like this:

Switch C_A “Switch A” (C_Group) {knx=“7/0/32+<7/0/132”}
Switch C_B “Switch B” (C_Group) {knx="<7/0/209"}

C_A works well, reads 7/0/132 on refresh and sends commands to 7/0/32
C_B generates unnecessary writes to KNX. I tried knx="<7/0/209+7/0/209", as recommended above, in this case I get exception on config refresh:

2017-02-14 18:47:42.707 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'Power.items’
2017-02-14 18:47:42.723 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type ‘knx’ of item ‘C_B’ could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: Datapoint ‘1.001’ already exists for item ‘C_B’.
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:50)[176:org.openhab.core.compat1x:2.0.0]

Having different GA there works well.

Do you have any ideas how to solve this?

Vitaly

@vitalyb, I know it is frustrating with KNX 1.8.

Use my Bundle please

  1. Uninstall current bundle over PaperUI.
  2. Wait minimum 2 Minutes.
  3. Copy my Bundle please into “addons” folder of openHAB2.
  4. Change your Items definition if there are problems anymore, like:
Switch C_A "Switch A" (C_Group) {autoupdate="true", knx="7/0/32+<7/0/132"}
Switch C_B "Switch B" (C_Group) {autoupdate="true", knx="<7/0/209"}

Good luck!

PS: In the near future, the new KNX2.0 Bundle should be released! :pray: :wink:

2 Likes

@lewie, thank you. Did as you described, except adding autoupdate=“true” and it works now without extra writes, on .items files I moved from 1.8. In some other thread I read that ‘autoupdate’ is true by default, and false is something that needs to be specified. Anyway, it works without it, so I’m fine.

Just curious, why 2.0 comes with different KNX bundle, which creates this problem? Is there anything else i should be aware of?

Thanks again!

I’ve made another test, part of items are:

Switch Light_O_FF1 “Light fence front 1” {autoupdate=“true”, knx=“1/3/0+<1/3/100”}
Switch Light_O_FF2 “Light fence front 2” {knx=“1/3/1+<1/3/101”}
Switch Light_O_FB1 “Light fence back 1” {knx=“<1/3/2”}

In all cases I do not get any extra writes, but for the second item (Switch Light_O_FF2) I do not get any write to KNX when I change it through UI. The first and somehow the third items seem to work well. Is it supposed to work like this?

You have missed autoupdate=“true”

Now, it should work as expected.

@lewie, thanks for the advise. Should I put autoupdate=“true” to every item where knx binding is mentioned?

@vitalyb, only if you have more than one KNX address linked:

Switch Light_O_FB1 “Light fence back 1” {knx=“<1/3/2”} ← here autoupdate=“true” is optional.

I have a lot of items in my setup, is it safe to say that I can add autoupdate=“true” to every knx binding in 2.0 to get same behavior like in 1.8? Testing every item will take a lot of time. Maybe there is a key in binding configuration to reach compatibility without modifying items files?

Please test it, using a few items and see if it works.

hey there @lewie,

I was playing around with this problem for a while now but wasn’t able to get a working combination.

Currently, I’m using your 20161125 jar with the debian packaged 2.0 openhab version.
Reading values from the Bus seems to work fine, but writing to it will result in two writes.

This might not be a priority and maybe I shouldn’t worry about it, but somehow I just can’t ignore it :slight_smile:

Anyway, my items do contain the autoupdate=“true” part. If I remove it or switch to false, no write is passed to the Bus anymore, eg I can’t control the items via WebIF (BasicUI) anymore.

Example of my items:

Dimmer Licht_Buero_Spots "Spots [%s]" (Lights) {autoupdate="true", knx="3/1/030+<3/1/033, 3/1/031, 3/1/032+<3/1/034" }

my config:

ip=10.6.91.8
busaddr=1.1.6
#type=ROUTER
type=TUNNEL
localIp=10.6.91.102
timeout=1000
readRetries=10
numberOfThreads=50

/* ignored anyway? */
CompatibilityOH2=true
ignorelocalevents=true

Result when sending a write via BasicUI:

Any ideas or comments? Do you need specific test cases or logs?
BTW, thanks in advance for any feedback.

Late… :frowning:

Hey Markus,
your config is ok, but I do not know if the comment ignored anyway should have a # at the beginning!

Does your IP-Router config NOT have anything enabled like reflect or repeat.

Please can you show me the openHAB log-file equivalent to your ETS Screenshot?

Let’s Test it.

EDIT:
Did you test the original Jar file?
What KNX jar console shows as Active? Therefore on openHAB console enter: list

Helmut