{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab1-addons/issues/4765","repository_url":"https://api.github.com/repos/openhab/openhab1-addons","labels_url":"https://api.github.com/repos/openhab/openhab1-addons/issues/4765/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab1-addons/issues/4765/comments","events_url":"https://api.github.com/repos/openhab/openhab1-addons/issues/4765/events","html_url":"https://github.com/openhab/openhab1-addons/pull/4765","id":188770589,"number":4765,"title":"In openHAB 2 all events are triggered twice to KNX bus","user":{"login":"lewie","id":5707426,"avatar_url":"https://avatars.githubusercontent.com/u/5707426?v=3","gravatar_id":"","url":"https://api.github.com/users/lewie","html_url":"https://github.com/lewie","followers_url":"https://api.github.com/users/lewie/followers","following_url":"https://api.github.com/users/lewie/following{/other_user}","gists_url":"https://api.github.com/users/lewie/gists{/gist_id}","starred_url":"https://api.github.com/users/lewie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewie/subscriptions","organizations_url":"https://api.github.com/users/lewie/orgs","repos_url":"https://api.github.com/users/lewie/repos","events_url":"https://api.github.com/users/lewie/events{/privacy}","received_events_url":"https://api.github.com/users/lewie/received_events","type":"User","site_admin":false},"labels":[{"id":82695278,"url":"https://api.github.com/repos/openhab/openhab1-addons/labels/awaiting-feedback","name":"awaiting-feedback","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-11T14:24:26Z","updated_at":"2017-01-28T16:09:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openhab/openhab1-addons/pulls/4765","html_url":"https://github.com/openhab/openhab1-addons/pull/4765","diff_url":"https://github.com/openhab/openhab1-addons/pull/4765.diff","patch_url":"https://github.com/openhab/openhab1-addons/pull/4765.patch"},"body":"KNX1.8 in OH2 does send all events twice to KNX bus. This behavior did not stop with [PR](https://github.com/openhab/openhab/pull/4736) including \"AutoUpdateBindingProvider\".\r\n\r\nThe reason is a different behavior of OH1 and OH2:\r\n```\r\nIn OH1 \r\n*postUpdate* causes once *internalReceiveUpdate* is triggered.\r\nand \r\n*sendCommand* causes once *internalReceiveCommand* is triggered.\r\n\r\nIn OH2 \r\n*postUpdate* causes once *internalReceiveUpdate* is triggered.\r\nand \r\n*sendCommand* causes *internalReceiveCommand and after internalReceiveUpdate* is triggered. (->two KNX bus triggers)\r\n```\r\n\r\n\r\nUnfortunately, I could not determine the reason. It seams to be a difference between felix and equinox Event handling.\r\nI could go back and compare callers 4 levels, but found no reason.\r\n```\r\nCallers before internalReceiveCommand OH2\r\nlevel 1:  getClassName = 'org.openhab.binding.knx.internal.bus.KNXBinding'\r\nlevel 1:  getFileName = 'KNXBinding.java'\r\nlevel 1:  getLineNumber = '119'\r\nlevel 1:  getMethodName = 'internalReceiveCommand'\r\n\r\nlevel 2:  getClassName = 'org.openhab.core.binding.AbstractBinding'\r\nlevel 2:  getFileName = 'AbstractBinding.java'\r\nlevel 2:  getLineNumber = '97'\r\nlevel 2:  getMethodName = 'receiveCommand'\r\n\r\nlevel 3:  getClassName = 'org.openhab.core.events.AbstractEventSubscriber'\r\nlevel 3:  getFileName = 'AbstractEventSubscriber.java'\r\nlevel 3:  getLineNumber = '42'\r\nlevel 3:  getMethodName = 'handleEvent'\r\n\r\nlevel 4:  getClassName = 'org.apache.felix.eventadmin.impl.handler.EventHandlerProxy'\r\nlevel 4:  getFileName = 'EventHandlerProxy.java'\r\nlevel 4:  getLineNumber = '415'\r\nlevel 4:  getMethodName = 'sendEvent'\r\n\r\nCallers before internalReceiveCommand OH1\r\nlevel 1: getClassName = 'org.openhab.binding.knx.internal.bus.KNXBinding'\r\nlevel 1: getFileName = 'KNXBinding.java'\r\nlevel 1: getLineNumber = '127'\r\nlevel 1: getMethodName = 'internalReceiveCommand'\r\n\r\nlevel 2: getClassName = 'org.openhab.core.binding.AbstractBinding'\r\nlevel 2: getFileName = 'AbstractBinding.java'\r\nlevel 2: getLineNumber = '97'\r\nlevel 2: getMethodName = 'receiveCommand'\r\n\r\nlevel 3: getClassName = 'org.openhab.core.events.AbstractEventSubscriber'\r\nlevel 3: getFileName = 'AbstractEventSubscriber.java'\r\nlevel 3: getLineNumber = '42'\r\nlevel 3: getMethodName = 'handleEvent'\r\n\r\nlevel 4: getClassName = 'org.eclipse.equinox.internal.event.EventHandlerWrapper'\r\nlevel 4: getFileName = 'EventHandlerWrapper.java'\r\nlevel 4: getLineNumber = '197'\r\nlevel 4: getMethodName = 'handleEvent'\r\n\r\n```\r\n\r\nWith this PR the cause of the different behavior of the two OH versions is not fixed.\r\nBut the KNX 1.8 behaves as expected in both openHAB versions now.\r\n"},"comment":{"url":"https://api.github.com/repos/openhab/openhab1-addons/issues/comments/275856806","html_url":"https://github.com/openhab/openhab1-addons/pull/4765#issuecomment-275856806","issue_url":"https://api.github.com/repos/openhab/openhab1-addons/issues/4765","id":275856806,"user":{"login":"martenss","id":25394375,"avatar_url":"https://avatars.githubusercontent.com/u/25394375?v=3","gravatar_id":"","url":"https://api.github.com/users/martenss","html_url":"https://github.com/martenss","followers_url":"https://api.github.com/users/martenss/followers","following_url":"https://api.github.com/users/martenss/following{/other_user}","gists_url":"https://api.github.com/users/martenss/gists{/gist_id}","starred_url":"https://api.github.com/users/martenss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martenss/subscriptions","organizations_url":"https://api.github.com/users/martenss/orgs","repos_url":"https://api.github.com/users/martenss/repos","events_url":"https://api.github.com/users/martenss/events{/privacy}","received_events_url":"https://api.github.com/users/martenss/received_events","type":"User","site_admin":false},"created_at":"2017-01-28T16:09:15Z","updated_at":"2017-01-28T16:09:15Z","body":"Same issue here.\r\nRunning Openhab 2.0.0 Release Build on openhabian Rpi3.\r\n\r\nOpenhab is consistently re-transmitting KNX telegrams for all incoming GAs linked to items - and not for the other GAs not configured in the item file.\r\nProblem is reproduced both in TUNNEL and ROUTER mode, and while using different IP interfaces (MDT & Wiregate). ignorelocalevents=true doesn't seem to make a difference so I suspect this parameter is not recognized in the systems showing this behavior.\r\n\r\nQuite annoying when using event-driven telegrams (quite common in home automation systems), as one need to check for changes instead of relying on simple event notifications.\r\n\r\nMy production Openhab 1.8 server doesn't show this behavior with same settings.\r\n\r\nNote: the above-mentioned difference between incoming and outgoing GAs had been observed as well consistently for one partical item that had persistence issues (any value coming in resulted in OH2 writing 0 on the bus). This had been resolved by fixing the rrd4j persistence issue, and now also the same value is written back on the bus so this is just a configuration matter to be resolved by the end-user."}}
{"actor":{"display_login":"martenss"}}