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

Reconnection issue, zwave_js_server not ready? #102

Closed
aneisch opened this issue Feb 5, 2021 · 3 comments
Closed

Reconnection issue, zwave_js_server not ready? #102

aneisch opened this issue Feb 5, 2021 · 3 comments

Comments

@aneisch
Copy link

aneisch commented Feb 5, 2021

I'm having a hard time tracking down the actual cause of this issue but I figured I would post my logs as it may be obvious to someone else.

I can reproduce this by restarting my zwavejs2mqtt container or rebooting my system. If HA attempts to connect to the zwavejs websocket before it's fully ready I will get this error and HA will refuse to attempt a reconnection.

2021-02-05 10:07:06 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Z-Wave JS' for zwave_js integration not ready yet. Retrying in 5 seconds
2021-02-05 10:07:11 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Z-Wave JS for zwave_js
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 239, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/__init__.py", line 182, in async_setup_entry
    await client.connect()
  File "/usr/local/lib/python3.8/site-packages/zwave_js_server/client.py", line 81, in connect
    await self._client.receive_json()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_ws.py", line 291, in receive_json
    data = await self.receive_str(timeout=timeout)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client_ws.py", line 276, in receive_str
    raise TypeError(f"Received message {msg.type}:{msg.data!r} is not str")
TypeError: Received message 257:None is not str

Perhaps we just need to backoff and retry if we don't receive the expected json (what I think is happening here)?

@shyne99
Copy link

shyne99 commented Feb 13, 2021

Hello
I can reproduce this as well. And it happens sometimes even if zwavejs2mqtt is running fine. Maybe once a week.
Only solution is to restart core.

@shyne99
Copy link

shyne99 commented Feb 15, 2021

Seems to be on investigation in Hassio side :
home-assistant/core#46180

@aneisch
Copy link
Author

aneisch commented Feb 15, 2021

Expected to be resolved in #109.

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

No branches or pull requests

2 participants