core: Vallox: Websockets: malformed http message
Home Assistant release with the issue: 0.96.x
Last working Home Assistant release (if known): 0.94.x (developed around this time)
Operating environment (Hass.io/Docker/Windows/etc.): Hassio
Component/platform: vallox
Description of problem:
In 50% of the time, vallox setup routine is not successful due to malformed http response. This never happens during testing during development, but is now reproducible in the release.
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
vallox:
host: IP
Traceback (if applicable):
Error during setup of component vallox
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 77, in read_http_response
status_code, headers = yield from read_response(self.reader)
File "/usr/local/lib/python3.7/site-packages/websockets/http.py", line 123, in read_response
status_line = yield from read_line(stream)
File "/usr/local/lib/python3.7/site-packages/websockets/http.py", line 197, in read_line
raise ValueError("Line without CRLF")
ValueError: Line without CRLF
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 153, in _async_setup_component
hass, processed_config)
File "/usr/src/homeassistant/homeassistant/components/vallox/__init__.py", line 114, in async_setup
await state_proxy.async_update(None)
File "/usr/src/homeassistant/homeassistant/components/vallox/__init__.py", line 163, in async_update
self._metric_cache = await self._client.fetch_metrics()
File "/usr/local/lib/python3.7/site-packages/vallox_websocket_api/client.py", line 235, in fetch_metrics
result = await self._websocket_request(command=vlxDevConstants.WS_WEB_UI_COMMAND_READ_TABLES)
File "/usr/local/lib/python3.7/site-packages/vallox_websocket_api/client.py", line 223, in _websocket_request
async with websockets.connect("ws://%s/" % self.ip_address) as ws:
File "/usr/local/lib/python3.7/site-packages/websockets/py35/client.py", line 2, in __aenter__
return await self
File "/usr/local/lib/python3.7/site-packages/websockets/py35/client.py", line 19, in __await_impl__
extra_headers=protocol.extra_headers,
File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 260, in handshake
status_code, response_headers = yield from self.read_http_response()
File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 79, in read_http_response
raise InvalidMessage("Malformed HTTP message") from exc
websockets.exceptions.InvalidMessage: Malformed HTTP message
Additional information: https://community.home-assistant.io/t/vallox-valloplus-350mv-partial-success-work-in-progress-on-vallox-component/52588/30
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 20 (20 by maintainers)
Oh, you are right! Good catch. I changed those as well. Now on my faster RPi, even the initial fault is gone.