system-bridge icon indicating copy to clipboard operation
system-bridge copied to clipboard

Home Assistant won't work with the dev version (4.2.0)

Open timmo001 opened this issue 1 year ago • 3 comments

Description

Adding a new item to the system module breaks the connector

What Platform / OS are you running?

Windows/Linux

What version are you running?

4.2.0 (dev)

Anything in the logs or a references that might be useful?

HA Core:

2024-04-07 16:03:23.699 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/systembridgeconnector/websocket_client.py", line 591, in listen
    await self.listen_for_messages(callback=_callback_message)
  File "/usr/local/lib/python3.12/site-packages/systembridgeconnector/websocket_client.py", line 607, in listen_for_messages
    await callback(message)
  File "/usr/local/lib/python3.12/site-packages/systembridgeconnector/websocket_client.py", line 579, in _callback_message
    else model(**message[EVENT_DATA]),
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: System.__init__() got an unexpected keyword argument 'run_mode'
2024-04-07 16:03:38.654 WARNING (MainThread) [homeassistant.components.system_bridge.config_flow] Timed out connecting to 192.168.1.127:

timmo001 avatar Apr 07 '24 15:04 timmo001

Holding the release until https://github.com/home-assistant/core/pull/114896 and a second PR after updating the connector and models

Once the package update to the connector and models package is in, the release needs to be timed

timmo001 avatar Apr 07 '24 15:04 timmo001

Since the old connector relies on models with no enums, just updating the models won't work either:

2024-04-07 15:25:33.566 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration system_bridge: cannot import name 'MODEL_RESPONSE' from 'systembridgemodels.const' (/home/vscode/.local/lib/python3.12/site-packages/systembridgemodels/const.py)

timmo001 avatar Apr 07 '24 15:04 timmo001

If anything comes up, there are a couple of workarounds:

  • Downgrade the models and connector on the backend
  • Remove the new fields in models, update connector, update cli and backend

timmo001 avatar Apr 07 '24 15:04 timmo001

Applying a hybrid of the above

timmo001 avatar Apr 10 '24 01:04 timmo001