Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KNX integration stops working after some minutes #39298

Closed
LavermanJJ opened this issue Aug 26, 2020 · 9 comments
Closed

KNX integration stops working after some minutes #39298

LavermanJJ opened this issue Aug 26, 2020 · 9 comments

Comments

@LavermanJJ
Copy link

The problem

When starting with HA, setup went fine. Different KNX entities can be controlled and status is updated when changes come from KNX. However, after some time (< 15-20 min), the two log messages below occur and the integration is broken: Changing the state in HA has no effect on KNX and vice versa.

Environment

  • Home Assistant Core release with the issue: 0.114.3
  • Last working Home Assistant Core release (if known): -
  • Operating environment (OS/Container/Supervised/Core): HassOS 4.12 (RPi3)
  • Integration causing this issue: KNX
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/knx/

Problem-relevant configuration.yaml

knx:
  routing:
     local_ip: '172.16.1.10'

logger:
  default: info
  logs:
    xknx: debug
    # xknx provides xknx.log, xknx.knx and xknx.telegram loggers.

notify:
  - platform: knx
    name: Feueralarm EG
    address: '10/1/0'
  - platform: knx
    name: Feueralarm OG
    address: '10/1/4'
    
binary_sensor:
  - platform: knx
    name: BWM Flur
    state_address: '0/5/11'
    device_class: motion
  - platform: knx
    name: Terrassentür
    state_address: '10/4/3'
    device_class: door
    
light:
  # dimmable light
  - platform: knx
    name: Livingroom-light-west
    address: '2/2/5'
    state_address: '2/5/5'
    brightness_address: '2/4/5'
    brightness_state_address: '2/6/5'
  - platform: knx
    name: cellar-light
    address: '2/0/0'
    state_address: '2/1/0'

cover:
  # Shutter
  - platform: knx
    name: "Kitchen.Shutter"
    move_long_address: '6/0/0'
    move_short_address: '6/1/0'
    position_address: '6/2/0'
    position_state_address: '6/4/0'
    travelling_time_down: 51
    travelling_time_up: 61
  - platform: knx
    name: "Wohnzimmer.Blind"
    move_long_address: '6/0/5'
    move_short_address: '6/1/5'
    position_address: '6/2/5'
    position_state_address: '6/4/5'
    angle_address: '6/3/5'
    angle_state_address: '6/5/5'
    travelling_time_down: 51
    travelling_time_up: 61
    

Traceback/Error logs

Log Details (WARNING)
Logger: xknx.log
Source: /usr/local/lib/python3.8/site-packages/xknx/knxip/cemi_frame.py:121 
First occurred: 9:29:39 PM (112 occurrences) 
Last logged: 9:39:46 PM

Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="APCI not supported: 0b100001100000000" />
Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="CEMI too small. Length: 10; CEMI: b')\x00\xb0P\x11\x0b\x00\x00\x00\xc2'" />
Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="CEMI too small. Length: 10; CEMI: b')\x00\xb0`\x00\x00\x11\x0b\x00\x81'" />
Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="APCI not supported: 0b100001101000000" />
Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="CEMI too small. Length: 10; CEMI: b')\x00\xb0`\x00\x00\x11\x0b\x00\xc2'" />


Log Details (ERROR)
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:115 
First occurred: 9:29:39 PM (85 occurrences) 
Last logged: 9:39:46 PM

Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 1019, in _read_ready
    self._protocol.datagram_received(data, addr)
  File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 56, in datagram_received
    self.data_received_callback(data)
  File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 90, in data_received_callback
    self.handle_knxipframe(knxipframe)
  File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 99, in handle_knxipframe
    callback.callback(knxipframe, self)
  File "/usr/local/lib/python3.8/site-packages/xknx/io/routing.py", line 34, in response_rec_callback
    if knxipframe.body.src_addr == self.xknx.own_address:
  File "/usr/local/lib/python3.8/site-packages/xknx/telegram/address.py", line 62, in __eq__
    raise TypeError()
TypeError

Additional information

  • Searching the web it seems that receiving unknown telegrams caused the integration to break (KNX hub craches: APCI not supported #32394). However, the issue is closed, and this is just a warning, so it may be unrelated?!
  • I have a working OpenHAB setup that integrates with my KNX running in parallel. Changing something there got reflected in HA and vice versa but only until HA KNX crashes. OpenHAB continues to work.
@probot-home-assistant
Copy link

Hey there @Julius2342, @farmio, @marvin-w, mind taking a look at this issue as its been labeled with an integration (knx) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@farmio
Copy link
Contributor

farmio commented Aug 27, 2020

Hi! 👋
This is a bug that was introduced to routing connections with the fix for tunneling connections you mentioned above. 😬
It should be resolved with xknx 0.12.0 coming with HA 0.115.
Please let us know if the issue persists then.

As a workaround you could use a tunneling connection until then.

Could you maybe try to stop OpenHAB for a test to see if the telegrams are sent from this? I'd be interested in the source. I've only seen such telegrams from ETS searching for devices in programming mode or doing a Line-Scan.

@LavermanJJ
Copy link
Author

Hi - thanks for your fast reply! It seems to hold true, what they say about the HA community 👍
Thanks for the heads up for the fix in HA 0.115. Did I understand this correctly, that HA releases are published ~1 / month?

I tried with tunneling, but that also fails with the same error after some minutes. So I'll probably have to test taking OpenHAB offline.

@farmio
Copy link
Contributor

farmio commented Aug 27, 2020

There is a calendar here: https://developers.home-assistant.io - I think it is 3 Weeks.
If you're a little adventurous you can already test 0.115 if you run the dev branch. Any feedback for this issue would be welcome. Or wait for the beta and try it 1 week earlier.

@LavermanJJ
Copy link
Author

Sure, here are the error messages, when tunneling is used.

Log Details (WARNING)
Logger: xknx.log
Source: /usr/local/lib/python3.8/site-packages/xknx/knxip/cemi_frame.py:121 
First occurred: 8:58:45 PM (96 occurrences) 
Last logged: 8:58:50 PM

Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="APCI not supported: 0b100001100000000" />
Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="CEMI too small. Length: 10; CEMI: b')\x00\xb0P\x11\x0b\x00\x00\x00\xc2'" />
Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="CEMI too small. Length: 10; CEMI: b')\x00\xb0`\x00\x00\x11\x0b\x00\x81'" />
Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="APCI not supported: 0b100001101000000" />
Ignoring not implemented CEMI: <UnsupportedCEMIMessage description="CEMI too small. Length: 10; CEMI: b')\x00\xb0`\x00\x00\x11\x0b\x00\xc2'" />


Log Details (ERROR)
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:115 
First occurred: 8:58:45 PM (73 occurrences) 
Last logged: 8:58:50 PM

Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 1019, in _read_ready
    self._protocol.datagram_received(data, addr)
  File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 56, in datagram_received
    self.data_received_callback(data)
  File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 90, in data_received_callback
    self.handle_knxipframe(knxipframe)
  File "/usr/local/lib/python3.8/site-packages/xknx/io/udp_client.py", line 99, in handle_knxipframe
    callback.callback(knxipframe, self)
  File "/usr/local/lib/python3.8/site-packages/xknx/io/routing.py", line 34, in response_rec_callback
    if knxipframe.body.src_addr == self.xknx.own_address:
  File "/usr/local/lib/python3.8/site-packages/xknx/telegram/address.py", line 62, in __eq__
    raise TypeError()
TypeError

In addition, I set OpenHAB offline for some minutes (no extensive testing), but during that time no error occurred. Seems like you're right on this one.

@cyberjunky
Copy link
Contributor

cyberjunky commented Aug 27, 2020 via email

@farmio
Copy link
Contributor

farmio commented Aug 27, 2020

@LavermanJJ you seem to be still routing

File "/usr/local/lib/python3.8/site-packages/xknx/io/routing.py", line 34, in response_rec_callback

@LavermanJJ
Copy link
Author

Sorry for the delay. Been off for some days. You were right, tunneling works 👍
Do you want me to close the issue, or keep it open for now, and close it with the next release?

@marvin-w
Copy link
Contributor

marvin-w commented Sep 3, 2020

Feel free to close it right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants