Max integration broken?

Hi,

since upgrading to lastest version the max integration is not working anymore.
Seems like a python problem. Output from homeassistant.log:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 190, in _async_setup_component
result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/maxcube/init.py”, line 63, in setup
cube = MaxCube(MaxCubeConnection(host, port))
File “/usr/local/lib/python3.7/site-packages/maxcube/cube.py”, line 31, in init
self.init()
File “/usr/local/lib/python3.7/site-packages/maxcube/cube.py”, line 34, in init
self.update()
File “/usr/local/lib/python3.7/site-packages/maxcube/cube.py”, line 60, in update
self.parse_response(response)
File “/usr/local/lib/python3.7/site-packages/maxcube/cube.py”, line 100, in parse_response
self.parse_c_message(line.strip())
File “/usr/local/lib/python3.7/site-packages/maxcube/cube.py”, line 115, in parse_c_message
device_type = data[4]

Seems like you’re affected by this issue: https://github.com/home-assistant/core/issues/28811
You can try to use the changes of @onkelbeh as a custom integration :slight_smile:

I dont think so. It has been working for over a year now and got broken since the last update.
I downgraded but now the problem persists.
My error differs a lot from the error reported on the link “IndexError: bytearray index out of range”
Does anyone have further tips?

Hi,

this is definitely not caused by #28811.
This looks like a connection issue, did you try to reset the cube?

Sometimes these hang themself if you open more than one connection simultaneously.

Hi onkelbeh,

you were right, It was a conneciton issue. The cube was crashed, I did a complete reset of the cube (as every few months, since there is no permanent connection configurable) and it worked again.

Topic can be closed, thanks!