Vallox ValloPlus 350MV partial success -> Work in progress on vallox component

Fixed it. Was a bug. Please check out again.

Humidity is already supported. From the documentation PR, these sensors are currently supported:

- fan_speed
- temp_extract_air
- temp_exhaust_air
- temp_outdoor_air
- temp_supply_air
- humidity
- remaining_time_filter

Adding new ones later will be straight forward and we can do it with follow up PRs. For now, I want to wait on review feedback to get the initial state upstream.

Thank you for your great work. After thinking about the sensors this one would be very helpful too. Maybe in a later version? I hope you can get it. It is the german frontend. :slight_smile:

Great, thanks, checked out again all sensors do show up now, when no sensor is explicitly specified. :+1:

Would agree again Bernds with proposal: cell state ([0-3]->[heat recovery, cool recovery,
bypass, defrosting]), variable:

A_CYC_CELL_STATE

would be a useful addition after we are upstream. In addition setting the temp targets to get some control on the cell state would be helpful (in case you proactively want to “cool down” before warm days with fresh night air -> lower target value, while in winter you try to keep all energy in -> higher temp value), all read/write-variables:

A_CYC_AWAY_AIR_TEMP_TARGET
A_CYC_BOOST_AIR_TEMP_TARGET
A_CYC_HOME_AIR_TEMP_TARGET

Good news, the PR landed today.

Had to undergo some architectural changes during review, so make sure to check documentation again.

If you don’t want to wait for the next major release that includes this, copying the vallox folder to custom components should do:

During the next weeks I won’t have anymore bandwidth to add new sensors or services. Please take a look at the files and see if you can add them yourselves, it should be rather simple.

Thanks,
Andre

Hello Andre!

Good news! :slight_smile: I installed the latest version by copying the files and now have some problems to change the mode. The drop down menu to select mode (home, away, boost…) isn’t working anymore. Everything else seems to work normally (for example remaining time is now shown in weeks).

Maybe you’re able to fix this issue?

BR,
Bernd

Ah, the updated documentation PR was not merged yet.

I was not allowed to keep the drop-down menu, you have to make your own now.
Please check the following link for the updated docs that have an example:

Hello!

After updating to version 0.95 i am getting error-messages for the vallox-component. After a period of time the vallox compoment loses the connection. That lasts for several minutes, then it works again. I didn’t have these problems in version 0.94.

Here is an extract from my error-log:

BR
Bernd

After running a while, it seems to work now. :slight_smile:

Fyi, the new 0.96 release features the vallox integration now.

Hi,
I updated to 0.96.0 (and now to 0.96.2), but vallox did not work with either versions.

Home Assistant is running in container homeassistant/raspberrypi3-homeassistant

config:

vallox:
  host: 192.168.80.46

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

Hmm, that’s unfortunate. It never happened during development, but I get it with 0.96 now as well. Maybe an underlying dependency lib broke.

I opened an issue to track it: https://github.com/home-assistant/home-assistant/issues/25335

By the way, in my home sometimes it succeeds. Can you try to reboot a couple of times and see if it works sometimes?

Hi, i restarted the container around 50 times and the machine around 10 times, but did not get the vallox integration to work.

Oh wow, that’s strange. You are running on a RaspberryPi3, right?

For me, 50% of the time it works on RPi3, but I cannot reproduce the error on x86 at all… :sweat:

@Tippfeler, if possible, could you check out https://github.com/home-assistant/home-assistant/issues/25335#issuecomment-513457212 and see if you can provide the tcdump Jevgeni asked for?

Hi, I did not encounter errors in 0.95.4, now updated to 0.96.2 and at least initially the unit is found. I will continue to observe.

However I am on x86 and it seems I am still using vallox-websocket-api 1.5.2, at least this is what

pip freeze | grep webs

tells me, when inside my docker-container…

@Tippfeler would it be possible to test the following patch:

diff --git a/homeassistant/components/vallox/__init__.py b/homeassistant/components/vallox/__init__.py
index ebb1d56cf..054984187 100644
--- a/homeassistant/components/vallox/__init__.py
+++ b/homeassistant/components/vallox/__init__.py
@@ -8,6 +8,8 @@ from vallox_websocket_api import PROFILE as VALLOX_PROFILE, Vallox
 from vallox_websocket_api.constants import vlxDevConstants
 import voluptuous as vol
 
+from websockets.exceptions import InvalidMessage
+
 from homeassistant.const import CONF_HOST, CONF_NAME
 import homeassistant.helpers.config_validation as cv
 from homeassistant.helpers.discovery import async_load_platform
@@ -164,7 +166,7 @@ class ValloxStateProxy:
             self._profile = await self._client.get_profile()
             self._valid = True
 
-        except OSError as err:
+        except (OSError, InvalidMessage) as err:
             _LOGGER.error("Error during state cache update: %s", err)
             self._valid = False

If yes, please tell me if the InvalidMessage exception is only caught once per startup, or if its also appears during runtime.

Sure, I’d love to help, however I’m not as far in programming.

When I enter the docker container, do I need to edit the file in directory

/usr/local/lib/python3.7/site-packages/vallox_websocket_api/__init__.py

correct?

This file currently shows as

from .client import Client
from .vallox import Vallox, PROFILE

__all__ = ["Client", "Vallox", "PROFILE"]
~

Not much programming needed, you’re almost there! You need the __init.py__ in the vallox component, not the websocket API.

Path should be contain something the likes of: homeassistant/components/vallox/__init__.py

Got it, it’s in

/usr/src/homeassistant/homeassistant/components/vallox

After applying, new errors showed up:

Error during state cache update: Malformed HTTP message

and

Error updating sensor: Device state out of sync.
20:14 components/vallox/sensor.py (ERROR) - message first occured at 20:14 and shows up 8 times

But good news:
It’s working! I can change profiles, and sensor data show up!

Okay cool, thats expected. First error is catched and ignored. Thanks for trying!